<commit_before>require 'csv'

def create_users
  60.times.map do |i|
    User.create(name: "User_#{i}", email: "<EMAIL>")
  end
end

def create_parks_from_csv(path)
  CSV.foreach(path, headers: true).map do |row|
    park = Hash[row]
    next unless park['address']

    name = park['name'] ? park['name'] : park['city']
    Skatepark.create(
      name: name, address: park['address'], state: park['state'])
  end<commit_msg>Change parks_from_csv to fix heroku error<commit_after>require 'csv'

def create_users
  60.times.map do |i|
    User.create(name: "User_#{i}", email: "<EMAIL>")
  end
end

# Using this method because mapping the foreach enumerable throw
# an error on heroku
def create_parks_from_csv(path)
  parks = []
  CSV.foreach(path, headers: true) do |row|
    park = Hash[row]
    next unless park['address']

    name = park['name'] ? park['name'] : park['city']
    parks << Skatepark.create(
      name: name, address: park['address'], state: park['state'])
  end
{'fraction_non_alphanumeric': 0.1524390243902439, 'fraction_numerical': 0.0040650406504065045, 'mean_word_length': 4.103626943005182, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '6287750', 'n_tokens_mistral': 338, 'n_tokens_neox': 339, 'n_words': 93}