<commit_before>// Scriptino Earth Engine
// Copyright 2010 <NAME>
// Use under any Open Source license:
// http://www.opensource.org/licenses/

(function( S, $ ) {
	
	S.EarthEngine = function( opt ) {
		var ee = this;
		
		S.extend( ee, {
			
			getTiles: function( request, ready ) {
				$.ajax({
					type: 'POST',
					url: '/ee/mapid',
					data: request,
					success: function( json ) {
						ready( json.data );
					}
				});
			},
			
			makeLayer: function( id ) {
				var layer = {
					opacity: opt.opacity == null ? 1 : opt.opacity
				};
				
				function getTileUrl( coord, zoom ) {
					return opt.tiles
						.replace( '{X}', coord.x )
						.replace( '{Y}', ( 1 << zoom ) - coord.y - 1 )
						.replace( '{Z}', zoom );
				}
				
				if( v2 ) {
					var tileLayer = S.extend( new GTileLayer(
						new GCopyrightCollection(''), opt.minZoom, opt.maxZoom
					), {
						getTileUrl: getTileUrl,
						isPng: function() { return true; },
						getOpacity: function() { return layer.opacity; }<commit_msg>Support list API<commit_after>// Scriptino Earth Engine
// Copyright 2010 <NAME>
// Use under any Open Source license:
// http://www.opensource.org/licenses/

(function( S, $ ) {
	
	S.EarthEngine = function( opt ) {
		var ee = this;
		
		S.extend( ee, {
			
			getTiles: function( request, ready ) {
				$.ajax({
					type: 'POST',
					url: '/ee/mapid',
					data: request,
					success: function( json ) {
						ready( json.data );
					}
				});
			},
			
			list: function( request, ready ) {
				$.ajax({
					url: '/ee/list',
					data: request,
					success: function( json ) {
						ready( json.data );
					}
				});
			},
			
			makeLayer: function( id ) {
				var layer = {
					opacity: opt.opacity == null ? 1 : opt.opacity
				};
				
				function getTileUrl( coord, zoom ) {
					return opt.tiles
						.replace( '{X}', coord.x )
						.replace( '{Y}', ( 1 << zoom ) - coord.y - 1 )
						.replace( '{Z}', zoom );
				}
				
				if( v2 ) {
					var tileLayer = S.extend( new GTileLayer(
						new GCopyrightCollection(''), opt.minZoom, opt.maxZoom
					), {
						getTileUrl: getTileUrl,
						isPng: function() { return true; },
						getOpacity: function() { return layer.opacity; }
{'fraction_non_alphanumeric': 0.15915238954012623, 'fraction_numerical': 0.007213706041478809, 'mean_word_length': 2.0438957475994513, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3389377', 'n_tokens_mistral': 1025, 'n_tokens_neox': 732, 'n_words': 194}