<commit_before>import React, { Component } from 'react';
import './WattWidget.css';
import './TextWidget.css';

class WattWidget extends Component {

  render() {
    const theme = this.props.theme;
    const style = theme ? {
      backgroundColor: this.props.readOnly ? '' : theme.background,
      color: theme.text,
      fill: Number(this.props.powerValue) > 0 ?
          theme.buttonOn : theme.buttonOff
    } : {};
    return (
      <div className="TextWidget WattWidget" style={style}>
        <svg><use xlinkHref='#power' /></svg>
        <section>
          <div>{this.props.label}</div>
          <h2 className="watt">{Number(this.props.powerValue).toFixed(1)}</h2>
          {this.props.energyValue &&
              <div className="kwh">{Number(this.props.energyValue).toFixed(1)}
              </div>}
        </section>
      </div>
    );
  }
<commit_msg>Update WattWidget.js<commit_after>import React, { Component } from 'react';
import './WattWidget.css';
import './TextWidget.css';

class WattWidget extends Component {

  render() {
    const theme = this.props.theme;
    const style = theme ? {
      backgroundColor: this.props.readOnly ? '' : theme.background,
      color: theme.text,
      fill: Number(this.props.powerValue) > 0 ?
          theme.buttonOn : theme.buttonOff
    } : {};
    return (
      <div className="TextWidget WattWidget" style={style}>
        <svg><use xlinkHref='#power' /></svg>
        <section>
          <div>{this.props.label}</div>
          <h2 className="watt">{Number(this.props.powerValue).toFixed(1)}</h2>
          {this.props.energyValue &&
              <div className="kwh">{Number(this.props.energyValue/1000).toFixed(3)}
              </div>}
        </section>
      </div>
    );
  }

{'fraction_non_alphanumeric': 0.16059225512528474, 'fraction_numerical': 0.007972665148063782, 'mean_word_length': 2.486111111111111, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, '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': '1650892', 'n_tokens_mistral': 551, 'n_tokens_neox': 541, 'n_words': 97}