<commit_before>EC.UnitTemplateMinis = React.createClass({
  propTypes: {
    data: React.PropTypes.object.isRequired,
    actions: React.PropTypes.object.isRequired
  },

  getInitialState: function () {
    this.modules = {
      rowsCreator: new EC.modules.RowsCreator(this.colView, this.rowView, 2)
    }
    console.log(this.props.actions);
    return {};
  },

  generateUnitTemplateViews: function () {
    var grade = this.props.data.grade;
    var models;
    if (grade) {
      models = _.reject(this.props.data.displayedModels, function (m){
        return _.indexOf(m.grades, grade.toString());
      });
    } else {
      models = this.props.data.displayedModels
    }
    var rows = this.modules.rowsCreator.create(models);
    return <span>{rows}</span>;
  },
<commit_msg>Use the proper functioning for determining wether a grade is contained in the grades array.<commit_after>EC.UnitTemplateMinis = React.createClass({
  propTypes: {
    data: React.PropTypes.object.isRequired,
    actions: React.PropTypes.object.isRequired
  },

  getInitialState: function () {
    this.modules = {
      rowsCreator: new EC.modules.RowsCreator(this.colView, this.rowView, 2)
    }
    console.log(this.props.actions);
    return {};
  },

  generateUnitTemplateViews: function () {
    var grade = this.props.data.grade;
    var models;
    if (grade) {
      models = _.reject(this.props.data.displayedModels, function (m){
        return _.contains(m.grades, grade.toString());
      });
    } else {
      models = this.props.data.displayedModels
    }
    var rows = this.modules.rowsCreator.create(models);
    return <span>{rows}</span>;
  },

{'fraction_non_alphanumeric': 0.13127646702964307, 'fraction_numerical': 0.0012099213551119178, 'mean_word_length': 3.094059405940594, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5331029', 'n_tokens_mistral': 514, 'n_tokens_neox': 507, 'n_words': 96}