<commit_before><?

	//
	// return a random integer between $min and $max but make sure it's a different number than the previous result
	//
	// (useful for image rotators etc. where you don't want to repeat the previous image)
	//
	function smoothRandomInt($min, $max) {

		// hold on to the previous value
		static $prev;

		// pick a new random number
		$num = rand($min, $max);
		
		// if the new one matches the previous, we need to change it
		if ($num == $prev) {
			if ($num == $max) {
				$num = $min;	// if it's already the max value, loop around to min
			} else {
				$num++;			// otherwise, just add one.
			}
		}<commit_msg>Slight syntax tweak to smooth-random-int<commit_after><?

	//
	// return a random integer between $min and $max but make sure it's a different number than the previous result
	//
	// (useful for image rotators etc. where you don't want to repeat the previous image)
	//
	function smoothRandomInt($min, $max) {

		// hold on to the previous value
		static $prev;

		// pick a new random number
		$num = rand($min, $max);
		
		// if the new one matches the previous, we need to change it by adding one
		// if the resulting number is larger than $max, set it to $min
		if ($num == $prev) {
			$num == $max ? ($num = $min) : ($num++);
		}
{'fraction_non_alphanumeric': 0.12264150943396226, 'fraction_numerical': 0.0, 'mean_word_length': 2.7662721893491122, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2206469', 'n_tokens_mistral': 436, 'n_tokens_neox': 388, 'n_words': 181}