<commit_before>// TODO: Add license.

// Hide our creation of cloudgen from the global scope.
(function() {
    // Constants =============================================================
    // We require this later, so precompute it here.
    var TWO_PI = Math.PI * 2;
    
    // The ratio of circle radius to cloud radius. The circles used to draw
    // the clouds are thus this times the cloud radius.
    var CIRCLE_RADIUS_RATIO = 0.6;
    
    // The spacing between 
    var CLOUD_GROUP_SPACING = 0.75;
    
    
    // Create our cloudgen object.
    var cloudgen = function() {
    };
    
    
    // context, x, y, radius, colour, alpha, density
    // Does not reset global params.
    /*cloudgen.drawCloud = function(context, centreX, centreY, radius, colour, alpha, density) {
        // Set default parameters.
        switch (arguments.length) {
            case 0: return;
            case 1: centreX = 0;
            case 2: centreY = 0;
            case 3: radius = 100;
            case 4: colour = {r:255, g:255, b:255};
            case 5: alpha = 1.0;
            case 6: density = 30;
        }
        
        // Set some values we need.
        var circleRadius = radius * CIRCLE_RADIUS_RATIO;
        var innerGradientRadius = circleRadius * INNER_GRADIENT_RATIO;
        var colourString = "rgba(" + colour.r + ", " + colour.g + ", " + colour.b + ", ";
        var colourStop1 = colourString + "0.1)";
        var colourStop2 = colourString + "0.0)";
        
        // Set up context.
        context.save();
        context.globalAlpha = alpha;
        
        // Create as many circles as indicated by "density".
        for (var i = 0; i < density; i++) {
            // Calculate the circle position within the cloud.
            var angle = Math.random() * TWO_PI;
            var x = centreX + Math.random() * radius * Math.cos(angle);
            var y = centreY + Math.random() * radius * Math.sin(angle);
            
            // Create the circle gradient.
            // TODO: should we be drawing a circle to a canvas and drawing that multiple times?
            var gradient = context.createRadialGradient(x, y, innerGradientRadius, x, y, circleRadius);
            gradient.addColorStop(0, colourStop1);
            gradient.addColorStop(1, colourStop2);
            context.fillStyle = gradient;
            
            // Draw the circle.
            context.beginPath();
            context.arc(x, y, circleRadius, 0, TWO_PI, true);
            context.fill();
        }
        
        // Restore our changes to the context.
        context.restore();
    };*/
    
    
    /*  Draws a single cloud to the given canvas context.
        
        context: (Required)
            The 2D "CanvasRenderingContext2D" instance to draw to.
            
        centreX: (Optional)
            The approximate centre of the cloud in the x-dimension. Default 0.
            
        centreY: (Optional)
            The approximate centre of the cloud in the y-dimension. Default 0.
            
        radius: (Optional)
            The radius of the circular area inside which the cloud will be
            generated. Default 100.
            
        colour: (Optional)
            An object of the form {r:0, g:0, b:0} representing the RGB values
            of the cloud colour. Default {r:255, g:255, b:255}.
            
        alpha: (Optional)
            The transparency of the cloud. Range 0.0 to 1.0. Default 0.3.<commit_msg>Removed old version of drawCloud.<commit_after>// TODO: Add license.

// Hide our creation of cloudgen from the global scope.
(function() {
    // Constants =============================================================
    // We require this later, so precompute it here.
    var TWO_PI = Math.PI * 2;
    
    // The ratio of circle radius to cloud radius. The circles used to draw
    // the clouds are thus this times the cloud radius.
    var CIRCLE_RADIUS_RATIO = 0.6;
    
    // The spacing between 
    var CLOUD_GROUP_SPACING = 0.75;
    
    
    // Create our cloudgen object.
    var cloudgen = function() {
    };
    
    
    /*  Draws a single cloud to the given canvas context.
        
        context: (Required)
            The 2D "CanvasRenderingContext2D" instance to draw to.
            
        centreX: (Optional)
            The approximate centre of the cloud in the x-dimension. Default 0.
            
        centreY: (Optional)
            The approximate centre of the cloud in the y-dimension. Default 0.
            
        radius: (Optional)
            The radius of the circular area inside which the cloud will be
            generated. Default 100.
            
        colour: (Optional)
            An object of the form {r:0, g:0, b:0} representing the RGB values
            of the cloud colour. Default {r:255, g:255, b:255}.
            
        alpha: (Optional)
            The transparency of the cloud. Range 0.0 to 1.0. Default 0.3.
{'fraction_non_alphanumeric': 0.11026156941649899, 'fraction_numerical': 0.019919517102615695, 'mean_word_length': 1.7403528114663727, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '6735551', 'n_tokens_mistral': 1414, 'n_tokens_neox': 1326, 'n_words': 501}