<commit_before>class RadWho
  MAC_REGEXP = /(?<mac>[0-9A-F]{2}(?<separator>[:-]?)([0-9A-F]{2}\k<separator>){4}[0-9A-F]{2})/i.freeze
  RAW_ENTRY_REGEXP = /^.*?-#{MAC_REGEXP},(?<session>.*?),.*$/i.freeze
  TRANSFORMED_ENTRY_REGEXP = /\A(?<session>.*?)-#{MAC_REGEXP}\z/i.freeze

  def initialize
    @radwho_output = RadWho.radwho
  end

  def self.radwho
    (`radwho -i -r -F /var/log/freeradius/radutmp ` || "").gsub(RAW_ENTRY_REGEXP, '\k<session>-\k<mac>')<commit_msg>Do not call radwho unless in production<commit_after>class RadWho
  MAC_REGEXP = /(?<mac>[0-9A-F]{2}(?<separator>[:-]?)([0-9A-F]{2}\k<separator>){4}[0-9A-F]{2})/i.freeze
  RAW_ENTRY_REGEXP = /^.*?-#{MAC_REGEXP},(?<session>.*?),.*$/i.freeze
  TRANSFORMED_ENTRY_REGEXP = /\A(?<session>.*?)-#{MAC_REGEXP}\z/i.freeze

  def initialize
    @radwho_output = RadWho.radwho
  end

  def self.radwho
    if ENV['RAILS_ENV'] == 'production'
      `radwho -i -r -F /var/log/freeradius/radutmp`.gsub(RAW_ENTRY_REGEXP, '\k<session>-\k<mac>')
    else
      ""
    end
{'fraction_non_alphanumeric': 0.24242424242424243, 'fraction_numerical': 0.019550342130987292, 'mean_word_length': 3.995121951219512, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1163732', 'n_tokens_mistral': 485, 'n_tokens_neox': 459, 'n_words': 53}