<commit_before>---
layout: page
title: "Display the CPU percentage"
permalink: /script-examples/cpu-percentage/
---

<ul class="tabs__top-bar">
  <!-- <li class="tab-link current" data-tab="tab-install-go">Go</li>
  <li class="tab-link" data-tab="tab-install-go-optimized">Go - script optimized</li>
  <li class="tab-link" data-tab="tab-install-go-windows">Go - script for Windows</li> -->
  <li class="tab-link current" data-tab="tab-install-node">Node</li>
  <li class="tab-link" data-tab="tab-install-shell">Shell</li>
</ul>

<!-- <div id="tab-install-go" class="tabs__content current" markdown="1">
{% include /script-examples/cpu-percentage/go.md %}
</div>

<div id="tab-install-go-optimized" class="tabs__content" markdown="1">
{% include /script-examples/cpu-percentage/go-optimized.md %}
</div>

<div id="tab-install-go-windows" class="tabs__content" markdown="1">
{% include /script-examples/cpu-percentage/go-windows.md %}
</div> -->

<div id="tab-install-node" class="tabs__content current" markdown="1">
{% include /script-examples/cpu-percentage/node.md %}
</div>

<div id="tab-install-shell" class="tabs__content" markdown="1">
{% include /script-examples/cpu-percentage/shell.md %}
</div><commit_msg>updated cpu purcentage to use bootstrap tabs<commit_after>---
layout: page
title: "Display CPU activity on your device"
permalink: /script-examples/cpu-percentage/
---
<!-- 
<ul class="tabs__top-bar">

  <li class="tab-link current" data-tab="tab-install-node">Node</li>
  <li class="tab-link" data-tab="tab-install-shell">Shell</li>
</ul>



<div id="tab-install-node" class="tabs__content current" markdown="1">
{% include /script-examples/cpu-percentage/node.md %}
</div>

<div id="tab-install-shell" class="tabs__content" markdown="1">
{% include /script-examples/cpu-percentage/shell.md %}
</div> -->

<!-- Nav tabs -->
<ul class="nav nav-tabs code-nav-tabs" role="tablist">

  <li class="nav-item">
    <a class="nav-link active node-language" id="cpu-percentage-node-tab" data-toggle="tab" href="#cpu-percentage-node" role="tab" aria-controls="cpu-percentage-node" aria-selected="false">Node</a>
  </li>

  <li class="nav-item">
    <a class="nav-link shell-language" id="cpu-percentage-shell-tab" data-toggle="tab" href="#cpu-percentage-shell" role="tab" aria-controls="cpu-percentage-shell" aria-selected="false">Shell</a>
  </li>

</ul>

<!-- Tab panes -->
<div class="tab-content">

<!-- Node code -->
<div class="code active tab-pane" id="cpu-percentage-node" role="tabpanel" aria-labelledby="cpu-percentage-node-tab" markdown="1">
{% include /script-examples/cpu-percentage/node.md %}
<!-- copy button -->
<a class="btn btn-sm copy-action" data-toggle="tooltip" data-placement="top" title="copy"  onclick="copyToClipBoard('cpu-percentage-node')"><i class="fa fa-copy"></i></a>
<!-- edit button -->
<a class="btn btn-sm edit-action"  href="https://github.com/DasKeyboard/Daskeyboard.io/blob/master/_includes/script-examples/cpu-percentage/node.md"><i class="fa fa-pencil"></i>&nbsp;Edit Script</a>
</div>


<!-- Shell code -->
<div class="code tab-pane" id="cpu-percentage-shell" role="tabpanel" aria-labelledby="cpu-percentage-shell-tab" markdown="1">
{% include /script-examples/cpu-percentage/shell.md %}
<!-- copy button -->
<a class="btn btn-sm copy-action" data-toggle="tooltip" data-placement="top" title="copy"  onclick="copyToClipBoard('cpu-percentage-shell')"><i class="fa fa-copy"></i></a>
<!-- edit button -->
<a class="btn btn-sm edit-action"  href="https://github.com/DasKeyboard/Daskeyboard.io/blob/master/_includes/script-examples/cpu-percentage/shell.md"><i class="fa fa-pencil"></i>&nbsp;Edit Script</a>
</div>

</div>
{'fraction_non_alphanumeric': 0.21266721266721267, 'fraction_numerical': 0.002457002457002457, 'mean_word_length': 4.9288025889967635, 'pattern_counts': {'":': 0, '<': 78, '<?xml version=': 0, '>': 78, 'https://': 2, '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': '4803074', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1259, 'n_words': 221}