<commit_before># These are inspired by JewSanta's work on Main Menu's overlays. Originally
# supposed to be written in Ember, but I couldn't figure out how to get pools
# working in its very rigid structure. So here it is.

# Variables.
delay = 5               # Delay before looping.
running = false         # Are we running any alerts?
poolDonating = 0        # How many users are in the donation pool?
poolHosting = 0         # How many users are in the hosting pool?
poolSubscribing = 0     # How many users are in the subscription pool?

# Sounds.
soundDonation = new Audio('/static/audio/donation.ogg')
soundDonation.volume = 0.4
soundSubscription = new Audio('/static/audio/subscription.ogg')
soundSubscription.volume = 0.4

subscribed = (data, added) ->
  if not running
    running = true
    console.log "#{data.username} has subscribed!"

    # Play the subscription beat!
    soundSubscription.play()

    # Add the .visible class to .js-subscribed to kick off the animation set.
    # It's a self-contained animation, so there's no need to do much else.
    ($ '.js-type').text('Subscription')
    ($ '.js-username').text(data.username)
    ($ '.js-subscribed').addClass('visible')
    ($ '.js-square-flipper').addClass('toggle')
    ($ '.js-square-subscribed').addClass('visible')

    # Set a timeout (6000ms) equal to that of the entire reveal animation.
    setTimeout (->
      ($ '.js-subscribed').removeClass('visible')
      ($ '.js-square-flipper').removeClass('toggle')
      ($ '.js-square-subscribed').removeClass('visible')

      running = false
      if poolSubscribing >= 1
        poolSubscribing--
        console.log "There are #{poolSubscribing} subs left in the pool."
    ), 6900
  else<commit_msg>Even lower now.<commit_after># These are inspired by JewSanta's work on Main Menu's overlays. Originally
# supposed to be written in Ember, but I couldn't figure out how to get pools
# working in its very rigid structure. So here it is.

# Variables.
delay = 5               # Delay before looping.
running = false         # Are we running any alerts?
poolDonating = 0        # How many users are in the donation pool?
poolHosting = 0         # How many users are in the hosting pool?
poolSubscribing = 0     # How many users are in the subscription pool?

# Sounds.
soundDonation = new Audio('/static/audio/donation.ogg')
soundDonation.volume = 0.25
soundSubscription = new Audio('/static/audio/subscription.ogg')
soundSubscription.volume = 0.25

subscribed = (data, added) ->
  if not running
    running = true
    console.log "#{data.username} has subscribed!"

    # Play the subscription beat!
    soundSubscription.play()

    # Add the .visible class to .js-subscribed to kick off the animation set.
    # It's a self-contained animation, so there's no need to do much else.
    ($ '.js-type').text('Subscription')
    ($ '.js-username').text(data.username)
    ($ '.js-subscribed').addClass('visible')
    ($ '.js-square-flipper').addClass('toggle')
    ($ '.js-square-subscribed').addClass('visible')

    # Set a timeout (6000ms) equal to that of the entire reveal animation.
    setTimeout (->
      ($ '.js-subscribed').removeClass('visible')
      ($ '.js-square-flipper').removeClass('toggle')
      ($ '.js-square-subscribed').removeClass('visible')

      running = false
      if poolSubscribing >= 1
        poolSubscribing--
        console.log "There are #{poolSubscribing} subs left in the pool."
    ), 6900
  else
{'fraction_non_alphanumeric': 0.11959654178674352, 'fraction_numerical': 0.01037463976945245, 'mean_word_length': 3.083529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '665522', 'n_tokens_mistral': 1011, 'n_tokens_neox': 972, 'n_words': 341}