<commit_before><!doctype html>

<html>

<head>
    {% if title %}
    <title>{{ title }} - DrugSim</title>
    {% else %}
    <title>DrugSim</title>
    {% endif %}

    <script src="{{url_for('script')}}"></script>
</head>

<style>
    #cy {
        width: 50%;
        height: 50%;
        position: absolute;
        top: 10%;
        left: 25%;
    }
    #table {
        position: absolute;
        left:35%;
        top:60%;
    }
</style>

<body>
    <div>DrugSim: <a href="/">Home</a></div>
    <hr>
    {% with messages = get_flashed_messages() %}
    {% if messages %}
    <ul>
        {% for message in messages %}
        <li>{{ message }} </li>
        {% endfor %}
    </ul>
    {% endif %}
    {% endwith %}
    <h1>Result</h1>   
    <div id="cy"></div>
    <script>
      var cy = cytoscape({
        container: document.getElementById('cy'),
        elements: [
          { data: { id: 'a' } },
          { data: { id: 'b' } },
          {
            data: {
              id: 'ab',
              source: 'a',
              target: 'b'
            }
          }]
      });
    </script>
    <div id ="table">
    <p>
        {% for table in tables %}
        <h2>{{titles[loop.index]}}</h2>
        {{ table|safe }}
        {% endfor %}
    </p>
    </div>
</body>
</html><commit_msg>network<commit_after><!doctype html>

<html>

<head>
    {% if title %}
    <title>{{ title }} - DrugSim</title>
    {% else %}
    <title>DrugSim</title>
    {% endif %}

    <script src="{{url_for('script')}}"></script>
</head>

<style>
    #cy {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 10%;
        left: 0%;
    }
    #table {
        position: absolute;
        left:10%;
        top:100%;
    }
</style>

<body>
    <div>DrugSim: <a href="/">Home</a></div>
    <hr>
    {% with messages = get_flashed_messages() %}
    {% if messages %}
    <ul>
        {% for message in messages %}
        <li>{{ message }} </li>
        {% endfor %}
    </ul>
    {% endif %}
    {% endwith %}
    <h1>Result</h1>   
    <div id="cy"></div>
    <script>
        window.alert('1')

        var tab = document.getElementById('cy')
        var cy = cytoscape({
            container: document.getElementById('cy'),
            
            style: [
                
                {
                    selector: 'edge',
                    style: {
                        'width': 0.5,
                        'line-color': '#ad1a66'
                    }
                }

            ],

        elements: [
            ]
        });
        
        var nodes = '{{ nodes|tojson }}'
        var edges1 = '{{ edges1|tojson }}'
        var edges2 = '{{ edges2|tojson }}'
        for (var i = 0; i < nodes.length; i++) {

            cy.add([
                { group: "nodes", data: { id: nodes[i] } }
            ]);
        }


        for (var i = 0; i < edges1.length; i++) {
            if (edges1[i] != edges2[i]) {
                cy.add([
                    {
                        group: "edges",
                        data: {
                            id: edges1[i] + edges2[i],
                            source: edges1[i],
                            target: edges2[i]
                        }
                    }
                ]);
            }
        }

        
        var options = {
        };


        cy.layout(options);
        var layout = cy.layout({ name: 'concentric' });

        layout.run();
    </script>
    <div id ="table">
    <p>
        {% for table in tables %}
        <h2>{{titles[loop.index]}}</h2>
        {{ table|safe }}
        {% endfor %}
    </p>
    </div>
</body>
</html>
{'fraction_non_alphanumeric': 0.1765986394557823, 'fraction_numerical': 0.014421768707482994, 'mean_word_length': 1.1764357608052103, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 75, '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': '1338113', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1139, 'n_words': 238}