<commit_before>import React, { PureComponent } from 'react'
import {
  Tooltip,
  OverlayTrigger,
} from 'react-bootstrap'
import { PTyp } from '../../ptyp'
import { resourceColor } from '../../exped-info'

class Cell extends PureComponent {
  static propTypes = {
    cost: PTyp.shape({
      fuelCost: PTyp.number.isRequired,
      ammoCost: PTyp.number.isRequired,
      nameList: PTyp.array.isRequired,
    }),
  }

  static defaultProps = {
    cost: null,
  }

  render() {
    const {cost} = this.props
    if (cost === null) {
      return (
        <div>
          N/A
        </div>
      )
    }
    const {fuelCost, ammoCost} = cost
    const tooltip = (
      <Tooltip id="tooltip">
        <div>
          {
            cost.nameList.map((n,ind) => (
              <div key={
                // eslint-disable-next-line react/no-array-index-key
                ind
              }>
                {n}
              </div>
            ))
          }
        </div>
      </Tooltip>)
    return (
      <OverlayTrigger placement="bottom" overlay={tooltip}>
        <div>
          <div style={{
            fontWeight: 'bold',
            color: resourceColor.fuel,
          }} >
            {fuelCost}
          </div>
          <div style={{
            fontWeight: 'bold',
            color: resourceColor.ammo,
          }} >
            {ammoCost}
          </div>
        </div>
      </OverlayTrigger>
    )
  }
}

export { Cell }
<commit_msg>cost model ui tweak<commit_after>import React, { PureComponent } from 'react'
import {
  Tooltip,
  OverlayTrigger,
} from 'react-bootstrap'
import { PTyp } from '../../ptyp'
import { resourceColor } from '../../exped-info'

class Cell extends PureComponent {
  static propTypes = {
    cost: PTyp.shape({
      fuelCost: PTyp.number.isRequired,
      ammoCost: PTyp.number.isRequired,
      nameList: PTyp.array.isRequired,
    }),
  }

  static defaultProps = {
    cost: null,
  }

  render() {
    const {cost} = this.props
    if (cost === null) {
      return (
        <div>
          N/A
        </div>
      )
    }
    const {fuelCost, ammoCost} = cost
    const tooltip = (
      <Tooltip id="tooltip">
        <div>
          <div>Examples:</div>
          {
            cost.nameList.map((n,ind) => (
              <div key={
                // eslint-disable-next-line react/no-array-index-key
                ind
              }>
                {n}
              </div>
            ))
          }
        </div>
      </Tooltip>)
    return (
      <OverlayTrigger placement="bottom" overlay={tooltip}>
        <div>
          <div style={{
            fontWeight: 'bold',
            color: resourceColor.fuel,
          }} >
            {fuelCost}
          </div>
          <div style={{
            fontWeight: 'bold',
            color: resourceColor.ammo,
          }} >
            {ammoCost}
          </div>
        </div>
      </OverlayTrigger>
    )
  }
}

export { Cell }

{'fraction_non_alphanumeric': 0.13558178752107924, 'fraction_numerical': 0.0, 'mean_word_length': 1.376602564102564, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, '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': '3276651', 'n_tokens_mistral': 909, 'n_tokens_neox': 898, 'n_words': 186}