<commit_before><html>
    <head></head>
    <body>
        <h1>farm</h1>
        <h4>farm jobs emulation<h4>
    </body>
</html><commit_msg>Setup basic framework for farm experiment<commit_after><html>
    <head>
        <style>
            .node > rect {
                fill: rgba(150, 180, 200, 255);
            }

            .connection {
                stroke: rgba(230, 190, 190, 100);
                stroke-width: 5px;
            }
        </style>
    </head>
    <body>
        <h1>farm</h1>
        <h4>distributed farm jobs emulation<h4>
        <script src='../static/js/d3.min.js'></script>
        <script>
            var width = 960,
                height = 540,
                size = 80,
                offset = {x: 200, y: 200},
                spacing = 150;
            
            //
            // prepare
            //
          
            var nodes = [
                {x: 0, y: spacing / 2},
                {x: spacing, y: 0},
                {x: spacing, y: spacing},
                {x: spacing * 2, y: 0},
                {x: spacing * 2, y: spacing},
                {x: spacing * 3, y: spacing / 2}
            ];

            nodes = nodes.map( function (node, i) {
                node.id = i;
                node.stack = [];
                node.load = [];
                node.connections = [];
                return node;
            });

            var connections = [];

            function connect(a, b) {
                a.connections.push(b);
                b.connections.push(a);
                connections.push([a, b]);
            }

            connect(nodes[0], nodes[1]);
            connect(nodes[0], nodes[2]);
            connect(nodes[1], nodes[2]);
            connect(nodes[1], nodes[3]);
            connect(nodes[2], nodes[4]);
            connect(nodes[3], nodes[4]);
            connect(nodes[3], nodes[5]);
            connect(nodes[4], nodes[5]);
            
            //
            // enter
            //

            var svg = d3.select("body").append("svg")
                .attr("width", width)
                .attr("height", height);

            var line = d3.svg.line()
                .interpolate("linear")
                .x( function (d) { return d.x })
                .y( function (d) { return d.y });

            svg.selectAll(".connection")
                .data(connections)
                .enter()
                .append("path")
                    .classed("connection", true)
                    .attr("d", function (d) {
                        var source = {x: d[0].x + offset.x + size, y: d[0].y + offset.y + size},
                            target = {x: d[1].x + offset.x + size, y: d[1].y + offset.y + size};
                        return line([source, target]);
                    });

            svg.selectAll(".node")
                .data(nodes)
                .enter()
                .append("g")
                    .classed("node", true)
                    .attr("transform", function (d) {
                        return "translate(" + (d.x + offset.x) + "," + (d.y + offset.y) + ")";
                    });

            svg.selectAll(".node")
                .append("rect")
                    .attr("width", size)
                    .attr("height", size)
                    .attr("x", size / 2)
                    .attr("y", size / 2);

        </script>
    </body>
</html>
{'fraction_non_alphanumeric': 0.15203991781626064, 'fraction_numerical': 0.024361608453184618, 'mean_word_length': 0.9871720116618076, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 30, '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': '569457', 'n_tokens_mistral': 1051, 'n_tokens_neox': 922, 'n_words': 208}