<commit_before>
var po = org.polymaps;

function setupPolymap(args, api_key, tileset_id,
        center_latlon, center_range,
        zoom, zoom_range)
{
        var map = po.map();
        map.container(
                document.getElementById(args.id+":target")
                .appendChild(po.svg("svg"))
        );

        // http://cloudmade.com/register
        map.add(po.image()
        .url(po.url("http://{S}tile.cloudmade.com/" + api_key
                + "/" + tileset_id + "/256/{Z}/{X}/{Y}.png")
                .hosts(["a.", "b.", "c.", ""])));

        if ( center_latlon ) { map.center(center_latlon); }
        if ( center_range ) { map.centerRange(center_range); }
        if ( zoom ) { map.zoom(zoom); }
        if ( zoom_range ) { map.zoomRange(zoom_range); }

        // Singleton:
        if ( window._polymapwidgets === undefined ) {
                window._polymapwidgets = {};
        }
        window._polymapwidgets[args.id] = map;

        return map;
}

function setupPolymapControls(
        map, arrow, compass, dblclick, drag,
        grid, hash, interact, wheel)
{
        if ( arrow ) { map.add(po.arrow()); }
        if ( compass ) { map.add(po.compass()); }
        if ( dblclick ) { map.add(po.dblclick()); }
        if ( drag ) { map.add(po.drag()); }
        if ( grid ) { map.add(po.grid()); }
        if ( hash ) { map.add(po.hash()); }
        if ( interact ) { map.add(po.interact()); }
        if ( wheel ) { map.add(po.wheel()); }
        return map;
}

function setupPolymapData(map, data_url, timeout)
{
        if ( data_url ) {
                var layer = po.geoJson().url(data_url);
                map.add(layer);<commit_msg>Changes to upstream polymaps resources.<commit_after>
var po = org.polymaps;

function setupPolymap(args, api_key, tileset_id,
        center_latlon, center_range,
        zoom, zoom_range)
{
        var map = po.map();
        map.container(
                document.getElementById(args.id+":target")
                .appendChild(po.svg("svg"))
        );

        // http://cloudmade.com/register
        map.add(po.image()
        .url(po.url("http://{S}tile.cloudmade.com/" + api_key
                + "/" + tileset_id + "/256/{Z}/{X}/{Y}.png")
                .hosts(["a.", "b.", "c.", ""])));

        if ( center_latlon ) { map.center(center_latlon); }
        if ( center_range ) { map.centerRange(center_range); }
        if ( zoom ) { map.zoom(zoom); }
        if ( zoom_range ) { map.zoomRange(zoom_range); }

        // Singleton:
        if ( window._polymapwidgets === undefined ) {
                window._polymapwidgets = {};
        }
        window._polymapwidgets[args.id] = map;

        return map;
}

function setupPolymapControls(
        map, arrow, compass, dblclick, drag,
        grid, hash, interact, wheel)
{
        if ( arrow ) { map.add(po.arrow()); }
        if ( compass ) { map.add(po.compass()); }
        if ( dblclick ) { map.add(po.dblclick()); }
        if ( drag ) { map.add(po.drag()); }
        if ( grid ) { map.add(po.grid()); }
        if ( hash ) { map.add(po.hash()); }
        if ( interact ) { map.add(po.interact()); }
        if ( wheel ) { map.add(po.wheel()); }
        return map;
}

function setupPolymapData(map, data_url, timeout, properties_callback)
{
        if ( data_url ) {
                var layer = po.geoJson().url(data_url);
                if ( properties_callback ) {
                        layer = properties_callback(layer);
                }
                map.add(layer);
{'fraction_non_alphanumeric': 0.1650595575723199, 'fraction_numerical': 0.0017016449234259785, 'mean_word_length': 1.853559870550162, 'pattern_counts': {'":': 2, '<': 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': '5452224', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1115, 'n_words': 198}