<commit_before>$(document).ready(function() {


    $('.clock-row').hide().fadeIn(3000);


    // script to type text in header
    var text = '         Click a clock.    ';
    // text is split up to letters
    $.each(text.split(''), function(i, letter){
        // add 100*i ms delay to each letter 
        setTimeout(function(){
            // add the letter to the container
            $('.instructions h2').html($('.instructions h2').html() + letter);
          }, 130*i);
        $('.instructions h2').show().delay(3500).fadeOut();
    });


    

//use $( "#clock-container " ).children('div').eq(0);
   function makeClock (city,coords){
        var d = new Date ();
        var n = d.getTimezoneOffset();
        var UTChour = d.getUTCHours();

        var WEATHER_API_KEY = '<KEY>';
        var URL = "https://api.forecast.io/forecast/" + WEATHER_API_KEY + "/" + coords;
        var offset;
        weather = $.ajax({
            url: URL,
            dataType: 'jsonp',
            success: function (response) {
                console.log(city + " UTC ajax success");
                var datacity = city.toLowerCase().replace(/ /, '');
                $( " #clock-container " ).children('div').eq(4).replaceWith("<div class=\""+datacity+"-clock col-md-2 clock\" data-city=\""+datacity+"\"><ul class=\"ul-clock\"><li class=\"exit-clock\"></li><li class=\"sec\"></li><li class=\"hour\"></li><li class=\"min\"></li></ul><center><h2>"+city+"</h2></center></div>");


                offset = response['offset'];
                setInterval( function() {
                var seconds = new Date().getSeconds();
                var sdegree = seconds * 6;
                var srotate = "rotate(" + sdegree + "deg)";
                $("."+datacity+"-clock .sec").css({"-moz-transform" : srotate, "-webkit-transform" : srotate});
                }, 1000 );
                
                setInterval( function() {
                var hours = UTChour + offset;
                if (hours >= 24) {
                  hours -= 24;
                } else if (hours < 0) {
                  hours -= -24;
                };
                
                var mins = new Date().getMinutes();
                var hdegree = hours * 30 + (mins / 2);
                var hrotate = "rotate(" + hdegree + "deg)";
                $("."+datacity+"-clock .hour").css({"-moz-transform" : hrotate, "-webkit-transform" : hrotate}); 
                }, 1000 );

                setInterval( function() {
                var mins = new Date().getMinutes();
                var mdegree = mins * 6;
                var mrotate = "rotate(" + mdegree + "deg)";
                $("."+datacity+"-clock .min").css({"-moz-transform" : mrotate, "-webkit-transform" : mrotate}); 
                }, 1000 );
                $( " #clock-container " ).children('div').eq(4).find("h2").text(city);
                
                var built =  $( " #clock-container " ).children('div').eq(4).detach();
                $( "#clock-container " ).prepend(built);
            },
              
            error: function (response) {
                console.log("Forecast.io API request failed in getting OFFSET");
                
            }
            
        });

        
        
   }//end makeclock function


var nyc_coords = "40.712784,-74.005941",
        london_coords = "51.507351,-0.127758",
        hongkong_coords = "22.396428,114.10949700000003", 
        sydney_coords = "-33.867487,151.20699",
        paris_coords = "48.856614,2.352222",
        sanfran_coords = "37.7749295,-122.41941550000001"; 

    // NEW YORK

     makeClock("New York", nyc_coords);
     makeClock("London", london_coords);
     makeClock("Hong Kong", hongkong_coords);
     makeClock("Sydney", sydney_coords);
     makeClock("Paris", paris_coords);

    
 
}); <commit_msg>working on making one one on click listner for clock<commit_after>$(document).ready(function() {

    $('.clock-row').hide().fadeIn(3000);

    // script to type text in header
    var text = '         Click a clock.    ';
    // text is split up to letters
    $.each(text.split(''), function(i, letter){
        // add 100*i ms delay to each letter 
        setTimeout(function(){
            // add the letter to the container
            $('.instructions h2').html($('.instructions h2').html() + letter);
          }, 130*i);
        $('.instructions h2').show().delay(3500).fadeOut();
    });

var nyc_coords = "40.712784,-74.005941",
        london_coords = "51.507351,-0.127758",
        hongkong_coords = "22.396428,114.10949700000003", 
        sydney_coords = "-33.867487,151.20699",
        paris_coords = "48.856614,2.352222",
        sanfran_coords = "37.7749295,-122.41941550000001"; 

     makeClock("New York", nyc_coords);
     makeClock("London", london_coords);
     makeClock("Hong Kong", hongkong_coords);
     makeClock("Sydney", sydney_coords);
     makeClock("Paris", paris_coords);
    
 
}); 

function makeClock (city,coords){
        var d = new Date ();
        var n = d.getTimezoneOffset();
        var UTChour = d.getUTCHours();

        var WEATHER_API_KEY = 'c2ebf0ca079e86eb70261f70d92ce7ce';
        var URL = "https://api.forecast.io/forecast/" + WEATHER_API_KEY + "/" + coords;
        var offset;
        weather = $.ajax({
            url: URL,
            dataType: 'jsonp',
            success: function (response) {
                console.log(city + " UTC ajax success");
                var datacity = city.toLowerCase().replace(/ /, '');
                $( " #clock-container " ).children('div').eq(4).replaceWith("<div class=\""+datacity+"-clock col-md-2 clock\" data-city=\""+datacity+"\"><ul class=\"ul-clock\"><li class=\"exit-clock\"></li><li class=\"sec\"></li><li class=\"hour\"></li><li class=\"min\"></li></ul><center><h2>"+city+"</h2></center></div>");


                offset = response['offset'];
                setInterval( function() {
                var seconds = new Date().getSeconds();
                var sdegree = seconds * 6;
                var srotate = "rotate(" + sdegree + "deg)";
                $("."+datacity+"-clock .sec").css({"-moz-transform" : srotate, "-webkit-transform" : srotate});
                }, 1000 );
                
                setInterval( function() {
                var hours = UTChour + offset;
                if (hours >= 24) {
                  hours -= 24;
                } else if (hours < 0) {
                  hours -= -24;
                };
                
                var mins = new Date().getMinutes();
                var hdegree = hours * 30 + (mins / 2);
                var hrotate = "rotate(" + hdegree + "deg)";
                $("."+datacity+"-clock .hour").css({"-moz-transform" : hrotate, "-webkit-transform" : hrotate}); 
                }, 1000 );

                setInterval( function() {
                var mins = new Date().getMinutes();
                var mdegree = mins * 6;
                var mrotate = "rotate(" + mdegree + "deg)";
                $("."+datacity+"-clock .min").css({"-moz-transform" : mrotate, "-webkit-transform" : mrotate}); 
                }, 1000 );
                $( " #clock-container " ).children('div').eq(4).find("h2").text(city);
                
                var built =  $( " #clock-container " ).children('div').eq(4).detach();
                $( "#clock-container " ).prepend(built);

                //CLOCK LISTENR
                $(".ul-clock").click(function () {
                    var location = $(this).closest(".clock").data('city');
                    console.log(location);
                    articles(location);
                });
            },
              
            error: function (response) {
                console.log("Forecast.io API request failed in getting OFFSET");
                
            }
            
        });    
        
   }//end makeclock function


{'fraction_non_alphanumeric': 0.17102437792092964, 'fraction_numerical': 0.0429455601869395, 'mean_word_length': 1.664199192462988, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3845292', 'n_tokens_mistral': 2613, 'n_tokens_neox': 2263, 'n_words': 464}