<commit_before>/**
 * 
 */
package ltg.ps.helioroom;

import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import ltg.commons.LTGEvent;
import ltg.commons.LTGEventHandler;
import ltg.commons.LTGEventListener;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.MongoClient;

/**
 * @author tebemis
 *
 */
public class HelioRoomMasterAgent {

	private LTGEventHandler eh = null;
	private DBCollection db;


	public HelioRoomMasterAgent() {

		// -------------------
		// Init network and DB
		// -------------------
		eh =  new LTGEventHandler("hr-master@172.16.31.10", "hr-master", "helio-sp-13@conference.54.243.60.48");
		try {
			db = new MongoClient("localhost").getDB("helio-sp-13").getCollection("notes");
		} catch (UnknownHostException e1) {
			System.err.println("Impossible to connect to MongoDB");
			System.exit(0);
		}


		// -----------------
		//Register listeners
		// -----------------<commit_msg>Connecting to remote database now<commit_after>/**
 * 
 */
package ltg.ps.helioroom;

import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import ltg.commons.LTGEvent;
import ltg.commons.LTGEventHandler;
import ltg.commons.LTGEventListener;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.MongoClient;

/**
 * @author tebemis
 *
 */
public class HelioRoomMasterAgent {

	private LTGEventHandler eh = null;
	private DBCollection db;


	public HelioRoomMasterAgent() {

		// -------------------
		// Init network and DB
		// -------------------
		eh =  new LTGEventHandler("hr-master@172.16.31.10", "hr-master", "helio-sp-13@conference.54.243.60.48");
		try {
			//db = new MongoClient("localhost").getDB("helio-sp-13").getCollection("notes");
			db = new MongoClient("172.16.31.10").getDB("helio-sp-13").getCollection("notes");
		} catch (UnknownHostException e1) {
			System.err.println("Impossible to connect to MongoDB");
			System.exit(0);
		}


		// -----------------
		//Register listeners
		// -----------------
{'fraction_non_alphanumeric': 0.18083114938225384, 'fraction_numerical': 0.02208910520404343, 'mean_word_length': 3.358890701468189, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 5, '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': '933446', 'n_tokens_mistral': 969, 'n_tokens_neox': 839, 'n_words': 153}