<commit_before>require "rexml/document"

i = 0
user = User.new(email: <EMAIL>", password: "password")
i += 1
user.assign_attributes({
  name: "山田太郎",
  phone: "000-0000-000",
  pref: "東京都",
  city: "千代田区",
  address: "丸の内1-9-2"
})
user.save!

f = File.open(File.join(Rails.root, "db", "shops.xml"))
shops = REXML::Document.new(f)

shops.elements.each("Results/Shop") do |s|
  shop = Shop.new(email: <EMAIL>", password: "password")
  i += 1
  full_address = s.elements["ShopAddress"].text
  pref, city, address = /^(.+?[都道府県])(.+?[市区町村])(.*)$/.match(full_address)
  shop.assign_attributes({
    name: s.elements["ShopName"].text,
    phone: "000-0000-000",
    pref: s.elements["LargeAreaName"].text,
    city: s.elements["MiddleAreaName"].text,
    address: s.elements["SmallAreaName"].text,
    open_at: "#{Random.new.rand(6) + 6}:00",
    close_at: "#{Random.new.rand(7) + 17}:00"
  })
  # 店に10品の食品、店の価格グレードを4種類想定
  # 0. 低価格店 200-700円
  # 1. 中価格店 600-1100円
  # 2. 高価格店 1000-1500円
  # 3. 全てを含んだ店 200-1500円
  shop_grade = Random.new.rand(4)
  menus = []
  10.times do |j|
    case shop_grade
    when 0
      name = "低価格セット #{j}"
      price = (Random.new.rand(51) + 20) * 10
    when 1<commit_msg>fix seeds<commit_after>require "rexml/document"

i = 0
user = User.new(email: <EMAIL>", password: "password")
i += 1
user.assign_attributes({
  name: "山田太郎",
  phone: "000-0000-000",
  pref: "東京都",
  city: "千代田区",
  address: "丸の内1-9-2"
})
user.save!

f = File.open(File.join(Rails.root, "db", "shops.xml"))
shops = REXML::Document.new(f)

shops.elements.each("Results/Shop") do |s|
  shop = Shop.new(email: <EMAIL>", password: "password")
  i += 1
  full_address = s.elements["ShopAddress"].text
  pref, city, address = /^(.+?[都道府県])(.+?[市区町村])(.*)$/.match(full_address)
  shop.assign_attributes({
    name: s.elements["ShopName"].text,
    phone: "000-0000-000",
    pref: pref
    city: city
    address: address
    open_at: "#{Random.new.rand(6) + 6}:00",
    close_at: "#{Random.new.rand(7) + 17}:00"
  })
  # 店に10品の食品、店の価格グレードを4種類想定
  # 0. 低価格店 200-700円
  # 1. 中価格店 600-1100円
  # 2. 高価格店 1000-1500円
  # 3. 全てを含んだ店 200-1500円
  shop_grade = Random.new.rand(4)
  menus = []
  10.times do |j|
    case shop_grade
    when 0
      name = "低価格セット #{j}"
      price = (Random.new.rand(51) + 20) * 10
    when 1
{'fraction_non_alphanumeric': 0.19722583441699176, 'fraction_numerical': 0.07022106631989597, 'mean_word_length': 3.404580152671756, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6904011', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1085, 'n_words': 188}