<commit_before><div>
<div>
<canvas id="myCanvas"></canvas>
</div>
<button id="join">Join</button>
<h4 id="value"></h4>
<h4 id="turn"></h4>
<h4 id="time">Time remaining: 0</h4>
<h4 style="color: #2899e1" id="p1">Your Score: 0</h4>
<h4 style="color: #dd5353" id="p2">Player 2 Score: 0</h4>
    <script>
    $("#myCanvas").hide();

	var view;
    var socket = io('http://minesweeper-cp467.rhcloud.com:8000');
        var myName = "";
        socket.on('yourName', function(name) {
            myName = name;
        });

        $('#join').on('click', function() {
                socket.emit('joinQueue', myName);
        });
           
        socket.on('ready', function(msg) {
                $("#myCanvas").show();
	        	$("#join").hide();

		        view = new MinesweeperView(document.getElementById("myCanvas"));
            document.getElementById("myCanvas").
                addEventListener('mousedown', function(event){
                    var turn = view.getSquare(event.pageX, event.pageY);
		            socket.emit("turn", turn);
		    }, false);
        });

     	socket.on('turn', function(v) {
                var squares = v.squares;
                var turn = v.currentlyPlaying == myName;
                for(var s=0; s<squares.length; s++) {
                    view.setSquare({y: squares[s].row*30, x:squares[s].col*30}, squares[s].value, turn);
                }
                
                if (v.players[0] == myName) {
                    $("#p1").text("Your score: " + v.scores[0]);
                    $("#p2").text("Player 2 score: " + v.scores[1]);<commit_msg>catch e<commit_after><div>
<div>
<canvas id="myCanvas"></canvas>
</div>
<button id="join">Join</button>
<h4 id="value"></h4>
<h4 id="turn"></h4>
<h4 id="time">Time remaining: 0</h4>
<h4 style="color: #2899e1" id="p1">Your Score: 0</h4>
<h4 style="color: #dd5353" id="p2">Player 2 Score: 0</h4>
    <script>
    $("#myCanvas").hide();

	var view;
    try {
    var socket = io();
    } catch (e) {
    }
        var myName = "";
        socket.on('yourName', function(name) {
            myName = name;
        });

        $('#join').on('click', function() {
                socket.emit('joinQueue', myName);
        });
           
        socket.on('ready', function(msg) {
                $("#myCanvas").show();
	        	$("#join").hide();

		        view = new MinesweeperView(document.getElementById("myCanvas"));
            document.getElementById("myCanvas").
                addEventListener('mousedown', function(event){
                    var turn = view.getSquare(event.pageX, event.pageY);
		            socket.emit("turn", turn);
		    }, false);
        });

     	socket.on('turn', function(v) {
                var squares = v.squares;
                var turn = v.currentlyPlaying == myName;
                for(var s=0; s<squares.length; s++) {
                    view.setSquare({y: squares[s].row*30, x:squares[s].col*30}, squares[s].value, turn);
                }
                
                if (v.players[0] == myName) {
                    $("#p1").text("Your score: " + v.scores[0]);
                    $("#p2").text("Player 2 score: " + v.scores[1]);
{'fraction_non_alphanumeric': 0.19309262166405022, 'fraction_numerical': 0.024803767660910518, 'mean_word_length': 1.9391143911439115, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 39, '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': '3587588', 'n_tokens_mistral': 1083, 'n_tokens_neox': 997, 'n_words': 183}