<commit_before>/// File:         Gymnasium.js
/// Description:  library containing helper functions used on Gymnasium
/// Author:       @mbifulco

function Gymnasium(){}

Gymnasium.prototype.setBackgroundColorOfElementFromImage = function (element, image)
{
  var canvas= document.createElement('canvas');
  var myImg = document.createElement('img');

  $(image).each(function(i,imgObj){
    myImg.src = imgObj.src;

    $(myImg).one('load',function(){

      var context = canvas.getContext('2d');
      context.drawImage(myImg, 0, 0);

      data = context.getImageData(1, 1, 1, 1).data;

      var r = data[0];
      var g = data[1];
      var b = data[2];
      var a = data[3];

      $(element).css('background-color','rgba(' + r + ',' + g + ',' + b + ',' + a + ')');
    });
  })
};
<commit_msg>semicolon cleanliness<commit_after>/// File:         Gymnasium.js
/// Description:  library containing helper functions used on Gymnasium
/// Author:       @mbifulco

function Gymnasium(){}

Gymnasium.prototype.setBackgroundColorOfElementFromImage = function (element, image)
{
  var canvas= document.createElement('canvas');
  var myImg = document.createElement('img');

  $(image).each(function(i,imgObj){
    myImg.src = imgObj.src;

    $(myImg).one('load',function(){

      var context = canvas.getContext('2d');
      context.drawImage(myImg, 0, 0);

      data = context.getImageData(1, 1, 1, 1).data;

      var r = data[0];
      var g = data[1];
      var b = data[2];
      var a = data[3];

      $(element).css('background-color','rgba(' + r + ',' + g + ',' + b + ',' + a + ')');
    });
  })
};

Gymnasium.prototype.RecordCourseEnrollment = function(email, courseid)
{
  console.log("Gym is");
  var data = {
    debugLink:        0,
    leadDestination:  "cw-rc",
    first_name:       "Test",
    last_name:        "User",
    email:            "<EMAIL>",
    city:             "",
    type:             "",
    score:            "",
    course_id:        "",
    utm_campaign:     "",
  };
  //Gymnasium.RecordCloudwallRecord(data);

};

Gymnasium.prototype.RecordExamGrade = function(email, courseId, grade)
{
  var data = {
    debugLink:        0,
    leadDestination:  "cw-rc",
    first_name:       "Test",
    last_name:        "User",
    email:            "<EMAIL>",
    city:             "",
    type:             "",
    score:            "",
    course_id:        "",
    utm_campaign:     "not-provided"
  };
};

{'fraction_non_alphanumeric': 0.1681669394435352, 'fraction_numerical': 0.009819967266775777, 'mean_word_length': 2.3585164835164836, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4001540', 'n_tokens_mistral': 819, 'n_tokens_neox': 808, 'n_words': 160}