<commit_before>'use strict'

import React from 'react'

var HomepageCarouselDecorators = [
  {
    component: React.createClass({
      propTypes: {
        currentSlide: React.PropTypes.number.isRequired,
        previousSlide: React.PropTypes.func
      },
      render () {
        return (
            <div className='navigator-button'
                 style={this.getButtonStyles(this.props.currentSlide === 0)}
                 onClick={this.props.previousSlide}>
              <i className='fa fa-chevron-left'></i>
            </div>
        )
      },
      getButtonStyles (disabled) {
        return {
          opacity: disabled ? 0.3 : 0.7
        }
      }
    }),
    position: 'CenterLeft'
  },
  {
    component: React.createClass({
      propTypes: {
        currentSlide: React.PropTypes.number.isRequired,
        slidesToScroll: React.PropTypes.number,
        slideCount: React.PropTypes.number,
        nextSlide: React.PropTypes.func
      },
      render () {
        return (
            <div className='navigator-button'
                 style={this.getButtonStyles(this.props.currentSlide + this.props.slidesToScroll >= this.props.slideCount)}
                 onClick={this.props.nextSlide}>
              <i className='fa fa-chevron-right'></i>
            </div>
        )
      },
      getButtonStyles (disabled) {
        return {
          opacity: disabled ? 0.3 : 0.7
        }
      }
    }),
    position: 'CenterRight'
  },
  {
    component: React.createClass({
      render () {
        var self = this
        var indexes = this.getIndexes(self.props.slideCount, self.props.slidesToScroll)
        return (
          <ul style={self.getListStyles()}>
            {
              indexes.map(function (index) {
                return (
                  <li style={self.getListItemStyles()} key={index}>
                    <button
                      style={self.getButtonStyles(self.props.currentSlide === index)}
                      onClick={self.props.goToSlide.bind(null, index)}>
                      &bull;
                    </button>
                  </li>
                )
              })
            }
          </ul>
        )
      },
      getIndexes (count, inc) {
        var arr = []
        for (var i = 0; i < count; i += inc) {
          arr.push(i)
        }
        return arr
      },
      getListStyles () {
        return {
          position: 'relative',
          margin: 0,
          top: 30,
          padding: 0
        }
      },
      getListItemStyles () {
        return {
          listStyleType: 'none',
          display: 'inline-block'
        }
      },
      getButtonStyles (active) {
        return {
          border: 0,
          background: 'transparent',
          color: '#BCBCBC',
          cursor: 'pointer',
          padding: 0,
          outline: 0,
          fontSize: 36,
          opacity: active ? 1 : 0.5
        }
      }<commit_msg>fix the nga dashboard pie chart<commit_after>'use strict'

import React from 'react'

var HomepageCarouselDecorators = [
  {
    component: React.createClass({
      propTypes: {
        currentSlide: React.PropTypes.number.isRequired,
        previousSlide: React.PropTypes.func
      },
      render () {
        return (
            <div className='navigator-button'
                 style={this.getButtonStyles(this.props.currentSlide === 0)}
                 onClick={this.props.previousSlide}>
              <i className='fa fa-chevron-left'></i>
            </div>
        )
      },
      getButtonStyles (disabled) {
        return {
          opacity: disabled ? 0.3 : 0.7
        }
      }
    }),
    position: 'CenterLeft'
  },
  {
    component: React.createClass({
      propTypes: {
        currentSlide: React.PropTypes.number.isRequired,
        slidesToScroll: React.PropTypes.number,
        slideCount: React.PropTypes.number,
        nextSlide: React.PropTypes.func
      },
      render () {
        return (
            <div className='navigator-button'
                 style={this.getButtonStyles(this.props.currentSlide + this.props.slidesToScroll >= this.props.slideCount)}
                 onClick={this.props.nextSlide}>
              <i className='fa fa-chevron-right'></i>
            </div>
        )
      },
      getButtonStyles (disabled) {
        return {
          opacity: disabled ? 0.3 : 0.7
        }
      }
    }),
    position: 'CenterRight'
  },
  {
    component: React.createClass({
      render () {
        var self = this
        var indexes = this.getIndexes(self.props.slideCount, self.props.slidesToScroll)
        return (
          <ul style={self.getListStyles()}>
            {
              indexes.map(function (index) {
                return (
                  <li style={self.getListItemStyles()} key={index}>
                    <button
                      style={self.getButtonStyles(self.props.currentSlide === index)}
                      onClick={self.props.goToSlide.bind(null, index)}>
                      &bull;
                    </button>
                  </li>
                )
              })
            }
          </ul>
        )
      },
      getIndexes (count, inc) {
        var arr = []
        for (var i = 0; i < count; i += inc) {
          arr.push(i)
        }
        return arr
      },
      getListStyles () {
        return {
          position: 'relative',
          margin: 0,
          top: 13,
          padding: 0
        }
      },
      getListItemStyles () {
        return {
          listStyleType: 'none',
          display: 'inline-block'
        }
      },
      getButtonStyles (active) {
        return {
          border: 0,
          background: 'transparent',
          color: '#BCBCBC',
          cursor: 'pointer',
          padding: 0,
          outline: 0,
          fontSize: 36,
          opacity: active ? 1 : 0.5
        }
      }
{'fraction_non_alphanumeric': 0.11720867208672087, 'fraction_numerical': 0.007452574525745257, 'mean_word_length': 1.3657852564102564, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '136281', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1659, 'n_words': 301}