<commit_before># This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

default = Organization.create(id: 1, title: 'Default', public: false)
google = Organization.create(id: 2, title: 'Google')
yandex = Organization.create(id: 3, title: 'Yandex')
meduza = Organization.create(id: 4, title: 'Meduza')

admin = User.create(
  name: 'admin',
  username: 'admin',
  email: '<EMAIL>',
  organization: default,
  password: 'password'
)

[google, yandex, meduza].each do |organization|
  5.times do |i|
    name = Faker::Name.name
    User.create(
      name: name,
      username: Faker::Internet.user_name(name),
      email: Faker::Internet.email(name),
      organization: organization,
      password: 'password'
    )
  end
end

items = []
50.times do |i|
  items << Item.create(
    title: Faker::Food.ingredient,
    course: rand(3).ceil,
    image: Faker::LoremPixel.image("150x150", false, 'food', (rand(10) + 1)),
  )
end

weekly_menu = WeeklyMenu::WeeklyMenu.new
prices = []
1000.times do |i|
  prices << Price.create(
    item: items.sample,
    organization: Organization.list_public.sample,
    value: Faker::Number.decimal(5, 2),<commit_msg>Small down seeds<commit_after># This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

default = Organization.create(id: 1, title: 'Default', public: false)
google = Organization.create(id: 2, title: 'Google')
yandex = Organization.create(id: 3, title: 'Yandex')
meduza = Organization.create(id: 4, title: 'Meduza')

admin = User.create(
  name: 'admin',
  username: 'admin',
  email: '<EMAIL>',
  organization: default,
  password: 'password'
)

[google, yandex, meduza].each do |organization|
  3.times do |i|
    name = Faker::Name.name
    User.create(
      name: name,
      username: Faker::Internet.user_name(name),
      email: Faker::Internet.email(name),
      organization: organization,
      password: 'password'
    )
  end
end

items = []
20.times do |i|
  items << Item.create(
    title: Faker::Food.ingredient,
    course: rand(3).ceil,
    image: Faker::LoremPixel.image("150x150", false, 'food', (rand(10) + 1)),
  )
end

weekly_menu = WeeklyMenu::WeeklyMenu.new
prices = []
5.times do |i|
  prices << Price.create(
    item: items.sample,
    organization: Organization.list_public.sample,
    value: Faker::Number.decimal(5, 2),
{'fraction_non_alphanumeric': 0.1440273037542662, 'fraction_numerical': 0.014675767918088738, 'mean_word_length': 4.044750430292599, 'pattern_counts': {'":': 0, '<': 13, '<?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': '7165214', 'n_tokens_mistral': 1004, 'n_tokens_neox': 964, 'n_words': 281}