<commit_before>import React from 'react';
import { Card, CardActions, CardHeader, CardText } from 'material-ui/Card';
import FormatQuote from 'material-ui/svg-icons/editor/format-quote';
import RaisedButton from 'material-ui/RaisedButton';
import RefreshIndicator from 'material-ui/RefreshIndicator';

const cardStyles = {
  maxWidth: 600,
  margin: '0 auto',
  position: 'relative'
};

const headerStyles = {
  padding: '16px 16px 0',
  margin: '0 auto'
};

const actionStyles = {
  textAlign: 'right'
};

const refreshStyles = {
  cursor: 'pointer'
};

const QuoteCard = props => (
  <Card style={cardStyles}>
    <CardHeader
      title={`Quote by ${props.author}`}
      style={headerStyles}
    />
    <CardText>
      <FormatQuote />{props.text}
    </CardText>
    <CardActions style={actionStyles}>
      <RaisedButton
        primary
        label="Tweet"
        onTouchTap={props.onTweetClick}
      />
      <RefreshIndicator
        size={36}
        left={16}
        top={8}
        percentage={props.isLoading ? 0 : 100}
        status={props.isLoading ? 'loading' : 'ready'}
        style={refreshStyles}
        onTouchTap={props.onGetNewQuote}
      />
    </CardActions>
  </Card>
);

QuoteCard.propTypes = {
  isLoading: React.PropTypes.bool,
  text: React.PropTypes.string,
  author: React.PropTypes.string,
  categories: React.PropTypes.array,
  onTweetClick: React.PropTypes.func,
  onGetNewQuote: React.PropTypes.func
};

export default QuoteCard;<commit_msg>Show categories as tags if present in response<commit_after>import React from 'react';
import { Card, CardActions, CardHeader, CardText } from 'material-ui/Card';
import FormatQuote from 'material-ui/svg-icons/editor/format-quote';
import RaisedButton from 'material-ui/RaisedButton';
import RefreshIndicator from 'material-ui/RefreshIndicator';
import Chip from 'material-ui/Chip';

const cardStyles = {
  maxWidth: 600,
  margin: '0 auto',
  position: 'relative'
};

const headerStyles = {
  padding: '16px 16px 0',
  margin: '0 auto'
};

const actionStyles = {
  textAlign: 'right'
};

const refreshStyles = {
  cursor: 'pointer'
};

const categoriesStyle = {
  marginTop: '20px'
};

const QuoteCard = props => (
  <Card style={cardStyles}>
    <CardHeader
      title={'Quote from The Internet Chuck Norris Database'}
      style={headerStyles}
    />
    <CardText>
      <FormatQuote />{props.text}
      {
        props.categories.length ?
          <div style={categoriesStyle}>
            {
              props.categories.map(category => <Chip>{category}</Chip>)
            }
          </div> : null
      }
    </CardText>
    <CardActions style={actionStyles}>
      <RaisedButton
        primary
        label="Tweet"
        onTouchTap={props.onTweetClick}
      />
      <RefreshIndicator
        size={36}
        left={16}
        top={8}
        percentage={props.isLoading ? 0 : 100}
        status={props.isLoading ? 'loading' : 'ready'}
        style={refreshStyles}
        onTouchTap={props.onGetNewQuote}
      />
    </CardActions>
  </Card>
);

QuoteCard.propTypes = {
  isLoading: React.PropTypes.bool,
  text: React.PropTypes.string,
  author: React.PropTypes.string,     // eslint-disable-line
  categories: React.PropTypes.array,
  onTweetClick: React.PropTypes.func,
  onGetNewQuote: React.PropTypes.func
};

export default QuoteCard;
{'fraction_non_alphanumeric': 0.12865671641791046, 'fraction_numerical': 0.011940298507462687, 'mean_word_length': 3.0422195416164053, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 30, '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': '6483045', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1061, 'n_words': 224}