<commit_before>package org.cocolab.inpro.domains.calendar;

import java.util.Random;

import org.cocolab.inpro.incremental.unit.IU.IUUpdateListener;

import scalendar.adaptionmanager.AdaptionManager;

public class NoiseThread extends Thread {
	private Random random = new Random(); 
	private SynthesisModule sm;
	private IUUpdateListener updateListener;
	private AdaptionManager am;
	
	private int delay = 1300;
	private int noiseLength = 1000;
	private int responsiveness = 50;
	
	public NoiseThread(AdaptionManager am, SynthesisModule sm, IUUpdateListener updateListener) {
		this.am = am;
		this.sm = sm;
		this.updateListener = updateListener;
	}
	
	public void setTiming(int delay) {
		this.delay = delay;
	}
	
	public void setTiming(int delay, int length) {
		this.delay = delay;
		this.noiseLength = length;
	}
	
	public void run() {
		int i = 0;
		while (true) {
			i++;
		try {
			Thread.sleep(randomIntBetween(2000, 7000));
			System.out.println("BRRRRRRRRRRRRRRRUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUMMMMMMMMMMMMMM!");
			sm.playNoise("file:///Users/hendrik/Desktop/iNLG_iSS/pinknoise." + new Integer(noiseLength).toString() + "ms.wav");
			Thread.sleep(noiseLength - responsiveness);
		} catch (InterruptedException e) {e.printStackTrace();}
		am.noGrounding();
		am.setLevelOfUnderstanding(5);
		am.setVerbosityFactor(0);
		updateListener.update(null);
		}
	}

	
	private int randomIntBetween(int min, int max) {
		assert(min < max);
		min *= -1;
		return random.nextInt(min + max) - min;
	}
	
}<commit_msg>New gaussian random noise.<commit_after>package org.cocolab.inpro.domains.calendar;

import java.util.Random;

import org.cocolab.inpro.incremental.unit.IU.IUUpdateListener;

import scalendar.adaptionmanager.AdaptionManager;

public class NoiseThread extends Thread {
	private Random random = new Random(); 
	private SynthesisModule sm;
	private IUUpdateListener updateListener;
	private AdaptionManager am;
	
	private int delay = 1300;
	private int noiseLength = 1000;
	private int responsiveness = 50;
	
	public NoiseThread(AdaptionManager am, SynthesisModule sm, IUUpdateListener updateListener) {
		this.am = am;
		this.sm = sm;
		this.updateListener = updateListener;
	}
	
	public void setTiming(int delay) {
		this.delay = delay;
	}
	
	public void setTiming(int delay, int length) {
		this.delay = delay;
		this.noiseLength = length;
	}
	
	public void run() {
		while (true) {
		try {
			Thread.sleep(randomGaussianIntBetween(3000, 7000, 4500, 2500));
			System.out.println("BRRRRRRRRRRRRRRRUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUMMMMMMMMMMMMMM!");
			sm.playNoise("file:///Users/hendrik/Desktop/iNLG_iSS/pinknoise." + new Integer(noiseLength).toString() + "ms.wav");
			Thread.sleep(noiseLength - responsiveness);
		} catch (InterruptedException e) {e.printStackTrace();}
		am.noGrounding();
		am.setLevelOfUnderstanding(5);
		am.setVerbosityFactor(0);
		updateListener.update(null);
		}
	}
	
	int randomGaussianIntBetween(int min, int max, int mean, int sd) {
		assert(min < max);
		double g;
		do {
			g = random.nextGaussian() * sd + mean;
		} while (g < min || g > max);
		return (int) Math.round(g);
	}
	
	private int randomIntBetween(int min, int max) {
		assert(min < max);
		min *= -1;
		return random.nextInt(min + max) - min;
	}
	
}
{'fraction_non_alphanumeric': 0.11505507955936352, 'fraction_numerical': 0.015605875152998777, 'mean_word_length': 4.448333333333333, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '4329251', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1087, 'n_words': 245}