<commit_before>module Jekyll
  module Invoice
    class Invoice
      def initialize(date)
        @date = date
        @lines = []
        @rates = {}
        @tax_rates = {}
      end

      attr_reader :date, :lines, :rates, :tax_rates
      attr_accessor :tax_type

      def add(line)
        @lines << line
      end

      def set_rate(unit, rate)
        @rates[unit] = rate
      end

      def tax_rates=(tax_rates)
        @tax_rates = Utils.effective(tax_rates, date)
      end

      def tax_rate
        if tax_type
          tax_rates[tax_type.to_s]
        else
          0
        end
      end

      def net_total
        @lines.map(&:amount).reduce(0, :+)
      end

      def tax
        @lines.map(&:tax).reduce(0, :+)
      end

      def total
        net_total + tax
      end

      class Processor
        # Convenient single character short-hand
        H = 0.5

        def initialize(invoice)
          @invoice = invoice<commit_msg>Add 'Q' as short hand for quarter day<commit_after>module Jekyll
  module Invoice
    class Invoice
      def initialize(date)
        @date = date
        @lines = []
        @rates = {}
        @tax_rates = {}
      end

      attr_reader :date, :lines, :rates, :tax_rates
      attr_accessor :tax_type

      def add(line)
        @lines << line
      end

      def set_rate(unit, rate)
        @rates[unit] = rate
      end

      def tax_rates=(tax_rates)
        @tax_rates = Utils.effective(tax_rates, date)
      end

      def tax_rate
        if tax_type
          tax_rates[tax_type.to_s]
        else
          0
        end
      end

      def net_total
        @lines.map(&:amount).reduce(0, :+)
      end

      def tax
        @lines.map(&:tax).reduce(0, :+)
      end

      def total
        net_total + tax
      end

      class Processor
        # Convenient single character short-hand
        H = 0.5
        Q = 0.25

        def initialize(invoice)
          @invoice = invoice
{'fraction_non_alphanumeric': 0.08744280630401627, 'fraction_numerical': 0.0066090493136756485, 'mean_word_length': 1.5038167938931297, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2619782', 'n_tokens_mistral': 657, 'n_tokens_neox': 602, 'n_words': 152}