<commit_before>Template.myProfile.helpers({
	userHasQuestionsGroupsInProfile() {
		if (!Meteor.user().profile.questionsGroups || Meteor.user().profile.questionsGroups.length === 0) {
			return false;
		} else {
			return true;
		}
	},
	alreadyAnsweredQuestions() {
		return UserQuestions.find({
			userId: Meteor.userId(),
			answered: true,
			deprecated: false
		}).count();
	},
	questionsGroup() {
		let questionsGroupCurrentlyInUser = Meteor.user().profile.questionsGroups;
		return QuestionsGroups.find({
			_id: {
				$nin: questionsGroupCurrentlyInUser
			},
			deprecated: false
		}, {
			sort: {
				title: 1
			},
			fields: {
				deprecated: 1,
				title: 1,
				label: 1
			}
		});
	},
	notAnsweredQuestions() {
		return UserQuestions.find({
			userId: Meteor.userId(),
			answered: false,
			deprecated: false
		}).count();
	},
	universes() {
		let questions = UserQuestions.find({
			userId: Meteor.userId(),
			answered: true,
			deprecated: false
		}, {
			fields: {
				result: 1
			}
		}).fetch();
		let questionsObject = {};
		let questionsArray = [];
		questions.map((cur, index, array) => {
			cur.result.map((cur1, index1, array1) => {
				if (cur1.universeId) {
					if (questionsObject[cur1.universeId]) {
						questionsObject[cur1.universeId].value += cur1.result;
						questionsObject[cur1.universeId].long += 1;
					} else {
						questionsObject[cur1.universeId] = {
							value: cur1.result,
							long: 1
						};
					}
				}
			});
		});
		for (prop in questionsObject) {
			questionsArray.push({
				_id: prop,
				value: lodash.round(questionsObject[prop].value / questionsObject[prop].long * 100, 2),
				valueForCircle: lodash.round(questionsObject[prop].value / questionsObject[prop].long * 100 / 4 + 75, 0)
			});
		}
		questionsArray.sort((a, b) => {
			if (a.value < b.value) {
				return -1;
			} else if (b.value > a.value) {
				return 1;
			} else {
				return 0;
			}
		})
		return questionsArray;
	},
	universeName() {
		return Universes.findOne({ _id: this._id }, {
			fields: {
				name: 1
			}
		}).name;
	}
});<commit_msg>Fix typo<commit_after>Template.myProfile.helpers({
	userHasQuestionsGroupsInProfile() {
		if (!Meteor.user().profile.questionsGroups || Meteor.user().profile.questionsGroups.length === 0) {
			return false;
		} else {
			return true;
		}
	},
	alreadyAnsweredQuestions() {
		return UserQuestions.find({
			userId: Meteor.userId(),
			answered: true,
			deprecated: false
		}).count();
	},
	questionsGroup() {
		let questionsGroupCurrentlyInUser = Meteor.user().profile.questionsGroups;
		return QuestionsGroups.find({
			_id: {
				$nin: questionsGroupCurrentlyInUser
			},
			deprecated: false
		}, {
			sort: {
				title: 1
			},
			fields: {
				deprecated: 1,
				title: 1,
				label: 1
			}
		});
	},
	notAnsweredQuestions() {
		return UserQuestions.find({
			userId: Meteor.userId(),
			answered: false,
			deprecated: false
		}).count();
	},
	universes() {
		let questions = UserQuestions.find({
			userId: Meteor.userId(),
			answered: true,
			deprecated: false
		}, {
			fields: {
				result: 1
			}
		}).fetch();
		let questionsObject = {};
		let questionsArray = [];
		questions.map((cur, index, array) => {
			cur.result.map((cur1, index1, array1) => {
				if (cur1.universeId) {
					if (questionsObject[cur1.universeId]) {
						questionsObject[cur1.universeId].value += cur1.result;
						questionsObject[cur1.universeId].long += 1;
					} else {
						questionsObject[cur1.universeId] = {
							value: cur1.result,
							long: 1
						};
					}
				}
			});
		});
		for (prop in questionsObject) {
			questionsArray.push({
				_id: prop,
				value: lodash.round(questionsObject[prop].value / questionsObject[prop].long * 100, 2),
				valueForCircle: lodash.round(questionsObject[prop].value / questionsObject[prop].long * 100 / 4 + 75, 0)
			});
		}
		questionsArray.sort((a, b) => {
			if (a.value < b.value) {
				return -1;
			} else if (b.value > a.value) {
				return 1;
			} else {
				return 0;
			}
		});
		return questionsArray;
	},
	universeName() {
		return Universes.findOne({ _id: this._id }, {
			fields: {
				name: 1
			}
		}).name;
	}
});
{'fraction_non_alphanumeric': 0.1544578313253012, 'fraction_numerical': 0.015903614457831325, 'mean_word_length': 2.8939962476547842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '2484994', 'n_tokens_mistral': 1865, 'n_tokens_neox': 1430, 'n_words': 273}