<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 rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
#   Mayor.create(name: 'Emanuel', city: cities.first)

puts "Drug information added"
[
  {:name => "ALCOHOL"},
  {:name => "COCAINE"},
  {:name => "CODEINE"},
  {:name => "ALPRAZOLAM (XANAX)"},
  {:name => "CONCENTRATED CANNABIS"},
  {:name => "DEXTROAMPHETAMINE (DEXEDRINE)"},
  {:name => "DIAZEPAM (VALIUM)"},
  {:name => "ECSTASY (MDMA)"},
  {:name => "HEROIN"},
  {:name => "HYDROCODONE (LORCET, LORITAB, NORCO, VICODIN)"},
  {:name => "LSD"},
  {:name => "MARIJUANA"},
  {:name => "MEPERIDINE (DEMEROL)"},
  {:name => "METHADONE"},
  {:name => "METHAMPHETAMINE"},
  {:name => "MORPHINE"},
  {:name => "OXYCODONE (OXYCONTIN, ROXICODONE, PERCOCET, PERCODAN)"},
  {:name => "PARAPHERNALIA"},
  {:name => "PROPOXPHENE (DARVOCET)"},
  {:name => "TOBACCO"},
  {:name => "UNKNOWN"},
].each do |attributes|
  Drug.find_or_create_by_name(attributes)
end

puts "Ethnicity information"
[
  {:name => "Unknown"},
  {:name => "White"},
  {:name => "Asian"},
  {:name => "Hispaic"},
  {:name => "Black"},
  {:name => "Other"},
].each do |attributes|
  Race.find_or_create_by_name(attributes)
end

puts "School Information"
[
  {:name => "Academy of the Canyons"},
  {:name => "<NAME> Junior High"},
  {:name => "Canyon High School"},
  {:name => "Bowman High School"},
  {:name => "Drop Out"},
  {:name => "Golden Oak Adult School"},
  {:name => "Golden Valley High School"},
  {:name => "Hart High School"},
  {:name => "Home School"},
  {:name => "La Mesa Junior High"},
  {:name => "Learning Post"},
  {:name => "Mission View"},
  {:name => "OFL: Canyon Country"},
  {:name => "OFL: Castaic"},
  {:name => "OFL: Valencia"},
  {:name => "Placerita Junior High"},
  {:name => "Ranco Pico Junior High"},
  {:name => "Rio Norte Junior High"},
  {:name => "Saugus High School"},
  {:name => "SCV Academy"},
  {:name => "SCV International"},
  {:name => "<NAME>"},
  {:name => "Sierra Vista Junior High"},
  {:name => "TLC - Transitional Learning Center"},
  {:name => "Valencia High School"},
  {:name => "West Ranch High School"},
].each do |attributes|
  School.find_or_create_by_name(attributes)
end

puts "Risk Status"
[
  {:status => "High"},
  {:status => "Medium"},
  {:status => "Low"},
].each do |attributes|
  RiskFactor.find_or_create_by_status(attributes)
end

puts "Crime Type"
[
  {:name => "415E"},
  {:name => "Arson"},
  {:name => "Burglary"},
  {:name => "Child Abuse"},
  {:name => "Chop Shop"},
  {:name => "Cruelty to Animals"},
  {:name => "Fraud"},
  {:name => "Mail Theft"},
  {:name => "Narco"},
  {:name => "Other"},
  {:name => "Prostitution"},
  {:name => "Suspicious Activity"},
  {:name => "Traffic Issues"},
  {:name => "Trespassing"},
  {:name => "Wanted Person"},
  {:name => "Weapons"},
].each do |attributes|
  Crime.find_or_create_by_name(attributes)
end

