<commit_before>var uwapi = require('../../../utils/uwapi');
var utils = require('../../../utils/utils');
var moment_timezone = require('moment-timezone');

// foodName and foodPic are corresponding to each other
var foodName = ['<NAME>','<NAME>','Browsers Café','ML’s Coffee Shop','Brubakers',
								'Williams Fresh Cafe','CEIT Café','Eye Opener Café','Liquid Assets Cafe','Subway',
								'Festival Fare','Mudie’s','PAS Lounge','Pastry Plus','REVelation'];

var foodPic = ['https://uwaterloo.ca/food-services/sites/ca.food-services/files/tims.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/BA.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/browsers.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/mls.jpg',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/brubakers.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/williams_0.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/ceit.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/eye_opener.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/la.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/subway.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/festivalfare.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/untitled-3-01.png',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/pas.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/pastryplus.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/revelation.gif.gif',]

// Independent from foodName and foodPic
var foodLocation = ['Davis Centre - DC','Dana Porter Library - DP','Student Life Centre - SLC',
										'Modern Languages - ML','CEIT Building - EIT','Optometry Building - OPT',
										'Hagey Hall - HH','Environment 3 - EV3','South Campus Hall - SCH',
										'Village 1 - V1','PAS Building - PAS','B.C. Matthews Hall - BMH',
										'Needles Hall - NH','Tatham Centre - TC','Ron Eydt Village - REV'];

var matchFoodByName = function (num, data) {
	var name = foodName[num-1];
	var data = data['data'];
	var food_array = new Array();
	for (var i = 0; i < data.length; i++) {
		(function(i) {
			var outlet_name = data[i]['outlet_name'].split('-');
			if (name.match(outlet_name[0].trim())) {
				var food_info = new Object();
				food_info.loc = outlet_name[1]+' ('+data[i]['building']+')';
				food_info.latitude = data[i]['latitude'];
				food_info.longitude = data[i]['longitude'];
				var now = moment_timezone().tz('America/Toronto').format('dddd').toLowerCase();
				var open = data[i]['opening_hours'][now]['opening_hour'];
				var close = data[i]['opening_hours'][now]['closing_hour'];
				var reply = food_info.loc+': '+open+' - '+close;
				food_array.push(reply);
			}
		})(i);
	}
	var res = {
		title: name+'\n'+moment_timezone().tz('America/Toronto').format('dddd, MMMM Do YYYY'),
		description: food_array.join('\n'),
		pic: foodPic[num-1]
	};<commit_msg>Handled special hours and added three new food services<commit_after>var uwapi = require('../../../utils/uwapi');
var utils = require('../../../utils/utils');
var moment_timezone = require('moment-timezone');

// foodName and foodPic are corresponding to each other
var foodName = ['<NAME>','<NAME>','Browsers Café','ML’s Coffee Shop','Brubakers',
								'Williams Fresh Cafe','CEIT Café','Eye Opener Café','Liquid Assets Cafe','Subway',
								'Mudie’s','PAS Lounge','Pastry Plus','REVelation','Campus Bubble','Wasabi',
								'International News'];

var foodPic = ['https://uwaterloo.ca/food-services/sites/ca.food-services/files/tims.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/BA.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/browsers.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/mls.jpg',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/brubakers.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/williams_0.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/ceit.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/eye_opener.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/la.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/subway.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/untitled-3-01.png',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/pas.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/pastryplus.gif',
							 'https://uwaterloo.ca/food-services/sites/ca.food-services/files/revelation.gif.gif',
							 'https://pilots.uwaterloo.ca/feds/sites/ca.feds/files/commercial-services-pages-logos-cb.png',
							 'https://pilots.uwaterloo.ca/feds/sites/ca.feds/files/commercial-services-pages-logos-wasabi.png',
							 'https://pilots.uwaterloo.ca/feds/sites/ca.feds/files/commercial-services-pages-logos-in.png']

// Independent from foodName and foodPic
var foodLocation = ['Davis Centre - DC','Dana Porter Library - DP','Student Life Centre - SLC',
										'Modern Languages - ML','CEIT Building - EIT','Optometry Building - OPT',
										'Hagey Hall - HH','Environment 3 - EV3','South Campus Hall - SCH',
										'Village 1 - V1','PAS Building - PAS','B.C. Matthews Hall - BMH',
										'Needles Hall - NH','Tatham Centre - TC','Ron Eydt Village - REV'];

var matchFoodByName = function (num, data) {
	var name = foodName[num-1];
	var data = data['data'];
	var food_array = new Array();
	for (var i = 0; i < data.length; i++) {
		(function(i) {
			var outlet_name = data[i]['outlet_name'].split('-');
			if (name.match(outlet_name[0].trim())) {
				var food_info = new Object();
				food_info.loc = data[i]['building'];
				food_info.latitude = data[i]['latitude'];
				food_info.longitude = data[i]['longitude'];
				var now = moment_timezone().tz('America/Toronto').format('dddd').toLowerCase();
				if (data[i]['opening_hours'][now]['is_closed'] == true) {
					reply = food_info.loc+': '+'Closed for Today'
				} else {
					var open = data[i]['opening_hours'][now]['opening_hour'];
					var close = data[i]['opening_hours'][now]['closing_hour'];
					var reply = food_info.loc+': '+open+' - '+close;
				}
				food_array.push(reply);
			}
		})(i);
	}
	var res = {
		title: name+'\n'+moment_timezone().tz('America/Toronto').format('dddd, MMMM Do YYYY'),
		description: food_array.join('\n'),
		pic: foodPic[num-1]
	};
{'fraction_non_alphanumeric': 0.1911332941867293, 'fraction_numerical': 0.0036699941280093954, 'mean_word_length': 3.5632953784326857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 32, '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': '6799458', 'n_tokens_mistral': 2858, 'n_tokens_neox': 2304, 'n_words': 350}