<commit_before>import React, { Component, Fragment } from 'react';
import ScaleLoader from 'react-spinners/ScaleLoader';

import Arrows from './Arrows';
import SelectInput from './SelectInput';
import { arrayOf, number, string, func, bool } from '../proptypes-constants';
import { dispatchAnalytics } from '../utils';

export default class Controls extends Component {
  static propTypes = {
    sequence: arrayOf(number).isRequired,
    wave: string.isRequired,
    handleCollatz: func.isRequired,
    handleWave: func.isRequired,
    handleRepeat: func.isRequired,
    handlePlaybackEnd: func.isRequired,
    isPlaying: bool.isRequired
  }

  state = {
    startVal: 0
  };

  componentDidMount() {
    window.addEventListener('keydown', this.handleKeyDown);
    
    this.input.focus();
  }

  componentDidUpdate(_prevProps, prevState) {
    const { startVal } = this.state;

    if (prevState.startVal !== startVal) {<commit_msg>remove input focus on load<commit_after>import React, { Component, Fragment } from 'react';
import ScaleLoader from 'react-spinners/ScaleLoader';

import Arrows from './Arrows';
import SelectInput from './SelectInput';
import { arrayOf, number, string, func, bool } from '../proptypes-constants';
import { dispatchAnalytics } from '../utils';

export default class Controls extends Component {
  static propTypes = {
    sequence: arrayOf(number).isRequired,
    wave: string.isRequired,
    handleCollatz: func.isRequired,
    handleWave: func.isRequired,
    handleRepeat: func.isRequired,
    handlePlaybackEnd: func.isRequired,
    isPlaying: bool.isRequired
  }

  state = {
    startVal: 0
  };

  componentDidMount() {
    window.addEventListener('keydown', this.handleKeyDown); 
  }

  componentDidUpdate(_prevProps, prevState) {
    const { startVal } = this.state;

    if (prevState.startVal !== startVal) {
{'fraction_non_alphanumeric': 0.11615343057806592, 'fraction_numerical': 0.0010804970286331713, 'mean_word_length': 4.060109289617486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1652846', 'n_tokens_mistral': 550, 'n_tokens_neox': 532, 'n_words': 137}