<commit_before>from major import Major
from concentration import Concentration
from course import Course, getCourse
from standing import Standing
from ID import ID
from requirement import fol_t

from collections import OrderedDict
from yaml import load, dump
try:
    from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
    from yaml import Loader, Dumper

from helpers import get_list_as_english, get_readable_list

class Student:
	name = ""
	start_year = 0
	end_year = 0

	majors = []
	concentrations = []
	courses = {}
	standing = Standing()

	def __init__(self, filename=""):
		self.create_student_from_yaml(filename)

	def create_student_from_yaml(self, filename):
		with open(filename) as infile:
			data = load(infile, Loader=Loader)

			if 'name' in data:
				self.name = data['name']

			if 'start' in data:
				self.start_year = data['start']
			if 'end' in data:
				self.end_year = data['end']

			if 'majors' in data:
				for major_name in data['majors']:
					self.addMajor(major_name)

			if 'concentrations' in data:
				if not data['concentrations']:
					print("You don't have any concentrations?")
				else:
					for concentration_name in data['concentrations']:
						self.addConcentration(concentration_name)

			if 'courses' in data:
				if not data['courses']:
					print("You don't have any courses?")
				else:
					self.set_up_courses(data['courses'])
					for year in data['courses']:
						shortyear = int(year[:4])
						for semester in data['courses'][year]:
							semester = self.check_semester_name(semester)
							for course_name in data['courses'][year][semester]:
								course = getCourse(course_name, shortyear, semester)
								if not course:
									print(course_name)
									print("A bad course identifier was passed.")
									break
								self.standing.increment(course.credits)<commit_msg>Update some help text.<commit_after>from major import Major
from concentration import Concentration
from course import Course, getCourse
from standing import Standing
from ID import ID
from requirement import fol_t

from collections import OrderedDict
from yaml import load, dump
try:
    from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
    from yaml import Loader, Dumper

from helpers import get_list_as_english, get_readable_list

class Student:
	name = ""
	start_year = 0
	end_year = 0

	majors = []
	concentrations = []
	courses = {}
	standing = Standing()

	def __init__(self, filename=""):
		self.create_student_from_yaml(filename)

	def create_student_from_yaml(self, filename):
		with open(filename) as infile:
			data = load(infile, Loader=Loader)

			if 'name' in data:
				self.name = data['name']

			if 'start' in data:
				self.start_year = data['start']
			if 'end' in data:
				self.end_year = data['end']

			if 'majors' in data:
				for major_name in data['majors']:
					self.addMajor(major_name)

			if 'concentrations' in data:
				if not data['concentrations']:
					print("You don't have any concentrations?")
				else:
					for concentration_name in data['concentrations']:
						self.addConcentration(concentration_name)

			if 'courses' in data:
				if not data['courses']:
					print("You haven't taken any courses?")
				else:
					self.set_up_courses(data['courses'])
					for year in data['courses']:
						shortyear = int(year[:4])
						for semester in data['courses'][year]:
							semester = self.check_semester_name(semester)
							for course_name in data['courses'][year][semester]:
								course = getCourse(course_name, shortyear, semester)
								if not course:
									print(course_name)
									print("A bad course identifier was passed.")
									break
								self.standing.increment(course.credits)
{'fraction_non_alphanumeric': 0.09764579989299091, 'fraction_numerical': 0.0016051364365971107, 'mean_word_length': 3.64472049689441, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '590644', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1142, 'n_words': 348}