<commit_before>require 'yaml'
require 'tzinfo'
require 'restclient'
require 'json'

ENV['TZ'] = :utc

::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "common")
::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "ecosystems")
::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "posts")
::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "projects")

module Alfred

  def self.config
    @config ||= YAML.load_file(File.expand_path("config/alfred.yml", Rails.root))
  end

  module Utils

    def self.tag_list(tags)
      tags.to_s.strip.split(/\W+/).uniq
    end

    IRCLOGGER_URL = 'http://irclogger.com'

    def self.logged_channel?(channel)
      JSON.parse(RestClient.get("#{IRCLOGGER_URL}/channels.json")).any? do |entry|
        entry['channel'] == channel
      end<commit_msg>Provide ENV['TZ'] = 'utc' as a String<commit_after>require 'yaml'
require 'tzinfo'
require 'restclient'
require 'json'

ENV['TZ'] = 'utc'

::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "common")
::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "ecosystems")
::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "posts")
::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "models", "projects")

module Alfred

  def self.config
    @config ||= YAML.load_file(File.expand_path("config/alfred.yml", Rails.root))
  end

  module Utils

    def self.tag_list(tags)
      tags.to_s.strip.split(/\W+/).uniq
    end

    IRCLOGGER_URL = 'http://irclogger.com'

    def self.logged_channel?(channel)
      JSON.parse(RestClient.get("#{IRCLOGGER_URL}/channels.json")).any? do |entry|
        entry['channel'] == channel
      end
{'fraction_non_alphanumeric': 0.1778023191606847, 'fraction_numerical': 0.0, 'mean_word_length': 4.826366559485531, 'pattern_counts': {'":': 0, '<': 19, '<?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': '6513221', 'n_tokens_mistral': 643, 'n_tokens_neox': 609, 'n_words': 104}