<commit_before>package com.carmanconsulting.akka.java.cluster;

import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

public class CalculationWorker extends UntypedActor {
//----------------------------------------------------------------------------------------------------------------------
// Canonical Methods
//----------------------------------------------------------------------------------------------------------------------

    @Override
    public void onReceive(Object message) throws Exception {
        if (message instanceof CalculationChunk) {
            final CalculationChunk chunk = (CalculationChunk) message;
            sender().tell(chunk.evaluate(), self());
        } else {
            unhandled(message);
        }
    }

//----------------------------------------------------------------------------------------------------------------------
// main() method
//----------------------------------------------------------------------------------------------------------------------

    public static void main(String[] args) {
        final Config config = ConfigFactory.parseResources(CalculationWorker.class, "worker.conf");
        ActorSystem system = ActorSystem.create("PiCalculator", config);
        system.actorOf(Props.create(CalculationWorker.class), "calculationWorker");
    }
}<commit_msg>Changing host name.<commit_after>package com.carmanconsulting.akka.java.cluster;

import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

public class CalculationWorker extends UntypedActor {
//----------------------------------------------------------------------------------------------------------------------
// Canonical Methods
//----------------------------------------------------------------------------------------------------------------------

    @Override
    public void onReceive(Object message) throws Exception {
        if (message instanceof CalculationChunk) {
            final CalculationChunk chunk = (CalculationChunk) message;
            sender().tell(chunk.evaluate(), self());
        } else {
            unhandled(message);
        }
    }

//----------------------------------------------------------------------------------------------------------------------
// main() method
//----------------------------------------------------------------------------------------------------------------------

    public static void main(String[] args) {
        final Config config = ConfigFactory.parseResources(CalculationWorker.class, "worker.conf");
        ActorSystem system = ActorSystem.create("PiCalculator", config);
        //system.actorOf(Props.create(CalculationWorker.class), "calculationWorker");
    }
}
{'fraction_non_alphanumeric': 0.3999309868875086, 'fraction_numerical': 0.0, 'mean_word_length': 1.0826149425287357, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6891698', 'n_tokens_mistral': 581, 'n_tokens_neox': 539, 'n_words': 116}