<commit_before>import 'aframe';
import {Entity, Scene} from  'aframe-react';
import React from 'react';
import ReactDOM from 'react-dom';

import Flashcard from './components/Flashcard';

class VRScene extends React.Component {
  constructor(props){
    super(props);
    this.state = {color: 'red'};
  }

  changeColor() {
   const colors = ['red', 'orange', 'yellow', 'green', 'blue'];
    this.setState({
      color: colors[Math.floor(Math.random() * colors.length)]
    });  
  }

  render () {
    return (
      <Scene>
        <Flashcard position={[0,1,-2]} text={"Hello, World!"} scale={0.5} color={this.state.color}/>
      </Scene>
    );
  }
  
}

ReactDOM.render(<VRScene />, document.querySelector('.scene-container'));<commit_msg>Add Speech Recognition hack :P<commit_after>import 'aframe';
import {Entity, Scene} from  'aframe-react';
import React from 'react';
import ReactDOM from 'react-dom';

import Flashcard from './components/Flashcard';

class VRScene extends React.Component {
  constructor(props){
    super(props);
    this.state = {color: 'red'};

    this.recognition = new webkitSpeechRecognition()
    this.recognition.continuous = true;
    this.recognition.interimResults = false;
    this.recognition.start();

    this.recognition.onresult = event => {
      const { resultIndex, results } = event;
      const transcript = (event.results[resultIndex][0].transcript);
      this.setState({color: transcript});
    }
  }

  componentWillUnmount(){
    this.recognition.stop();
  }

  render () {
    return (
      <Scene>
        <Flashcard position={[0,1,-2]} text={"Hello, World!"} scale={0.5} color={this.state.color}/>
      </Scene>
    );
  }
  
}

ReactDOM.render(<VRScene />, document.querySelector('.scene-container'));
{'fraction_non_alphanumeric': 0.1650595575723199, 'fraction_numerical': 0.006239364719228588, 'mean_word_length': 3.5463917525773194, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '7257789', 'n_tokens_mistral': 572, 'n_tokens_neox': 552, 'n_words': 116}