<commit_before>
/* HELPERS */
var GLOBAL = {
    baseUrl : 'http://localhost:3000',
    polling : false
};

// wrap jquery ajax function to reduce redundant code
var AJAX = function(loc, method, contentType, data, callback, failback, headers){
    var me = this;
    var dataStr = null;
    if(!$.isEmptyObject(data) && (contentType == 'application/json' || contentType == 'text/uri-list')){
        dataStr = JSON.stringify(data);
    }else{
        dataStr = data;
    }
    $.support.cors = true;
    $.ajax({
        type        : method,
        url         : GLOBAL.baseUrl+(loc.charAt(0) == '/' ? loc : '/rest/'+loc),
        contentType : contentType,
        data        : dataStr,
        xhrFields   : (GLOBAL.baseUrl ? {withCredentials:true} : {}),
        beforeSend  : function(xhr){
            if(headers){
                $.each(headers, function(i , header){
                    xhr.setRequestHeader(header.name, header.val);<commit_msg>empty the baseUrl<commit_after>
/* HELPERS */
var GLOBAL = {
    baseUrl : '',
    polling : false
};

// wrap jquery ajax function to reduce redundant code
var AJAX = function(loc, method, contentType, data, callback, failback, headers){
    var me = this;
    var dataStr = null;
    if(!$.isEmptyObject(data) && (contentType == 'application/json' || contentType == 'text/uri-list')){
        dataStr = JSON.stringify(data);
    }else{
        dataStr = data;
    }
    $.support.cors = true;
    $.ajax({
        type        : method,
        url         : GLOBAL.baseUrl+(loc.charAt(0) == '/' ? loc : '/rest/'+loc),
        contentType : contentType,
        data        : dataStr,
        xhrFields   : (GLOBAL.baseUrl ? {withCredentials:true} : {}),
        beforeSend  : function(xhr){
            if(headers){
                $.each(headers, function(i , header){
                    xhr.setRequestHeader(header.name, header.val);
{'fraction_non_alphanumeric': 0.1468568409931326, 'fraction_numerical': 0.003169572107765452, 'mean_word_length': 2.2047377326565143, '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': '5080449', 'n_tokens_mistral': 585, 'n_tokens_neox': 573, 'n_words': 130}