<commit_before>require 'net/http'
require 'openssl'
require 'base64'
require 'date'
require 'erb'

module GoogleMaps
  module Services

    module HashDot
      def method_missing(method, *opts)
        m = method.to_s
        if self.has_key?(m)
          return self[m]
        elsif self.has_key?(m.to_sym)
          return self[m.to_sym]
        end
        super
      end
    end

    # Performs Array boxing.
    class ArrayBox
      # Wrap its argument in an array unless it is already an array or (array-like).
      #
      # @param [Object] object Object to wrap.
      # @example Wrap any Object in a array
      #   ArrayBox.wrap(nil)       # []
      #   ArrayBox.wrap([1, 2, 3]) # [1, 2, 3]
      #   ArrayBox.wrap(1)         # [1]
      #
      # @return [Array] an array.
      def self.wrap(object)
        if object.nil?
          []
        elsif object.respond_to? :to_ary
          object.to_ary || [object]
        else
          [object]
        end
      end
    end

    # Set of utility methods.
    class Util
      # Returns the current time
      #
      # Rails extends the Time and DateTime objects, and includes the "current" property
      # for retrieving the time the Rails environment is set to (default = UTC), as opposed to
      # the server time (Could be anything).
      #
      # @return [Time] a new Time object for the current time.
      def self.current_time
        (Time.respond_to? :current) ? Time.current : Time.now
      end

      # Returns the current UTC time.
      #
      # @return [Time] a new Time object for the current UTC (GMT) time.
      def self.current_utctime<commit_msg>:sparkles: Adds check if one array contains all elements of another array<commit_after>require 'net/http'
require 'openssl'
require 'base64'
require 'date'
require 'erb'

module GoogleMaps
  module Services

    module HashDot
      def method_missing(method, *opts)
        m = method.to_s
        if self.has_key?(m)
          return self[m]
        elsif self.has_key?(m.to_sym)
          return self[m.to_sym]
        end
        super
      end
    end

    # Performs Array boxing.
    class ArrayBox
      # Wrap its argument in an array unless it is already an array or (array-like).
      #
      # @param [Object] object Object to wrap.
      # @example Wrap any Object in a array
      #   ArrayBox.wrap(nil)       # []
      #   ArrayBox.wrap([1, 2, 3]) # [1, 2, 3]
      #   ArrayBox.wrap(1)         # [1]
      #
      # @return [Array] an array.
      def self.wrap(object)
        if object.nil?
          []
        elsif object.respond_to? :to_ary
          object.to_ary || [object]
        else
          [object]
        end
      end

      # Determines if one array contains all elements of another array.
      #
      # @param [Array] arr target array.
      # @param [Array] other array to look for in the target array.
      # @example
      #   myarr = ["hello", "world"]
      #   ArrayBox.contains_all? myarr, ["hello"] # true
      #
      # @return [TrueClass, FalseClass] a boolean.
      def self.contains_all?(arr, other)
        h = arr.inject(Hash.new(0)) {|h, i| h[i] += 1; h}
        other.each do |i|
          return false unless h.has_key?(i)
          return false if h[i].zero?
          h[i] -= 1
        end
        return true
      end
    end

    # Set of utility methods.
    class Util
      # Returns the current time
      #
      # Rails extends the Time and DateTime objects, and includes the "current" property
      # for retrieving the time the Rails environment is set to (default = UTC), as opposed to
      # the server time (Could be anything).
      #
      # @return [Time] a new Time object for the current time.
      def self.current_time
        (Time.respond_to? :current) ? Time.current : Time.now
      end

      # Returns the current UTC time.
      #
      # @return [Time] a new Time object for the current UTC (GMT) time.
      def self.current_utctime
{'fraction_non_alphanumeric': 0.09193954659949623, 'fraction_numerical': 0.005793450881612091, 'mean_word_length': 1.8838053740014524, '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': '4645793', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1190, 'n_words': 418}