<commit_before>const React = require('react');

const defaultSpanOffset = { large: 0, medium: 0, small: 0 };

const defaultShape = {
  large: React.PropTypes.number,
  medium: React.PropTypes.number,
  small: React.PropTypes.number
};

const Column = React.createClass({
  propTypes: {
    offset: React.PropTypes.shape(defaultShape),
    span: React.PropTypes.shape(defaultShape)
  },

  getDefaultProps () {
    return {
      offset: defaultSpanOffset,
      span: defaultSpanOffset
    };
  },

  getColumnWidths () {
    const colWidths = [];

    // Column widths
    if (this.props.span.small !== 0) {
      colWidths.push('col-sm-' + this.props.span.small);
    }
    if (this.props.span.medium !== 0 && this.props.span.medium !== this.props.span.small) {
      colWidths.push('col-md-' + this.props.span.medium);
    }
    if (this.props.span.large !== 0 && this.props.span.large !== this.props.span.medium) {
      colWidths.push('col-lg-' + this.props.span.large);
    }

    return colWidths;
  },

  getColumnOffsets () {
    const offsets = [];

    // Column offsets
    if (this.props.offset.small !== 0) {
      offsets.push('col-sm-offset-' + this.props.offset.small);
    }
    if (this.props.offset.medium !== 0 && this.props.offset.medium !== this.props.offset.small) {
      offsets.push('col-md-offset-' + this.props.offset.medium);
    }
    if (this.props.offset.large !== 0 && this.props.offset.large !== this.props.offset.medium) {
      offsets.push('col-lg-offset-' + this.props.offset.large);
    }

    return offsets;
  },

  render () {
    let className = [];

    // Column widths
    className = className.concat(this.getColumnWidths());

    // Column offsets
    className = className.concat(this.getColumnOffsets());

    return (
      <div className={className.join(' ')}>
        {this.props.children}
      </div>
    );
  }
});

module.exports = Column;<commit_msg>box sizing and hide column if zero<commit_after>const React = require('react');

const defaultShape = {
  large: React.PropTypes.number,
  medium: React.PropTypes.number,
  small: React.PropTypes.number
};

const Column = React.createClass({
  propTypes: {
    offset: React.PropTypes.shape(defaultShape),
    span: React.PropTypes.shape(defaultShape)
  },

  getDefaultProps () {
    return {
      offset: { large: 0, medium: 0, small: 0 },
      span: { large: 12, medium: 12, small: 12 }
    };
  },

  getColumnWidths () {
    const colWidths = [];
    const small = this.props.span.small || 0;
    const medium = this.props.span.medium || 0;
    const large = this.props.span.large || 0;

    // Column widths
    if (small === 0) {
      colWidths.push('hidden-sm');
    } else {
      colWidths.push('col-sm-' + small);
    }

    if (medium === 0) {
      colWidths.push('hidden-md');
    } else {
      if (medium !== small) {
        colWidths.push('col-md-' + medium);
      }
    }

    if (large === 0) {
      colWidths.push('hidden-lg');
    } else {
      if (large !== medium) {
        colWidths.push('col-lg-' + large);
      }
    }

    return colWidths;
  },

  getColumnOffsets () {
    const offsets = [];
    const small = this.props.offset.small || 0;
    const medium = this.props.offset.medium || 0;
    const large = this.props.offset.large || 0;

    // Column offsets
    if (small !== 0) {
      offsets.push('col-sm-offset-' + small);
    }

    if (medium !== 0 && medium !== small) {
      offsets.push('col-md-offset-' + medium);
    }

    if (large !== 0 && large !== medium) {
      offsets.push('col-lg-offset-' + large);
    }

    return offsets;
  },

  render () {
    let className = [];

    // Column widths
    className = className.concat(this.getColumnWidths());

    // Column offsets
    className = className.concat(this.getColumnOffsets());

    return (
      <div className={className.join(' ')} style={{ boxSizing: 'border-box' }}>
        {this.props.children}
      </div>
    );
  }
});

module.exports = Column;
{'fraction_non_alphanumeric': 0.16750376695128077, 'fraction_numerical': 0.007533902561526871, 'mean_word_length': 2.5123456790123457, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5874551', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1279, 'n_words': 248}