<commit_before>#!/usr/bin/ruby -KU
#coding:utf-8
# frozen_string_literal: true

class Object
  def xor(val1)
    val0 = (not not self)
    ((val0) and (not val1)) or ((not val0) and (val1))
  end

  def co(method, *args) #calls any method
    eval "#{method}(*args)"
  end

  def to_sym
    to_s.to_sym
  end

  def parse_opts(opts)
    v = {}
    opts.each do |opt|
      case opt.class.to_s.to_sym
      when :Hash
        opt.each do |x, y|
          v[x] = y
        end
      when :Array
        opt.each do |x|
          v[x] = true
        end
      when :Symbol
        v[opt] = true
      end
    end
    v
  end

  def apply_opts(opts)
    parse_opts(opts).each do |x, y| self.instance_variable_set("@#{x}".to_sym, y)end
  end
end

class NilClass
  def =~(value)
    value == nil
  end

  def +(value)
    value
  end

  def <<(value)
    [value]
  end

  def empty?
    true
  end

  def to_i
    0
  end
  alias ord to_i

  def size
    0
  end
<commit_msg>Auto corrected by following Lint Ruby Style/NilComparison<commit_after>#!/usr/bin/ruby -KU
#coding:utf-8
# frozen_string_literal: true

class Object
  def xor(val1)
    val0 = (not not self)
    ((val0) and (not val1)) or ((not val0) and (val1))
  end

  def co(method, *args) #calls any method
    eval "#{method}(*args)"
  end

  def to_sym
    to_s.to_sym
  end

  def parse_opts(opts)
    v = {}
    opts.each do |opt|
      case opt.class.to_s.to_sym
      when :Hash
        opt.each do |x, y|
          v[x] = y
        end
      when :Array
        opt.each do |x|
          v[x] = true
        end
      when :Symbol
        v[opt] = true
      end
    end
    v
  end

  def apply_opts(opts)
    parse_opts(opts).each do |x, y| self.instance_variable_set("@#{x}".to_sym, y)end
  end
end

class NilClass
  def =~(value)
    value.nil?
  end

  def +(value)
    value
  end

  def <<(value)
    [value]
  end

  def empty?
    true
  end

  def to_i
    0
  end
  alias ord to_i

  def size
    0
  end

{'fraction_non_alphanumeric': 0.11161616161616161, 'fraction_numerical': 0.00909090909090909, 'mean_word_length': 1.891970802919708, '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': '1261559', 'n_tokens_mistral': 800, 'n_tokens_neox': 775, 'n_words': 223}