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

require "yaml"
require "rest-client"
require_relative 'lib/locker.rb'

config = YAML.load_file("config.yml")

locker = Locker.new disks: config["disks"]

# Set variables for Telegram API.
@token = config["telegram_api_token"]
@chat_id = config["telegram_chat_id"]
if @token.nil? || @chat_id.nil?
	puts "[ERROR]: Please set \"telegram_api_token\" AND \"telegram_chat_id\" in config file."
	exit(1)
end

# Send a Telegram message
def sendMessage disk
	message = "#{hostname} has disk #{disk} that is #{percent(disk)}% full, #{amountLeft(disk)} left."
	url = "https://api.telegram.org/bot#{@token}/sendMessage"
	RestClient.post url, {:chat_id => @chat_id, :text => message}
end
<commit_msg>Fixed config file not being loaded.<commit_after>#!/usr/bin/env ruby

require "yaml"
require "rest-client"
require_relative 'lib/locker.rb'

config = YAML.load_file(File.dirname(__FILE__) + "/config.yml")

locker = Locker.new disks: config["disks"]

# Set variables for Telegram API.
@token = config["telegram_api_token"]
@chat_id = config["telegram_chat_id"]
if @token.nil? || @chat_id.nil?
	puts "[ERROR]: Please set \"telegram_api_token\" AND \"telegram_chat_id\" in config file."
	exit(1)
end

# Send a Telegram message
def sendMessage disk
	message = "#{hostname} has disk #{disk} that is #{percent(disk)}% full, #{amountLeft(disk)} left."
	url = "https://api.telegram.org/bot#{@token}/sendMessage"
	RestClient.post url, {:chat_id => @chat_id, :text => message}
end

{'fraction_non_alphanumeric': 0.16198125836680052, 'fraction_numerical': 0.0013386880856760374, 'mean_word_length': 5.416309012875536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2294242', 'n_tokens_mistral': 536, 'n_tokens_neox': 527, 'n_words': 136}