<commit_before>require "twitter"

# https://apps.twitter.com/app/7845439
client = Twitter::REST::Client.new do |config|
  config.consumer_key        = ENV["FLAVORCRAVER_CONSUMER_KEY"]
  config.consumer_secret     = ENV["FLAVORCRAVER_CONSUMER_SECRET"]
  config.access_token        = ENV["FLAVORCRAVER_ACCESS_TOKEN"]
  config.access_token_secret = ENV["FLAVORCRAVER_ACCESS_TOKEN_SECRET"]
end

client.update("\"But once, with a magician's help, Time was stopped and Day stood still.\"
—Love Song of Night and Day")<commit_msg>mvp done! run the program to post a random bite of flavor<commit_after>require "twitter"
require 'json'

# https://apps.twitter.com/app/7845439
client = Twitter::REST::Client.new do |config|
  config.consumer_key        = ENV["FLAVORCRAVER_CONSUMER_KEY"]
  config.consumer_secret     = ENV["FLAVORCRAVER_CONSUMER_SECRET"]
  config.access_token        = ENV["FLAVORCRAVER_ACCESS_TOKEN"]
  config.access_token_secret = ENV["FLAVORCRAVER_ACCESS_TOKEN_SECRET"]
end

file = File.read('AllSets.json')
all_sets = JSON.parse(file)


number_of_sets = all_sets.keys.length
random_set = all_sets.keys[rand(0...number_of_sets)]
set = all_sets[random_set]["cards"]
puts random_set
puts set.length

number_of_cards_in_set = set.length
card = set[rand(0...number_of_cards_in_set)]
flavor = card["flavor"]
puts flavor
if flavor && flavor.length < 140
  client.update(flavor)
end

{'fraction_non_alphanumeric': 0.11544011544011544, 'fraction_numerical': 0.013708513708513708, 'mean_word_length': 5.391705069124424, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '4356741', 'n_tokens_mistral': 525, 'n_tokens_neox': 504, 'n_words': 91}