<commit_before>/**
 *	Template - components_timeline
 *	Callback function called automatically when the template has been created
 *
 *	@method created
 */
Template.components_timeline.created = function() {
};

/**
 *	Template - components_timeline
 *	Callback function called automatically when the template has been rendered
 *
 *	@method rendered
 */
Template.components_timeline.rendered = function() {
};

/**
 *	Template - components_timeline
 *	Callback function called automatically when the template has been destroyed
 *
 *	@method destroyed
 */
Template.components_timeline.destroyed = function() {
};

/**
 *	Template - components_timeline
 *	Helpers
 */
Template.components_timeline.helpers({

	/** 
	 *	Get the beginning and the end in terms of years
	 *	for each group of two projects sitting together
	 *	in the slider.
	 */
	yearGroups: function() {
		var years = _.map(this.jobs, function(job, index) {
			return {
				startDate: Helpers.formattedDate(job.fields.startDate, 'YYYY').string,
				endDate: 	(typeof job.fields.endDate !== 'undefined') ?
							Helpers.formattedDate(job.fields.endDate, 'YYYY').string :
							Helpers.formattedDate(new Date(), 'YYYY').string
			};
		}),
		groups = [],
		yearGroups = [],
		size = this.concurrentJobs;

		while(years.length > 0) {
			groups.push(years.splice(0, size));
		}<commit_msg>Making timeline rendering function reactive.<commit_after>/**
 *	Template - components_timeline
 *	Callback function called automatically when the template has been created
 *
 *	@method created
 */
Template.components_timeline.created = function() {
};

/**
 *	Template - components_timeline
 *	Callback function called automatically when the template has been rendered
 *
 *	@method rendered
 */
Template.components_timeline.rendered = function() {
};

/**
 *	Template - components_timeline
 *	Callback function called automatically when the template has been destroyed
 *
 *	@method destroyed
 */
Template.components_timeline.destroyed = function() {
};

/**
 *	Template - components_timeline
 *	Helpers
 */
Template.components_timeline.helpers({

	/** 
	 *	Get the beginning and the end in terms of years
	 *	for each group of two projects sitting together
	 *	in the slider.
	 */
	yearGroups: function() {
		/**
		 *	Making this function reactive
		 */
		Dependencies.resized.depend();
		
		var years = _.map(this.jobs, function(job, index) {
			return {
				startDate: Helpers.formattedDate(job.fields.startDate, 'YYYY').string,
				endDate: 	(typeof job.fields.endDate !== 'undefined') ?
							Helpers.formattedDate(job.fields.endDate, 'YYYY').string :
							Helpers.formattedDate(new Date(), 'YYYY').string
			};
		}),
		groups = [],
		yearGroups = [],
		size = this.concurrentJobs;

		while(years.length > 0) {
			groups.push(years.splice(0, size));
		}
{'fraction_non_alphanumeric': 0.12224591329068941, 'fraction_numerical': 0.0014214641080312722, 'mean_word_length': 3.79557069846678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1071195', 'n_tokens_mistral': 909, 'n_tokens_neox': 812, 'n_words': 213}