puts "Charge"
[
  {:name => "11350 HS"},
  {:name => "11351 HS"},
  {:name => "11357 HS"},
  {:name => "11358 HS"},
  {:name => "11360 HS"},
  {:name => "11364 HS"},
  {:name => "11365 HS"},
  {:name => "11377 HS"},
  {:name => "11378 HS"},
  {:name => "11559 HS"},
  {:name => "182 PC"},
  {:name => "211 PC"},
  {:name => "215 PC"},
  {:name => "242 PC"},
  {:name => "243.2 PC"},
  {:name => "245 PC"},
  {:name => "415 PC"},
  {:name => "459 PC"},
  {:name => "484 PC"},
  {:name => "487 PC"},
  {:name => "496 PC"},
  {:name => "594 PC"},
  {:name => "626.10 PC"},
  {:name => "12020 PC"},
  {:name => "12031 PC"},
  {:name => "626.10 PC"},
  {:name => "12020 PC"},
  {:name => "12031 PC"},
  {:name => "10851 CVC"},
  {:name => "114601 CVC"},
  {:name => "40508 CVC"},
  {:name => "23222 CVC"},
  {:name => "2800 CVC"},
].each do |attributes|
  Charge.find_or_create_by_name(attributes)
end

puts "Assign"
[
  {:team =>"60f"},
  {:team =>"CIT"},
  {:team =>"D.B."},
  {:team =>"J-Team"},
  {:team =>"Narco"},
  {:team =>"Off Road Team"},
  {:team =>"Other"},
  {:team =>"Patrol"},
  {:team =>"SRD"},
  {:team =>"Traffic"},
  {:team =>"Zone 1"},
  {:team =>"Zone 2"},
  {:team =>"Zone 3"},
  {:team =>"Zone 4"},
  {:team =>"Zone 5"},
  {:team =>"Zone 6"},
  {:team =>"Zone 7"},
  {:team =>"Zone 8"},
].each do |attributes|
  Assign.find_or_create_by_team(attributes)
end

#Load Development Seed data
if Rails.env != 'production'
require 'faker'
require 'factory_girl_rails'

puts "adding 10 users"
  10.times {
    user = Factory(:user, :first_name => Faker::Name.first_name,:last_name => Faker::Name.last_name,
                   :school_deputy => Random.rand(2), :tip_deputy => Random.rand(2))
    puts "Added #{user.email}"
    }

