<commit_before># frozen_string_literal: true

# compares current members to USAC database for current year
# updates member_usac_to column to 12/31/{year}
class UsacFile
  attr_accessor :members_list

  USAC_SITE = "www.usacycling.org"
  REGION_FILES = {
    "Central" => "ct",
    "Mid-Atlantic" => "ma",
    "Mountain" => "mt",
    "North Atlantic" => "na",
    "North Central" => "nc",
    "North West" => "nw",
    "South Central" => "sc",
    "South East" => "se",
    "South West" => "sw",
    "West" => "we",
    "Wisconsin" => "wisc",
    "Complete" => "all"
  }.freeze

  # prefix each file with common filename hooey
  REGION_FILES.each_pair do |key, value|
    REGION_FILES[key] = "/promoters/wp_p_uscf_" + value + ".csv"
  end

  def initialize(person = "promo", pword = "<PASSWORD>")
    Net::HTTP.start(USAC_SITE) do |http|
      req = Net::HTTP::Get.new(REGION_FILES[RacingAssociation.current.usac_region])
      req.basic_auth person, pword<commit_msg>Fix frozen string error in USAC file<commit_after># frozen_string_literal: true

# compares current members to USAC database for current year
# updates member_usac_to column to 12/31/{year}
class UsacFile
  attr_accessor :members_list

  USAC_SITE = "www.usacycling.org"
  REGION_FILES = {
    "Central" => "ct",
    "Mid-Atlantic" => "ma",
    "Mountain" => "mt",
    "North Atlantic" => "na",
    "North Central" => "nc",
    "North West" => "nw",
    "South Central" => "sc",
    "South East" => "se",
    "South West" => "sw",
    "West" => "we",
    "Wisconsin" => "wisc",
    "Complete" => "all"
  }

  # prefix each file with common filename hooey
  REGION_FILES.each_pair do |key, value|
    REGION_FILES[key] = "/promoters/wp_p_uscf_" + value + ".csv"
  end

  REGION_FILES.freeze

  def initialize(person = "promo", pword = "<PASSWORD>")
    Net::HTTP.start(USAC_SITE) do |http|
      req = Net::HTTP::Get.new(REGION_FILES[RacingAssociation.current.usac_region])
      req.basic_auth person, pword
{'fraction_non_alphanumeric': 0.1559493670886076, 'fraction_numerical': 0.004050632911392405, 'mean_word_length': 3.5846867749419955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2466332', 'n_tokens_mistral': 750, 'n_tokens_neox': 706, 'n_words': 173}