<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)
#always builds times from August 2nd
def time(day, time)
  hour = time.split(':').first.to_i
  min = time.split(':').last.to_i
  DateTime.new(2015,8,day,hour,min).in_time_zone
end

user = User.create!(email: '<EMAIL>', password: '<PASSWORD>')
user2 = User.create!(email: '<EMAIL>', password: '<PASSWORD>')

c = Course.create(title: 'Rocket Science')
c2 = Course.create(title: 'Underwater Basket Weaving')
learning = Role.create(role_name: 'student')
teaching = Role.create(role_name: 'educator')
cp = CourseParticipant.create(role: learning, course_id: c.id, user_id: user.id)
CourseParticipant.create(role: teaching, course: c2, user: user)


WeeklyTimeBlock.create(from: time(3,'9:00'), to: time(3,'11:00'), course_participant_id: cp.id)
WeeklyTimeBlock.create(from: time(4,'12:00'), to: time(4,'13:00'), course_participant_id: cp.id)
WeeklyTimeBlock.create(from: time(2,'12:00'), to: time(2,'13:00'))
WeeklyTimeBlock.create(from: time(4,'22:00'), to: time(5,'23:00'), course_participant_id: cp.id)
<commit_msg>make seeds confirm users<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)
#always builds times from August 2nd
def time(day, time)
  hour = time.split(':').first.to_i
  min = time.split(':').last.to_i
  DateTime.new(2015,8,day,hour,min).in_time_zone
end

user = User.create!(email: '<EMAIL>', password: '<PASSWORD>')
user2 = User.create!(email: '<EMAIL>', password: '<PASSWORD>')
user.confirm!
user2.confirm!

c = Course.create(title: 'Rocket Science')
c2 = Course.create(title: 'Underwater Basket Weaving')
learning = Role.create(role_name: 'student')
teaching = Role.create(role_name: 'educator')
cp = CourseParticipant.create(role: learning, course_id: c.id, user_id: user.id)
CourseParticipant.create(role: teaching, course: c2, user: user)


WeeklyTimeBlock.create(from: time(3,'9:00'), to: time(3,'11:00'), course_participant_id: cp.id)
WeeklyTimeBlock.create(from: time(4,'12:00'), to: time(4,'13:00'), course_participant_id: cp.id)
WeeklyTimeBlock.create(from: time(2,'12:00'), to: time(2,'13:00'))
WeeklyTimeBlock.create(from: time(4,'22:00'), to: time(5,'23:00'), course_participant_id: cp.id)

{'fraction_non_alphanumeric': 0.1689432063263839, 'fraction_numerical': 0.03486700215672178, 'mean_word_length': 6.401595744680851, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2581167', 'n_tokens_mistral': 1023, 'n_tokens_neox': 974, 'n_words': 247}