<commit_before>
class Object

  def instance_variable_hash
    h = {}
    self.instance_variables.each { |k| h[k] = self.instance_variable_get(k) }
    return h
  end

end

class String

  def starts_with?(other)
    other = other.to_str
    head = self[0, other.length]
    head == other
  end

  def ends_with?(other)
    other = other.to_str
    tail = self[-1 * other.length, other.length]
    tail == other
  end

end<commit_msg>[project @ Remove unused code from openid/extras]<commit_after>class String
  def starts_with?(other)
    head = self[0, other.length]
    head == other
  end

  def ends_with?(other)
    tail = self[-1 * other.length, other.length]
    tail == other
  end
end
{'fraction_non_alphanumeric': 0.10806916426512968, 'fraction_numerical': 0.005763688760806916, 'mean_word_length': 3.0173410404624277, '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': '4512720', 'n_tokens_mistral': 240, 'n_tokens_neox': 238, 'n_words': 62}