<commit_before>(function (){
	"use strict";

    $.extend($.fn, {
        simpleCarousel: function(){

            var args = arguments[0] || { dots: [], slider: '', distance: 1 },
                data = this.data(),
                self = this;

            data.dots = args.dots;
            data.slider = $(document.getElementById(args.slider));
            data.distance = args.distance;
            data.pointer = 0;

			//initialize

			for(var i = 0; i < args.dots.length; i++){

				// data.slides.push({ dot: document.getElementById(args.dots[i]), distance: i });

				var generateCallback = function(it) {
					return function(){
						self.simpleCarouselMove(args.dots[it], it);
					};
				}

				$('#' + args.dots[i]).on(upEvent, generateCallback(i));
			}
        },
        simpleCarouselMove: function(dots, to){
        	var data = this.data(),
        		x = (to * data.distance) * -1;

        	for(var i = 0; i < data.dots.length; i++){
        		$('#' + data.dots[i]).removeClass('on');
        	}

        	$('#' + dots).addClass('on');

        	data.slider.css("-webkit-transform", "translate3d(" + x + "px, " + 0 + "px, " + 0 + "px)");
        }
    });

})();<commit_msg>swipe support for simple carousel<commit_after>(function (){
	"use strict";

    $.extend($.fn, {
        simpleCarousel: function(){

            var args = arguments[0] || { dots: [], slider: '', distance: 1, swipe: true },
                data = this.data(),
                self = this,
                limit = -1;

            data.dots = args.dots;
            data.slider = $(document.getElementById(args.slider));
            data.distance = args.distance;
            data.pointer = 0;

			for(var i = 0; i < args.dots.length; i++){
				var generateCallback = function(it) {
					return function(){
						self.simpleCarouselMove(args.dots[it], it);
					};
				}
				limit++;
				$('#' + args.dots[i]).on(upEvent, generateCallback(i));
			}

			function moveRight(){
				if(data.pointer < limit){
					data.pointer++;
					self.simpleCarouselMove(args.dots[data.pointer], data.pointer);
				}
			}

			function moveLeft(){
				if(data.pointer > 0){
					data.pointer--;
					self.simpleCarouselMove(args.dots[data.pointer], data.pointer);
				} 
			}

			if(args.swipe == true){
				data.slider.swipe({ 
					swipeTime: 1000, 
					swipeX: 50, 
					left: moveRight, 
					right: moveLeft
				});
			}
        },
        simpleCarouselMove: function(dots, to){
        	var data = this.data(),
        		x = (to * data.distance) * -1;

        	for(var i = 0; i < data.dots.length; i++){
        		$('#' + data.dots[i]).removeClass('on');
        	}

        	$('#' + dots).addClass('on');
        	data.slider.css("-webkit-transform", "translate3d(" + x + "px, " + 0 + "px, " + 0 + "px)");

        	data.pointer = to;
        }
    });

})();
{'fraction_non_alphanumeric': 0.18322218322218323, 'fraction_numerical': 0.009126009126009126, 'mean_word_length': 1.9290853031860227, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 4, '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': '7523690', 'n_tokens_mistral': 1071, 'n_tokens_neox': 907, 'n_words': 174}