Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

School Categorization #4

Open
weallwegot opened this issue May 3, 2018 · 0 comments
Open

School Categorization #4

weallwegot opened this issue May 3, 2018 · 0 comments

Comments

@weallwegot
Copy link
Owner

This code is simultaneously hilarious and terrible:

	# in progress lol, this is stupid.
	def parse_uni(self,uni_str):
		s = uni_str.upper()
		# need to rework to have this be a list that allows you to update and add more entries
		# this methodology is pretty bad. right now but ok for first pass.
		if ('IVY' in s and not 'NEAR' in s) or ('M.I.T' in s) or ('COLUMBIA' in s) or ('YALE' in s):
			return 'Tier 1'
		elif 'NEAR' in s and 'IVY' in s:
			return 'Tier 2'
		else:
			try:
				logging.warning("Not enough info to parse university: {}".format(uni_str))
			except UnicodeEncodeError:
				pass
			return 'Tier 3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant