<commit_before>import React from 'react'
import {connect} from 'react-redux'

// import classes from './GameOfLife.scss'

import {play, pause, step, randomize} from 'redux/modules/actionCreators'

let Controls = ({playing, onPlay, onPause, onStep, onRandomize}) => {
  const playOnClick = (event) => onPause(event, playing)
  const playOrPauseButton = playing ? (
    <button type='submit' className='btn btn-default' onClick={playOnClick}>
      <span className='glyphicon glyphicon-pause'></span> Pause
    </button>
  ) : (
    <button type='submit' className='btn btn-default' onClick={onPlay}>
      <span className='glyphicon glyphicon-play'></span> Play
    </button>
  )

  return (
    <div className='row controls'>
      <div className='col-md-5'>
        <form className='form-inline' action='#'>
          <button type='submit' className='btn btn-default' onClick={onStep}>
            <span className='glyphicon glyphicon-step-forward'></span> Step
          </button>
          {playOrPauseButton}
          <button type='submit' className='btn btn-default' onClick={onRandomize}>
            <span className='glyphicon glyphicon-object-align-right'></span> Randomize
          </button><commit_msg>Change randomize icon<commit_after>import React from 'react'
import {connect} from 'react-redux'

// import classes from './GameOfLife.scss'

import {play, pause, step, randomize} from 'redux/modules/actionCreators'

let Controls = ({playing, onPlay, onPause, onStep, onRandomize}) => {
  const playOnClick = (event) => onPause(event, playing)
  const playOrPauseButton = playing ? (
    <button type='submit' className='btn btn-default' onClick={playOnClick}>
      <span className='glyphicon glyphicon-pause'></span> Pause
    </button>
  ) : (
    <button type='submit' className='btn btn-default' onClick={onPlay}>
      <span className='glyphicon glyphicon-play'></span> Play
    </button>
  )

  return (
    <div className='row controls'>
      <div className='col-md-5'>
        <form className='form-inline' action='#'>
          <button type='submit' className='btn btn-default' onClick={onStep}>
            <span className='glyphicon glyphicon-step-forward'></span> Step
          </button>
          {playOrPauseButton}
          <button type='submit' className='btn btn-default' onClick={onRandomize}>
            <span className='glyphicon glyphicon-repeat'></span> Randomize
          </button>
{'fraction_non_alphanumeric': 0.14521452145214522, 'fraction_numerical': 0.0008250825082508251, 'mean_word_length': 3.636711281070746, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 45, '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': '1866604', 'n_tokens_mistral': 727, 'n_tokens_neox': 704, 'n_words': 169}