<commit_before>module DC
  module Store
    
    # An implementation of an AssetStore.
    module S3Store
      
      WEB_URL     = /\Ahttps?:\/\//
      BUCKET_NAME = "dcloud_#{RAILS_ENV}"
      
      def initialize
        @key, @secret = SECRETS['aws_access_key'], SECRETS['aws_secret_key']
      end
      
      def save(document)
        save_pdf(document)
        save_images(document)
        save_full_text(document)
      end
      
      def full_text_for(document)
        bucket.get(prefix(document, 'full_text.txt')).data
      end
      
      def destroy(document)
        bucket.delete_folder("docs/#{document.id}")
      end
      
      # Delete the assets store entirely.
      def delete_database!
        bucket.delete_folder("docs")
      end
      
      
      private 
      
      def bucket<commit_msg>right aws docs are out of date -- don't need to call data<commit_after>module DC
  module Store
    
    # An implementation of an AssetStore.
    module S3Store
      
      WEB_URL     = /\Ahttps?:\/\//
      BUCKET_NAME = "dcloud_#{RAILS_ENV}"
      
      def initialize
        @key, @secret = SECRETS['aws_access_key'], SECRETS['aws_secret_key']
      end
      
      def save(document)
        save_pdf(document)
        save_images(document)
        save_full_text(document)
      end
      
      def full_text_for(document)
        bucket.get(prefix(document, 'full_text.txt'))
      end
      
      def destroy(document)
        bucket.delete_folder("docs/#{document.id}")
      end
      
      # Delete the assets store entirely.
      def delete_database!
        bucket.delete_folder("docs")
      end
      
      
      private 
      
      def bucket
{'fraction_non_alphanumeric': 0.08807985907222549, 'fraction_numerical': 0.0011743981209630064, 'mean_word_length': 1.7934426229508196, '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': '4193280', 'n_tokens_mistral': 515, 'n_tokens_neox': 514, 'n_words': 108}