<commit_before>class Table
  attr_accessor :conn, :name, :indexes, :foreign_keys

  def initialize(conn, name)
    @conn=conn
    @name=name
  end

  def columns
    @conn.schema(@name)
  end

  def indexes
    @conn.indexes(@name)
  end

  def foreign_keys(name)
    @conn.foreign_key_list(name)
  end

  def data(count=50)
    @conn[@name.to_sym].first(count)
  end

  def primary_key
    columns.select{|x| x[1][:primary_key]}
  end
end<commit_msg>update foreign_keys to pull name from self<commit_after>class Table
  attr_accessor :conn, :name, :indexes, :foreign_keys

  def initialize(conn, name)
    @conn=conn
    @name=name
  end

  def columns
    @conn.schema(@name)
  end

  def indexes
    @conn.indexes(@name)
  end

  def foreign_keys
    @conn.foreign_key_list(@name)
  end

  def data(count=50)
    @conn[@name.to_sym].first(count)
  end

  def primary_key
    columns.select{|x| x[1][:primary_key]}
  end
end
{'fraction_non_alphanumeric': 0.11555075593952484, 'fraction_numerical': 0.0064794816414686825, 'mean_word_length': 3.4782608695652173, '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': '613909', 'n_tokens_mistral': 362, 'n_tokens_neox': 339, 'n_words': 75}