<commit_before># muntzbot.rb
# Trolling Twitter for lulz, <NAME>untz style.

require 'open-uri'
require 'rubygems'
require 'twitter'

MUNTZBOT_VERSION = "1.0.5"
MUNTZBOT_CONSUMER_KEY = "YOUR_CONSUMER_KEY"
MUNTZBOT_CONSUMER_SECRET = "YOUR_CONSUMER_SECRET"
MUNTZBOT_OAUTH_TOKEN = "YOUR_OAUTH_TOKEN"
MUNTZBOT_OAUTH_SECRET = "YOUR_OAUTH_SECRET"

def muntzlog(text)
  puts "#{Time.now.strftime("%Y:%m:%d %I:%M:%S")} - #{text}"
end


# Redirect the standard output.

directory_for_script = File.expand_path(File.dirname(__FILE__))
$stdout = File.new("#{directory_for_script}/muntzbot.log", "a")
$stdout.sync = true


# Load the most recent tweet ID from the last Twitter API request.

last_tweet_id = 0
should_respond = true

begin
  file = File.new("#{directory_for_script}/lasttweet.txt", "r")
  while (line = file.gets)
    last_tweet_id = line
  end
  file.close
rescue => err<commit_msg>Bumped version number in script comments.<commit_after># muntzbot.rb
# Trolling Twitter for lulz, <NAME>z style.

require 'open-uri'
require 'rubygems'
require 'twitter'

MUNTZBOT_VERSION = "1.0.6"
MUNTZBOT_CONSUMER_KEY = "YOUR_CONSUMER_KEY"
MUNTZBOT_CONSUMER_SECRET = "YOUR_CONSUMER_SECRET"
MUNTZBOT_OAUTH_TOKEN = "YOUR_OAUTH_TOKEN"
MUNTZBOT_OAUTH_SECRET = "YOUR_OAUTH_SECRET"

def muntzlog(text)
  puts "#{Time.now.strftime("%Y:%m:%d %I:%M:%S")} - #{text}"
end


# Redirect the standard output.

directory_for_script = File.expand_path(File.dirname(__FILE__))
$stdout = File.new("#{directory_for_script}/muntzbot.log", "a")
$stdout.sync = true


# Load the most recent tweet ID from the last Twitter API request.

last_tweet_id = 0
should_respond = true

begin
  file = File.new("#{directory_for_script}/lasttweet.txt", "r")
  while (line = file.gets)
    last_tweet_id = line
  end
  file.close
rescue => err
{'fraction_non_alphanumeric': 0.12743461324429606, 'fraction_numerical': 0.004451864218141347, 'mean_word_length': 5.586080586080586, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7002711', 'n_tokens_mistral': 752, 'n_tokens_neox': 729, 'n_words': 146}