puts "adding 100 students"
  100.times {<commit_msg>Set seeds to use Zones<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 rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
#   Mayor.create(name: 'Emanuel', city: cities.first)

puts "Drug information added"
[
  {:name => "ALCOHOL"},
  {:name => "COCAINE"},
  {:name => "CODEINE"},
  {:name => "ALPRAZOLAM (XANAX)"},
  {:name => "CONCENTRATED CANNABIS"},
  {:name => "DEXTROAMPHETAMINE (DEXEDRINE)"},
  {:name => "DIAZEPAM (VALIUM)"},
  {:name => "ECSTASY (MDMA)"},
  {:name => "HEROIN"},
  {:name => "HYDROCODONE (LORCET, LORITAB, NORCO, VICODIN)"},
  {:name => "LSD"},
  {:name => "MARIJUANA"},
  {:name => "<NAME>)"},
  {:name => "METHADONE"},
  {:name => "METHAMPHETAMINE"},
  {:name => "MORPHINE"},
  {:name => "OXYCODONE (OXYCONTIN, ROXICODONE, PERCOCET, PERCODAN)"},
  {:name => "PARAPHERNALIA"},
  {:name => "PROPOXPHENE (DARVOCET)"},
  {:name => "TOBACCO"},
  {:name => "UNKNOWN"},
].each do |attributes|
  Drug.find_or_create_by_name(attributes)
end

puts "Ethnicity information"
[
  {:name => "Unknown"},
  {:name => "White"},
  {:name => "Asian"},
  {:name => "Hispaic"},
  {:name => "Black"},
  {:name => "Other"},
].each do |attributes|
  Race.find_or_create_by_name(attributes)
end

puts "School Information"
[
  {:name => "Academy of the Canyons"},
  {:name => "Arroyo Seco Junior High"},
  {:name => "Canyon High School"},
  {:name => "Bowman High School"},
  {:name => "Drop Out"},
  {:name => "Golden Oak Adult School"},
  {:name => "Golden Valley High School"},
  {:name => "Hart High School"},
  {:name => "Home School"},
  {:name => "La Mesa Junior High"},
  {:name => "Learning Post"},
  {:name => "Mission View"},
  {:name => "OFL: Canyon Country"},
  {:name => "OFL: Castaic"},
  {:name => "OFL: Valencia"},
  {:name => "Placerita Junior High"},
  {:name => "Ranco Pico Junior High"},
  {:name => "Rio Norte Junior High"},
  {:name => "Saugus High School"},
  {:name => "SCV Academy"},
  {:name => "SCV International"},
  {:name => "Sequoia Charter"},
  {:name => "Sierra Vista Junior High"},
  {:name => "TLC - Transitional Learning Center"},
  {:name => "Valencia High School"},
  {:name => "West Ranch High School"},
].each do |attributes|
  School.find_or_create_by_name(attributes)
end

puts "Risk Status"
[
  {:status => "High"},
  {:status => "Medium"},
  {:status => "Low"},
].each do |attributes|
  RiskFactor.find_or_create_by_status(attributes)
end

puts "Crime Type"
[
  {:name => "415E"},
  {:name => "Arson"},
  {:name => "Burglary"},
  {:name => "Child Abuse"},
  {:name => "Chop Shop"},
  {:name => "Cruelty to Animals"},
  {:name => "Fraud"},
  {:name => "Mail Theft"},
  {:name => "Narco"},
  {:name => "Other"},
  {:name => "Prostitution"},
  {:name => "Suspicious Activity"},
  {:name => "Traffic Issues"},
  {:name => "Trespassing"},
  {:name => "Wanted Person"},
  {:name => "Weapons"},
].each do |attributes|
  Crime.find_or_create_by_name(attributes)
end

puts "Charge"
[
  {:name => "11350 HS"},
  {:name => "11351 HS"},
  {:name => "11357 HS"},
  {:name => "11358 HS"},
  {:name => "11360 HS"},
  {:name => "11364 HS"},
  {:name => "11365 HS"},
  {:name => "11377 HS"},
  {:name => "11378 HS"},
  {:name => "11559 HS"},
  {:name => "182 PC"},
  {:name => "211 PC"},
  {:name => "215 PC"},
  {:name => "242 PC"},
  {:name => "243.2 PC"},
  {:name => "245 PC"},
  {:name => "415 PC"},
  {:name => "459 PC"},
  {:name => "484 PC"},
  {:name => "487 PC"},
  {:name => "496 PC"},
  {:name => "594 PC"},
  {:name => "626.10 PC"},
  {:name => "12020 PC"},
  {:name => "12031 PC"},
  {:name => "626.10 PC"},
  {:name => "12020 PC"},
  {:name => "12031 PC"},
  {:name => "10851 CVC"},
  {:name => "114601 CVC"},
  {:name => "40508 CVC"},
  {:name => "23222 CVC"},
  {:name => "2800 CVC"},
].each do |attributes|
  Charge.find_or_create_by_name(attributes)
end

puts "Assign"
[
  {:team =>"60f"},
  {:team =>"CIT"},
  {:team =>"D.B."},
  {:team =>"J-Team"},
  {:team =>"Narco"},
  {:team =>"Off Road Team"},
  {:team =>"Other"},
  {:team =>"Patrol"},
  {:team =>"SRD"},
  {:team =>"Traffic"},
].each do |attributes|
  Assign.find_or_create_by_team(attributes)
end

puts "Zone"
[
  {:name =>"Zone 1"},
  {:name =>"Zone 2"},
  {:name =>"Zone 3"},
  {:name =>"Zone 4"},
  {:name =>"Zone 5"},
  {:name =>"Zone 6"},
  {:name =>"Zone 7"},
  {:name =>"Zone 8"},
].each do |attributes|
  Zone.find_or_create_by_name(attributes)
end

#Load Development Seed data
if Rails.env != 'production'
require 'faker'
require 'factory_girl_rails'

puts "adding 10 users"
  10.times {
    user = Factory(:user, :first_name => Faker::Name.first_name,:last_name => Faker::Name.last_name,
                   :school_deputy => Random.rand(2), :tip_deputy => Random.rand(2))
    puts "Added #{user.email}"
    }

puts "adding 100 students"
  100.times {
{'fraction_non_alphanumeric': 0.24243347552305505, 'fraction_numerical': 0.033922405037578714, 'mean_word_length': 4.021417644059153, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 260, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '44796', 'n_tokens_mistral': 4246, 'n_tokens_neox': 3935, 'n_words': 1006}