<commit_before>/*
  CodeMirror
*/

var React = require('react');
var ReactCodeMirror = require('react-codemirror');
require('codemirror/mode/javascript/javascript');
require('../styles/codemirror.css');

var CodeMirror = React.createClass({
  getInitialState: function() {
    return {
      code: 'Write your algorithm here.',
      mode: 'javascript'
    }
  },
  updateCode: function(newCode) {
    this.setState({
      code: newCode
    })
  },
  render: function() {
    var options = {
      lineNumbers: true,
      mode: 'javascript',
      tabSize: 2,
    };
    return (
      <div className="codeMirror-container">
          <ReactCodeMirror ref="editor" value={this.state.code} onChange={this.updateCode} options={options} />
      </div>
    )
  }
});

module.exports = CodeMirror;<commit_msg>[feature] craft the codemirror component<commit_after>/*
  CodeMirror
*/

var React = require('react');
var ReactCodeMirror = require('react-codemirror');
require('codemirror/mode/javascript/javascript');
require('../styles/codemirror.css');

var CodeMirror = React.createClass({
  getInitialState: function() {
    return {
      code: 'Write your algorithm here.',
      mode: 'javascript'
    }
  },
  updateCode: function(newCode) {
    this.setState({
      code: newCode
    })
  },
  render: function() {
    var options = {
      lineNumbers: true,
      mode: 'javascript',
      tabSize: 2
    };
    return (
      <div className="codeMirror-container">
        <ReactCodeMirror ref="editor" value={this.state.code} onChange={this.updateCode} options={options} />
      </div>
    )
  }
});

module.exports = CodeMirror;
{'fraction_non_alphanumeric': 0.14957264957264957, 'fraction_numerical': 0.001221001221001221, 'mean_word_length': 3.1284634760705288, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6589368', 'n_tokens_mistral': 517, 'n_tokens_neox': 504, 'n_words': 101}