<commit_before>define(function (require) {

  var React = require('react/addons');

  return React.createClass({

    propTypes: {
      minCPU: React.PropTypes.number,
      minMem: React.PropTypes.number,
      onCPUChange: React.PropTypes.func.isRequired,
      onMemChange: React.PropTypes.func.isRequired,
      cpuMinVal: React.PropTypes.number.isRequired,
      cpuMaxVal: React.PropTypes.number.isRequired,
      memMinVal: React.PropTypes.number.isRequired,
      memMaxVal: React.PropTypes.number.isRequired
    },

    render: function () {
      var cpuWarning, memWarning;

      if(!this.props.checkValidCPU()){
        cpuWarning = (<p className="text-danger">CPU must be between {this.props.cpuMinVal} and {this.props.cpuMaxVal} </p>);
      }
      if(!this.props.checkValidMem()){
        memWarning = (<p className="text-danger">Memory must be between {this.props.memMinVal} and {this.props.memMaxVal} GB</p>);
      }

      return (
        <div>
          <h4>Minimum Requirements</h4>
          <div>
            <div className="help-block">Minimum # of CPU cores: </div><input className="form-control" type="text" value={this.props.cpu} onChange={this.props.onCPUChange} />{cpuWarning}<br />
          </div>
          <div>
            <div className="help-block">Minimum amount of memory (GB): </div><input className="form-control" type="text" value={this.props.mem} onChange={this.props.onMemChange} />{memWarning}
          </div>
        </div>
        );
    }

  });

});<commit_msg>use es6 module syntax<commit_after>import React from 'react/addons';

export default React.createClass({

  propTypes: {
    minCPU: React.PropTypes.number,
    minMem: React.PropTypes.number,
    onCPUChange: React.PropTypes.func.isRequired,
    onMemChange: React.PropTypes.func.isRequired,
    cpuMinVal: React.PropTypes.number.isRequired,
    cpuMaxVal: React.PropTypes.number.isRequired,
    memMinVal: React.PropTypes.number.isRequired,
    memMaxVal: React.PropTypes.number.isRequired
  },

  render: function () {
    var cpuWarning, memWarning;

    if(!this.props.checkValidCPU()){
      cpuWarning = (<p className="text-danger">CPU must be between {this.props.cpuMinVal} and {this.props.cpuMaxVal} </p>);
    }
    if(!this.props.checkValidMem()){
      memWarning = (<p className="text-danger">Memory must be between {this.props.memMinVal} and {this.props.memMaxVal} GB</p>);
    }

    return (
      <div>
        <h4>Minimum Requirements</h4>
        <div>
          <div className="help-block">Minimum # of CPU cores: </div><input className="form-control" type="text" value={this.props.cpu} onChange={this.props.onCPUChange} />{cpuWarning}<br />
        </div>
        <div>
          <div className="help-block">Minimum amount of memory (GB): </div><input className="form-control" type="text" value={this.props.mem} onChange={this.props.onMemChange} />{memWarning}
        </div>
      </div>
      );
  }

});
{'fraction_non_alphanumeric': 0.14892893573614416, 'fraction_numerical': 0.0017001020061203672, 'mean_word_length': 3.14950634696756, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '6966720', 'n_tokens_mistral': 944, 'n_tokens_neox': 916, 'n_words': 169}