<commit_before>namespace :db do
  desc "Fill database with sample data"
  task  populate: :environment do
    admin= User.create!(name: "Example User",
                        email: "<EMAIL>",
                        password: "<PASSWORD>",
                        password_confirmation: "<PASSWORD>")
    admin.toggle!(:admin)
    User.create!(name: "Example User",
                 email: "<EMAIL>",
                 password: "<PASSWORD>",
                 password_confirmation: "<PASSWORD>")
    99.times do |n|
      name = Faker::Name.name
      email = "<EMAIL>"
      password = "password"
      User.create!(name: name,
                   email: email,
                   password: password,
                   password_confirmation: password)
    end
    
    users = User.all(limit: 6)
    50.times do
      description = Faker::Lorem.sentence(1)
      serial = "ABC123"
      status = "allocated"
      type   = "laptop"
      users.each { |user| user.assets.create!(asset_description: description, serial_no: serial,
                                              status: status, asset_type: type, date_purchased: created_at) }
    end
  end
end<commit_msg>fixed slight issue with sample data (again)<commit_after>namespace :db do
  desc "Fill database with sample data"
  task  populate: :environment do
    admin= User.create!(name: "Example User",
                        email: "<EMAIL>",
                        password: "<PASSWORD>",
                        password_confirmation: "<PASSWORD>")
    admin.toggle!(:admin)
    User.create!(name: "Example User",
                 email: "<EMAIL>",
                 password: "<PASSWORD>",
                 password_confirmation: "<PASSWORD>")
    99.times do |n|
      name = Faker::Name.name
      email = "<EMAIL>"
      password = "password"
      User.create!(name: name,
                   email: email,
                   password: password,
                   password_confirmation: password)
    end
    
    users = User.all(limit: 6)
    50.times do
      description = Faker::Lorem.sentence(1)
      serial = "ABC123"
      status = "allocated"
      type   = "laptop"
      date   = "15/05/12"
      users.each { |user| user.assets.create!(asset_description: description, serial_no: serial,
                                              status: status, asset_type: type, date_purchased: date) }
    end
  end
end
{'fraction_non_alphanumeric': 0.11162207357859531, 'fraction_numerical': 0.010033444816053512, 'mean_word_length': 1.7442660550458715, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '486768', 'n_tokens_mistral': 660, 'n_tokens_neox': 631, 'n_words': 165}