<commit_before><commit_msg>copies findable module to app/models/concerns<commit_after>module Findable
  module InstanceMethods
    def get_geoip_location(author_collection)
      author_collection.collect do |aa| 
        begin
          regex = /\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}/
          if regex.match(aa.name)
            nil
          else 
            GeoIP.new('lib/assets/GeoIP.dat').country(aa.name)
          end
        rescue Exception => e
          puts e
        end
      end.compact
    end

    def get_geoip_single_author_location(author)
      begin
        regex = /\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}:\w{3,4}/
        if regex.match(author.name)
          nil
        else 
          GeoIP.new('lib/assets/GeoIP.dat').country(author.name)
        end
      rescue Exception => e
        puts e
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.15195530726256984, 'fraction_numerical': 0.035754189944134075, 'mean_word_length': 1.9281045751633987, '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': '3493722', 'n_tokens_mistral': 340, 'n_tokens_neox': 337, 'n_words': 50}