<commit_before>var map;
function initialize() {
    var mapOptions = {
        zoom: 15
    };
    map = new google.maps.Map(document.getElementById('map-display'),
        mapOptions);

        // Try HTML5 geolocation
        if(navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(function(position) {
                var pos = new google.maps.LatLng(position.coords.latitude,
                    position.coords.longitude);
                getAddress(pos);
                map.setCenter(pos);
            }, function() {
                handleNoGeolocation(true);
            });
        } else {
            // Browser doesn't support Geolocation
            handleNoGeolocation(false);
        }
}
function handleNoGeolocation(errorFlag) {
    if (errorFlag) {
        var content = 'Error: The Geolocation service failed.';
    } else {
        var content = 'Error: Your browser doesn\'t support geolocation.';
    }
    var options = {
        map: map,
        position: new google.maps.LatLng(37.979946, 23.727801),
        content: content
    };

    var infowindow = new google.maps.InfoWindow(options);
    map.setCenter(options.position);
}

function getAddress(latlng) {
    var geocoder = new google.maps.Geocoder();
    return geocoder.geocode({'latLng': latlng}, function(results, status) {
        if(status == google.maps.GeocoderStatus.OK) {
            if (results[1]) {
                map.setCenter(results[0].geometry.location);
                var message = results[0].formatted_address.split(", ")[0]
                    + results[1].formatted_address;
                var infowindow = new google.maps.InfoWindow({
                    map: map,
                    position: latlng,
                    content: 'Είστε εδώ. ' + message
                });
            }
            else {
                alert("No results");
            }
        } else {
            alert("Geocoding unsuccessful: Status " + status);
        }
    });
}

            google.maps.event.addDomListener(window, 'load', initialize);<commit_msg>Fix format<commit_after>var map;
function initialize() {
    var mapOptions = {
        zoom: 15
    };
    map = new google.maps.Map(document.getElementById('map-display'),
        mapOptions);

        // Try HTML5 geolocation
        if(navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(function(position) {
                var pos = new google.maps.LatLng(position.coords.latitude,
                    position.coords.longitude);
                getAddress(pos);
                map.setCenter(pos);
            }, function() {
                handleNoGeolocation(true);
            });
        } else {
            // Browser doesn't support Geolocation
            handleNoGeolocation(false);
        }
}
function handleNoGeolocation(errorFlag) {
    if (errorFlag) {
        var content = 'Error: The Geolocation service failed.';
    } else {
        var content = 'Error: Your browser doesn\'t support geolocation.';
    }
    var options = {
        map: map,
        position: new google.maps.LatLng(37.979946, 23.727801),
        content: content
    };

    var infowindow = new google.maps.InfoWindow(options);
    map.setCenter(options.position);
}

function getAddress(latlng) {
    var geocoder = new google.maps.Geocoder();
    return geocoder.geocode({'latLng': latlng}, function(results, status) {
        if(status == google.maps.GeocoderStatus.OK) {
            if (results[1]) {
                map.setCenter(results[0].geometry.location);
                var message = results[0].formatted_address.split(", ")[0]
                    + results[1].formatted_address;
                var infowindow = new google.maps.InfoWindow({
                    map: map,
                    position: latlng,
                    content: 'Είστε εδώ. ' + message
                });
            }
            else {
                alert("No results");
            }
        } else {
            alert("Geocoding unsuccessful: Status " + status);
        }
    });
}

google.maps.event.addDomListener(window, 'load', initialize);
{'fraction_non_alphanumeric': 0.11338962605548854, 'fraction_numerical': 0.01158021712907117, 'mean_word_length': 1.7751004016064258, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4722977', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1141, 'n_words': 222}