<commit_before>#!/usr/bin/env ruby

class Status
	$load="/proc/loadavg"
	$temp="/sys/devices/virtual/thermal/thermal_zone0/temp"
	$bat="/sys/class/power_supply/BAT0/capacity"
	def self.get_load
		open($load).read.split(' ')[0]
	end
	def self.get_temp
		open($temp).read.split('\n')[0].to_i/1000 
	end
	def self.get_bat
		open($bat).read.rstrip 
	end
	def self.format
		"#{self.get_load} | #{self.get_temp}C | #{self.get_bat}%"
	end
end

# Main
if __FILE__ == $0
	$tmp = "/tmp/xstatus"
	# Traps to clean up $tmp and exit quietly
	Signal.trap("INT") do exit end
	Signal.trap("EXIT") do File.delete($tmp) end
	loop do
		# Block forces re-opening on loop iteration
		open($tmp, "w") { |f| f.puts Status.format }
		sleep(5)
	end
end
<commit_msg>Removed redundant battery percentage display.<commit_after>#!/usr/bin/env ruby

class Status
	$load="/proc/loadavg"
	$temp="/sys/devices/virtual/thermal/thermal_zone0/temp"
	$bat="/sys/class/power_supply/BAT0/capacity"
	def self.get_load
		open($load).read.split(' ')[0]
	end
	def self.get_temp
		open($temp).read.split('\n')[0].to_i/1000 
	end
	def self.get_bat
		open($bat).read.rstrip 
	end
#	def self.format
#		"#{self.get_load} | #{self.get_temp}C | #{self.get_bat}%"
#	end
	def self.format
		"#{self.get_load} | #{self.get_temp}C"
	end
end

# Main
if __FILE__ == $0
	$tmp = "/tmp/xstatus"
	# Traps to clean up $tmp and exit quietly
	Signal.trap("INT") do exit end
	Signal.trap("EXIT") do File.delete($tmp) end
	loop do
		# Block forces re-opening on loop iteration
		open($tmp, "w") { |f| f.puts Status.format }
		sleep(5)
	end
end

{'fraction_non_alphanumeric': 0.16983523447401774, 'fraction_numerical': 0.012674271229404309, 'mean_word_length': 3.9810725552050474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2789188', 'n_tokens_mistral': 677, 'n_tokens_neox': 643, 'n_words': 139}