<commit_before>require 'rubygems'
require 'clockwork'
require 'twitter'
include Clockwork

unless ENV['RACK_ENV'] == 'production'
  require 'dotenv'
  Dotenv.load
end

client = Twitter::REST::Client.new do |config|
  config.consumer_key        = ENV['42415_TWITTER_CONSUMER_KEY']
  config.consumer_secret     = ENV['42415_TWITTER_CONSUMER_SECRET']
  config.access_token        = ENV['42415_TWITTER_ACCESS_TOKEN']
  config.access_token_secret = ENV['42415_TWITTER_ACCESS_SECRET']
end

tweets = ['Gonna start', 'Start two', 'And three?', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13!', '14,', '15']

response = nil
handler do |_|<commit_msg>Actually perform the file read<commit_after>require 'rubygems'
require 'clockwork'
require 'twitter'
include Clockwork

unless ENV['RACK_ENV'] == 'production'
  require 'dotenv'
  Dotenv.load
end

client = Twitter::REST::Client.new do |config|
  config.consumer_key        = ENV['42415_TWITTER_CONSUMER_KEY']
  config.consumer_secret     = ENV['42415_TWITTER_CONSUMER_SECRET']
  config.access_token        = ENV['42415_TWITTER_ACCESS_TOKEN']
  config.access_token_secret = ENV['42415_TWITTER_ACCESS_SECRET']
end

tweets_file = File.read('tweets.txt')

tweets = []
tweets_file.split("\n").each_with_index.map do |tweet, i|
  if i > 0
    tweets << "@gjtorikian #{i + 1}. #{tweet}"
  else
    tweets << "#{i + 1}. #{tweet}"
  end
end

response = nil

handler do |_|
{'fraction_non_alphanumeric': 0.14691270404542228, 'fraction_numerical': 0.043293115684882894, 'mean_word_length': 4.949367088607595, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3324670', 'n_tokens_mistral': 597, 'n_tokens_neox': 541, 'n_words': 110}