<commit_before>(function (env) {
    "use strict";
    env.ddg_spice_coursebuffet = function(api_result){
        if (api_result == null || api_result["error"]) {
            return Spice.failed('coursebuffet');
        };
        
        Spice.add({
            id: 'coursebuffet',
            name: 'Online Courses',
            data: api_result["courses"],
            meta: {
                itemType: "Courses",
                sourceName: "CourseBuffet",
                sourceUrl: "http://www.coursebuffet.com"+api_result["more_link"]
            },
            normalize: function(item) {
                name = item.name;
                if (name.length > 50) {
                    name = item.name.substr(0, 50) + "...";
                };
                var professors = "Instructors: ";
                if(item.show_professors==null || item.show_professors.length==0) {
                    professors = professors + "Not available";
                }
                else {
                    professors = professors + item.show_professors;
                };
                return {
                    title: name,
                    description: professors,
                    url: "http://www.coursebuffet.com"+item.create_new_link,
                    image: "https://www.coursebuffet.com"+item.course_image,
//                     rating: item.cb_sub_level_display,
                    ratingText: item.offeredvia
                };
            },
            templates: {
                group: "media",
                item_detail: false,
                detail: false,
                options: {
                    moreAt: true
                },
                variants: {
                    tile: 'video'
                }
            }
//             relevancy: {
//                 type: 'primary',
//                 skip_words: [
//                     'course',
//                     'courses',
//                     'coursera',
//                     'edx',
//                     'udacity',
//                     'saylor',
//                     'novoed',
//                     'futurelearn',
//                     'iversity',
//                     'open2study',
//                     'openuped'
//                 ],
//                 primary: [
//                     { key: 'name', strict: false }
//                 ]
//             }
        });
    };
}(this));
<commit_msg>CourseBuffet: Change everything to HTTPS<commit_after>(function (env) {
    "use strict";
    env.ddg_spice_coursebuffet = function(api_result){
        if (api_result == null || api_result["error"]) {
            return Spice.failed('coursebuffet');
        };
        
        Spice.add({
            id: 'coursebuffet',
            name: 'Online Courses',
            data: api_result["courses"],
            meta: {
                itemType: "Courses",
                sourceName: "CourseBuffet",
                sourceUrl: "https://www.coursebuffet.com"+api_result["more_link"]
            },
            normalize: function(item) {
                name = item.name;
                if (name.length > 50) {
                    name = item.name.substr(0, 50) + "...";
                };
                var professors = "Instructors: ";
                if(item.show_professors==null || item.show_professors.length==0) {
                    professors = professors + "Not available";
                }
                else {
                    professors = professors + item.show_professors;
                };
                return {
                    title: name,
                    description: professors,
                    url: "https://www.coursebuffet.com"+item.create_new_link,
                    image: "https://www.coursebuffet.com"+item.course_image,
//                     rating: item.cb_sub_level_display,
                    ratingText: item.offeredvia
                };
            },
            templates: {
                group: "media",
                item_detail: false,
                detail: false,
                options: {
                    moreAt: true
                },
                variants: {
                    tile: 'video'
                }
            }
//             relevancy: {
//                 type: 'primary',
//                 skip_words: [
//                     'course',
//                     'courses',
//                     'coursera',
//                     'edx',
//                     'udacity',
//                     'saylor',
//                     'novoed',
//                     'futurelearn',
//                     'iversity',
//                     'open2study',
//                     'openuped'
//                 ],
//                 primary: [
//                     { key: 'name', strict: false }
//                 ]
//             }
        });
    };
}(this));

{'fraction_non_alphanumeric': 0.12062256809338522, 'fraction_numerical': 0.0028670899037476962, 'mean_word_length': 0.8893617021276595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, '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': '3299825', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1168, 'n_words': 198}