<commit_before>People = new Mongo.Collection('players');
Food = new Mongo.Collection('food');

// Returns a random integer between min (included) and max (excluded)
// Using Math.round() will give you a non-uniform distribution!
// Thanks MDN :-)
function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
}

if(Meteor.isClient) {
	Template.people.helpers({
		'person': function() {
			// Get array of people
			var people = People.find().fetch();
			
			// Generate random number 0 - length of people array
			var randomInt = getRandomInt(0, people.length);
			
			// Select random person
			var person = people[randomInt];
			
			// Return the person name
			return person.name;
		},
		'food': function () {
			// Get array of food
			var foods = Food.find().fetch();
			
			// Generate random number 0 - length of food array
			var randomInt = getRandomInt(0, foods.length);
			
			// Select random food
			var food = foods[randomInt];
			
			// Return the food name
			return food.name;<commit_msg>changed template name<commit_after>People = new Mongo.Collection('players');
Food = new Mongo.Collection('food');

// Returns a random integer between min (included) and max (excluded)
// Using Math.round() will give you a non-uniform distribution!
// Thanks MDN :-)
function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
}

if(Meteor.isClient) {
	Template.match.helpers({
		'person': function() {
			// Get array of people
			var people = People.find().fetch();
			
			// Generate random number 0 - length of people array
			var randomInt = getRandomInt(0, people.length);
			
			// Select random person
			var person = people[randomInt];
			
			// Return the person name
			return person.name;
		},
		'food': function () {
			// Get array of food
			var foods = Food.find().fetch();
			
			// Generate random number 0 - length of food array
			var randomInt = getRandomInt(0, foods.length);
			
			// Select random food
			var food = foods[randomInt];
			
			// Return the food name
			return food.name;
{'fraction_non_alphanumeric': 0.12735166425470332, 'fraction_numerical': 0.003859141341051616, 'mean_word_length': 2.980806142034549, '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': '1144963', 'n_tokens_mistral': 719, 'n_tokens_neox': 597, 'n_words': 205}