<commit_before>class Grid < Array

  def initialize(x, y, seed=[])
    super(x) { Array.new(y) { Cell.new(false) } }
    seed(seed)
  end

  def deep_copy
    Marshal.load(Marshal.dump(self))
  end

private
  def seed(pattern)
    pattern.each do |coords|
      x = coords[0]
      y = coords[1]
      self[x][y].live
    end
  end
end<commit_msg>refactor seed block to take advantage of block parameters<commit_after>class Grid < Array

  def initialize(x, y, seed=[])
    super(x) { Array.new(y) { Cell.new(false) } }
    seed(seed)
  end

  def deep_copy
    Marshal.load(Marshal.dump(self))
  end

private
  def seed(pattern)
    pattern.each do |x, y|
      self[x][y].live
    end
  end
end
{'fraction_non_alphanumeric': 0.1278735632183908, 'fraction_numerical': 0.0028735632183908046, 'mean_word_length': 2.82967032967033, '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': '6048095', 'n_tokens_mistral': 259, 'n_tokens_neox': 254, 'n_words': 64}