<commit_before># http://codesnippets.joyent.com/posts/show/7546
class IPAddr
  PRIVATE_RANGES = [
    IPAddr.new('127.0.0.1/32'),
    IPAddr.new('10.0.0.0/8'),
    IPAddr.new('172.16.0.0/12'),
    IPAddr.new('192.168.0.0/16')
  ]
  
  def private?
    return false unless self.ipv4?
    PRIVATE_RANGES.any? { |ipr| ipr.include? self }
  end

  def public?
    !private?
  end
end<commit_msg>clarify the extensions to IPAddr... it's about routeability<commit_after># http://codesnippets.joyent.com/posts/show/7546
class IPAddr
  UNROUTEABLE_RANGES = [
    IPAddr.new('127.0.0.1/32'),
    IPAddr.new('10.0.0.0/8'),
    IPAddr.new('172.16.0.0/12'),
    IPAddr.new('192.168.0.0/16')
  ]
  
  def unrouteable?
    return false unless self.ipv4?
    UNROUTEABLE_RANGES.any? { |ipr| ipr.include? self }
  end

  def routeable?
    !unrouteable?
  end
end
{'fraction_non_alphanumeric': 0.1652892561983471, 'fraction_numerical': 0.089728453364817, 'mean_word_length': 2.9078341013824884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '5274807', 'n_tokens_mistral': 398, 'n_tokens_neox': 364, 'n_words': 56}