<commit_before>var request = require('request');
var strip = require('strip');
var Parse = require('parse').Parse;
Parse.initialize("<KEY>", "<KEY>", "<KEY>");
request({
    uri: "https://www.coursera.org/maestro/api/topic/list",
    method: "GET",
    json: true
}, function (err, res, courses) {

    for(var i=0; i<courses.length; i++) {
        json_save(courses[i]);
    }
});

function json_save(course) {
    request({
            uri: "https://www.coursera.org/maestro/api/topic/information?topic-id=" + course.short_name,
            method: "GET",
            json: true
        }, function (err, res, course) {
        var Courses = Parse.Object.extend("courses_prod");
        var local_course = new Courses();
        local_course.set("name", course.name);
        local_course.set("work_load", course.estimated_class_workload);
        local_course.set("University", course.universities[0].name);
        local_course.set("university_favicon", course.universities[0].favicon);
        if(course.courses.length >0)<commit_msg>adding course icon as well<commit_after>var request = require('request');
var strip = require('strip');
var Parse = require('parse').Parse;
Parse.initialize("<KEY>", "<KEY>", "<KEY>");
request({
    uri: "https://www.coursera.org/maestro/api/topic/list",
    method: "GET",
    json: true
}, function (err, res, courses) {

    for(var i=0; i<courses.length; i++) {
        json_save(courses[i]);
    }
});

function json_save(course) {
    request({
            uri: "https://www.coursera.org/maestro/api/topic/information?topic-id=" + course.short_name,
            method: "GET",
            json: true
        }, function (err, res, course) {
        var Courses = Parse.Object.extend("courses_prod");
        var local_course = new Courses();
        local_course.set("name", course.name);
        local_course.set("course_icon", course.small_icon_hover);
        local_course.set("work_load", course.estimated_class_workload);
        local_course.set("University", course.universities[0].name);
        local_course.set("university_favicon", course.universities[0].favicon);
        if(course.courses.length >0)
{'fraction_non_alphanumeric': 0.16689847009735745, 'fraction_numerical': 0.0037088548910523874, 'mean_word_length': 3.3246492985971945, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '5740466', 'n_tokens_mistral': 687, 'n_tokens_neox': 681, 'n_words': 123}