<commit_before>
require 'yaml'
require 'set'
require 'find'
require 'net/ssh'
require 'net/scp'
require 'net/sftp'
require_relative 'target'
require_relative 'remote'
require_relative 'msg'

module Chamois
  class Application
    private

    def files
      Dir['**/*'].reject { |f| File.directory? f }
    end

    def read_config(path)
      y = File.read(path)

      begin
        config = YAML.load(y)
      rescue
        raise "Incorrect format of config file at #{path}"
      end
      config
    end

    def load_config!(path)
      fail "Can't find config at #{path}" unless File.exist?(path)
      fail "Can't read config file at #{path}" unless File.readable?(path)
      read_config(path)
    end<commit_msg>Fix bug where unix hidden files weren't included<commit_after>
require 'yaml'
require 'set'
require 'find'
require 'net/ssh'
require 'net/scp'
require 'net/sftp'
require_relative 'target'
require_relative 'remote'
require_relative 'msg'

module Chamois
  class Application
    private

    def files
      Dir.glob('**/{*,.*}').reject { |f| File.directory? f }
    end

    def read_config(path)
      y = File.read(path)

      begin
        config = YAML.load(y)
      rescue
        raise "Incorrect format of config file at #{path}"
      end
      config
    end

    def load_config!(path)
      fail "Can't find config at #{path}" unless File.exist?(path)
      fail "Can't read config file at #{path}" unless File.readable?(path)
      read_config(path)
    end
{'fraction_non_alphanumeric': 0.11051574012056263, 'fraction_numerical': 0.0, 'mean_word_length': 2.850515463917526, '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': '1848962', 'n_tokens_mistral': 482, 'n_tokens_neox': 466, 'n_words': 148}