<commit_before>import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';

class LoadingSpinner extends React.Component {
  getStyles() {
    const styles = {
      root: {
        textAlign: 'center',
        padding: 10,
      },
    };
    return styles;
  }
  render() {
    const styles = this.getStyles();
    return (
      <div style={styles.root}>
        <CircularProgress size={0.5} />
      </div>
    );
  }
}

export default LoadingSpinner;<commit_msg>add optional padding and size props to loading spinner<commit_after>import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';

class LoadingSpinner extends React.Component {
  getStyles() {
    const { padding } = this.props;
    const paddingToUse = (padding !== undefined) ? padding : 10;
    const styles = {
      root: {
        textAlign: 'center',
        padding: paddingToUse,
      },
    };
    return styles;
  }
  render() {
    const { size } = this.props;
    const sizeToUse = (size !== undefined) ? (size / 50) : 0.5;
    const styles = this.getStyles();
    return (
      <div style={styles.root}>
        <CircularProgress size={sizeToUse} />
      </div>
    );
  }
}

LoadingSpinner.propTypes = {
  padding: React.PropTypes.number,
  size: React.PropTypes.number, // in pixels
};

export default LoadingSpinner;
{'fraction_non_alphanumeric': 0.1251840942562592, 'fraction_numerical': 0.007363770250368188, 'mean_word_length': 2.743801652892562, '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': '1994378', 'n_tokens_mistral': 418, 'n_tokens_neox': 409, 'n_words': 103}