<commit_before>{% extends 'layout.html' %}
{% block content %}
<div id="map-canvas" style="top:0;left:0;width:100%;height:720px;position:absolute;"></div>

<script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?libraries=visualization&sensor=true_or_false">
</script>
<script type="text/javascript" src="/static/sprintf.js"></script>
<script>

// Copied from http://michalbe.blogspot.kr/2011/02/javascript-random-numbers-with-custom.html
var CustomRandom = function(nseed) {
    var seed,
        constant = Math.pow(2, 13)+1,
        prime = 37,
        maximum = Math.pow(2, 50);

    if (nseed) {
        seed = nseed;
    }

    if (seed == null) {
        // if there is no seed, use timestamp
        seed = (new Date()).getTime();
    }

    return {
        next : function() {
            seed *= constant;
            seed += prime;
            seed %= maximum;

            return seed;
        }
    }
}

function getNearestStations(coordinate, callback) {
    var params = {
        latitude: coordinate.A,
        longitude: coordinate.F
    }
    $.get('/api/nearest_stations', data=params, callback);
}

function getRoutesForStation(arsId, callback) {
    $.get('/api/station/' + arsId + '/routes', callback);
}

function getRoute(routeId, callback) {
    $.get('/api/route/' + routeId, callback);<commit_msg>Looks like Google has changed its JavaScript object structures<commit_after>{% extends 'layout.html' %}
{% block content %}
<div id="map-canvas" style="top:0;left:0;width:100%;height:960px;position:absolute;"></div>

<script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?libraries=visualization&sensor=true_or_false">
</script>
<script type="text/javascript" src="/static/sprintf.js"></script>
<script>

// Copied from http://michalbe.blogspot.kr/2011/02/javascript-random-numbers-with-custom.html
var CustomRandom = function(nseed) {
    var seed,
        constant = Math.pow(2, 13)+1,
        prime = 37,
        maximum = Math.pow(2, 50);

    if (nseed) {
        seed = nseed;
    }

    if (seed == null) {
        // if there is no seed, use timestamp
        seed = (new Date()).getTime();
    }

    return {
        next : function() {
            seed *= constant;
            seed += prime;
            seed %= maximum;

            return seed;
        }
    }
}

function getNearestStations(coordinate, callback) {
    var params = {
        latitude: coordinate.G,
        longitude: coordinate.K
    }
    console.log(coordinate);
    $.get('/api/nearest_stations', data=params, callback);
}

function getRoutesForStation(arsId, callback) {
    $.get('/api/station/' + arsId + '/routes', callback);
}

function getRoute(routeId, callback) {
    $.get('/api/route/' + routeId, callback);
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.01658255227108868, 'mean_word_length': 2.7961696306429547, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '647577', 'n_tokens_mistral': 919, 'n_tokens_neox': 868, 'n_words': 178}