<commit_before>(function () {
    "use strict";   
    var HelperService = function ($http, $q) {
        var HelperMethods = {
            getMyTrains: function(){
                var deferObject_myTrains;
                var myTrains_promise = $http.get('json/myTrains.json');
                deferObject_myTrains = deferObject_myTrains || $q.defer();
                
                myTrains_promise.then(function(data){<commit_msg>My trains are now retrieved from AirTable using AirTable API<commit_after>(function () {
    "use strict";   
    var HelperService = function ($http, $q) {
        var HelperMethods = {
            getMyTrains: function(){
                var deferObject_myTrains;
                var myTrains_promise = $http.get('https://api.airtable.com/v0/app6bRhZ46dwM5aJJ/Trains?callback=JSON_CALLBACK', {
                    headers : {
                        'Authorization' : 'Bearer <KEY>',
                        'Content-Type' : 'application/json'
                    }
                });
//                var myTrains_promise = $http.get('json/myTrains.json'); to use a local json file
                deferObject_myTrains = deferObject_myTrains || $q.defer();
                
                myTrains_promise.then(function(data){
{'fraction_non_alphanumeric': 0.10646687697160884, 'fraction_numerical': 0.003943217665615142, 'mean_word_length': 1.776805251641138, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '2466194', 'n_tokens_mistral': 372, 'n_tokens_neox': 348, 'n_words': 65}