<commit_before>module Nexpose

  class Global_Blackout < APIObject
    include JsonSerializer

    # [Array] Blackout starting dates, times and duration for blackout periods.
    attr_accessor :blackout

    def initialize(blackout)
      @global_blackout = Array(blackout)
    end

    def save(nsc)
      params = to_json
      JSON.parse(AJAX.post(nsc, '/api/2.1/silo_blackout/', params, AJAX::CONTENT_TYPE::JSON))
    end

    def to_h
      {
          blackouts:
              (@global_blackout || []).map { |blackout| blackout.to_h }
      }
    end

    def to_json
      JSON.generate(to_h)
    end
<commit_msg>Renaming class Global_Blackout to GlobalBlackout<commit_after>module Nexpose

  class GlobalBlackout < APIObject
    include JsonSerializer

    # [Array] Blackout starting dates, times and duration for blackout periods.
    attr_accessor :blackout

    def initialize(blackout)
      @global_blackout = Array(blackout)
    end

    def save(nsc)
      params = to_json
      JSON.parse(AJAX.post(nsc, '/api/2.1/silo_blackout/', params, AJAX::CONTENT_TYPE::JSON))
    end

    def to_h
      {
          blackouts:
              (@global_blackout || []).map { |blackout| blackout.to_h }
      }
    end

    def to_json
      JSON.generate(to_h)
    end

{'fraction_non_alphanumeric': 0.09105180533751962, 'fraction_numerical': 0.0031397174254317113, 'mean_word_length': 2.551532033426184, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7366512', 'n_tokens_mistral': 427, 'n_tokens_neox': 407, 'n_words': 94}