<commit_before># encoding utf-8

class Carto::Storage::S3
  def self.instance_if_enabled
    s3 = Carto::Storage::S3.new

    s3 if Cartodb.config.fetch(:aws, 's3')
  end

  def enabled?
    config.present?
  end

  private

  def bucket
    AWS.config(config)
    AWS::S3.new.buckets[bucket_name]
  end<commit_msg>refactor<commit_after># encoding utf-8

class Carto::Storage::S3
  def self.instance_if_enabled
    s3 = Carto::Storage::S3.new
    s3 if s3.config.present?
  end

  def initailize
    AWS::config(config) if config.present
  end

  def config
    @config ||= Cartodb.config.fetch(:aws, 's3')
  end

  private

  def bucket(bucket_name)
    AWS::S3.new.buckets[bucket_name]
  end
{'fraction_non_alphanumeric': 0.11544011544011544, 'fraction_numerical': 0.021645021645021644, 'mean_word_length': 3.4203821656050954, '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': '4973875', 'n_tokens_mistral': 270, 'n_tokens_neox': 261, 'n_words': 53}