<commit_before>import $ from 'jquery'
import React from 'react'
import 'babelify/polyfill'

$().ready(() => {

  fetch('http://jsonplaceholder.typicode.com/psosts')
    .then(response => response.json())
    .then(json => console.log("response", json))
    .catch(err => console.warn('Failed fetching from endpoint', err))

  let target = document.getElementById('render-target')
  React.render(
    <h1>Hello, master</h1>,
    target
  )
})<commit_msg>Basic react example<commit_after>import $ from 'jquery'
import React from 'react'
import 'babelify/polyfill'

export class MyListComponent extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      stuff: [],
      loading: false
    }

    this.loadStuff = () => {
      this.setState({ loading: true })
      fetch('http://jsonplaceholder.typicode.com/posts')
        .then(response => response.json())
        .then(json => this.setState({
          stuff: json,
          loading: false
        }))
        .catch(err => console.warn('Failed fetching from endpoint', err))
    }

    this.render = () =>
      <div>
        <button onClick={this.loadStuff}>
          {this.state.loading ? 'Loading...' : 'Click me to load stuff'}
        </button>
        {this.state.stuff.map(x =>
          <div key={x.id}>{x.title}</div>
        )}
      </div>
  }

}



$().ready(() => {



  let target = document.getElementById('render-target')
  React.render(<MyListComponent />, target)
})
{'fraction_non_alphanumeric': 0.16689280868385345, 'fraction_numerical': 0.0013568521031207597, 'mean_word_length': 2.7060301507537687, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 23, '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': '1614377', 'n_tokens_mistral': 462, 'n_tokens_neox': 447, 'n_words': 92}