def __init__(self, slots, has_conflict, name='', events=None, id=None): self.slots = slots self.has_conflict = has_conflict self.name = name self.avg_rating = get_avg_rating(slots) self.events = events or [] self.id = id
def get_tt_stats(timetable, day_to_usage): return { 'days_with_class': get_num_days(day_to_usage), 'time_on_campus': get_avg_day_length(day_to_usage), 'num_friends': get_num_friends(timetable), 'avg_rating': get_avg_rating(timetable) }
def get_tt_stats(timetable, day_to_usage): return { "days_with_class": get_num_days(day_to_usage), "time_on_campus": get_avg_day_length(day_to_usage), "num_friends": get_num_friends(timetable), "avg_rating": get_avg_rating(timetable), }