<commit_before>#!/usr/bin/env python3
# Copyright 2021 <NAME>. All Rights Reserved. Use of this
# source code is governed by a BSD-style license that can be found in the
# LICENSE file.

P = '/sys/class/power_supply/BAT0/'

# Battery voltage. Impacted by charging.
with open(P+ 'voltage_now', 'r') as 
	voltage = int(f.read()) / 1000000.0

# Energy in the battery.
with open(P+ 'energy_now', 'r') as f:
	energy = int(f.read()) / 1000000.0

# Power being handled by the power supply inside the laptop (FWIU).
with open(P+ 'power_now', 'r') as f:
	power = int(f.read()) / 1000000.0

print('{0:.2f}W {1:.2f}Wh {2:.2f}V'.format(power, energy, voltage))
<commit_msg>battery: fix weird corruption<commit_after>#!/usr/bin/env python3
# Copyright 2021 <NAME>. All Rights Reserved. Use of this
# source code is governed by a BSD-style license that can be found in the
# LICENSE file.

P = '/sys/class/power_supply/BAT0/'

# Battery voltage. Impacted by charging.
with open(P+ 'voltage_now', 'r') as f:
	voltage = int(f.read()) / 1000000.0

# Energy in the battery.
with open(P+ 'energy_now', 'r') as f:
	energy = int(f.read()) / 1000000.0

# Power being handled by the power supply inside the laptop (FWIU).
with open(P+ 'power_now', 'r') as f:
	power = int(f.read()) / 1000000.0

print('{0:.2f}W {1:.2f}Wh {2:.2f}V'.format(power, energy, voltage))

{'fraction_non_alphanumeric': 0.1582089552238806, 'fraction_numerical': 0.05373134328358209, 'mean_word_length': 4.041353383458647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2032983', 'n_tokens_mistral': 543, 'n_tokens_neox': 475, 'n_words': 164}