<commit_before>/** Created by hhj on 3/11/16. */
/* eslint-disable max-len */
import React, { PropTypes } from 'react'
import { List } from 'immutable'
import uniqBy from 'lodash/uniqBy'
import Avatar from 'material-ui/lib/avatar'
import colors from '../app/colors'

export default class NepiOpy extends React.Component {
  static propTypes = {
    nepiOpy: PropTypes.instanceOf(List),
  };

  static defaultProps = {
    nepiOpy: List(),
  };

  render() {
    const { nepiOpy } = this.props
    const uniqNepiOpy = uniqBy(nepiOpy.toArray(), nepiOp => nepiOp.ixop)
    const slicedNepiOpy = uniqNepiOpy.slice(0, 10)

    const listItems = slicedNepiOpy.map(nepiOp =>
      <div style={{ paddingLeft: '1em' }} key={nepiOp.ixop}>
        {nepiOp.ixop} {nepiOp.akronym} "{nepiOp.nazevFirmy}"
      </div>
    )

    const divHeight = Math.max(Math.ceil(slicedNepiOpy.length / 2 * 1.6), 2)

    return listItems.length > 0 ?
      <div style={{ display: 'flex', alignItems: 'center', paddingLeft: '2em' }}>
        <Avatar size={20} backgroundColor={colors.green300} color={colors.grey50}>
          { uniqNepiOpy.length }
        </Avatar>
        <div style={{ display: 'flex', flexFlow: 'column wrap', justifyContent: 'center', height: `${divHeight}em` }}>
          { listItems }
        </div>
      </div>
      : <div />

  }
}<commit_msg>feat: add mark by nepiop to nepiopy in umisteni<commit_after>/** Created by hhj on 3/11/16. */
/* eslint-disable max-len */
import React, { PropTypes } from 'react'
import { List } from 'immutable'
import uniqBy from 'lodash/uniqBy'
import Avatar from 'material-ui/lib/avatar'
import colors from '../app/colors'
import { markPotencialniNepiop } from './markUtils'

export default class NepiOpy extends React.Component {
  static propTypes = {
    nepiOpy: PropTypes.instanceOf(List),
  };

  static defaultProps = {
    nepiOpy: List(),
  };

  render() {
    const { nepiOpy } = this.props
    const uniqNepiOpy = uniqBy(nepiOpy.toArray(), nepiOp => nepiOp.ixop)
    const slicedNepiOpy = uniqNepiOpy.slice(0, 10)

    const listItems = slicedNepiOpy.map(nepiOp =>
      <div style={{ paddingLeft: '1em' }} key={nepiOp.ixop}>
        {markPotencialniNepiop(nepiOp.ixop)} {markPotencialniNepiop(nepiOp.akronym)} "{nepiOp.nazevFirmy}"
      </div>
    )

    const divHeight = Math.max(Math.ceil(slicedNepiOpy.length / 2 * 1.6), 2)

    return listItems.length > 0 ?
      <div style={{ display: 'flex', alignItems: 'center', paddingLeft: '2em' }}>
        <Avatar size={20} backgroundColor={colors.green300} color={colors.grey50}>
          { uniqNepiOpy.length }
        </Avatar>
        <div style={{ display: 'flex', flexFlow: 'column wrap', justifyContent: 'center', height: `${divHeight}em` }}>
          { listItems }
        </div>
      </div>
      : <div />

  }
}
{'fraction_non_alphanumeric': 0.15010645848119233, 'fraction_numerical': 0.015613910574875798, 'mean_word_length': 3.1395007342143906, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, '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': '4102963', 'n_tokens_mistral': 1053, 'n_tokens_neox': 1004, 'n_words': 224}