<commit_before><!DOCTYPE html>
<html>
	<head>
		<title>HtmlPalette Live Demo</title>
		<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js'></script>
		<script src='build/html-palette.min.js'></script>
		<script>

			angular.module('testbed', ['html-palette'])
				.controller('TestbedController', function($scope)
				{
					window.scope = $scope;
					$scope.topLeftColor = {r:Math.random(), g:Math.random(), b:Math.random()};
					$scope.bottomRightColor = {r:Math.random(), g:Math.random(), b:Math.random()};

					$scope.getColor = function(color){
						return 'rgba('+Math.round(color.r*255)+', '+Math.round(color.g*255)+', '+Math.round(color.b*255)+', '+color.a+')';
					}

					$scope.invertColor = function(color){
						return 'rgb('+Math.round((1-color.r)*255)+', '+Math.round((1-color.g)*255)+', '+Math.round((1-color.b)*255)+')';
					}

					$scope.$watchCollection('topLeftColor', updateGradient);
					$scope.$watchCollection('bottomRightColor', updateGradient);

					function updateGradient()
					{
						var nearCorner = $scope.getColor($scope.topLeftColor);
						var farCorner = $scope.getColor($scope.bottomRightColor);
						var angle = Math.atan2(window.innerHeight, window.innerWidth);

						document.body.style['background-image'] = 'linear-gradient(to right bottom, '+nearCorner+', '+farCorner+'), url("src/checker.png")';
					}
				});

		</script><commit_msg>Randomize alpha on live demo<commit_after><!DOCTYPE html>
<html>
	<head>
		<title>HtmlPalette Live Demo</title>
		<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js'></script>
		<script src='build/html-palette.min.js'></script>
		<script>

			angular.module('testbed', ['html-palette'])
				.controller('TestbedController', function($scope)
				{
					window.scope = $scope;
					$scope.topLeftColor = {r:Math.random(), g:Math.random(), b:Math.random()};
					$scope.bottomRightColor = {r:Math.random(), g:Math.random(), b:Math.random(), a:Math.random()/2+0.5};

					$scope.getColor = function(color){
						return 'rgba('+Math.round(color.r*255)+', '+Math.round(color.g*255)+', '+Math.round(color.b*255)+', '+color.a+')';
					}

					$scope.invertColor = function(color){
						return 'rgb('+Math.round((1-color.r)*255)+', '+Math.round((1-color.g)*255)+', '+Math.round((1-color.b)*255)+')';
					}

					$scope.$watchCollection('topLeftColor', updateGradient);
					$scope.$watchCollection('bottomRightColor', updateGradient);

					function updateGradient()
					{
						var nearCorner = $scope.getColor($scope.topLeftColor);
						var farCorner = $scope.getColor($scope.bottomRightColor);
						var angle = Math.atan2(window.innerHeight, window.innerWidth);

						document.body.style['background-image'] = 'linear-gradient(to right bottom, '+nearCorner+', '+farCorner+'), url("src/checker.png")';
					}
				});

		</script>
{'fraction_non_alphanumeric': 0.2073509015256588, 'fraction_numerical': 0.018377253814147017, 'mean_word_length': 4.216998191681736, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '6359826', 'n_tokens_mistral': 1227, 'n_tokens_neox': 970, 'n_words': 130}