<commit_before>class Dashing.Textcarousel extends Dashing.Widget

  ready: ->
    @currentIndex = 0
    @textElem = $(@node).find('p')
    @nextComment()
    @startCarousel()

  onData: (data) ->
    @currentIndex = 0

  startCarousel: ->
    setInterval(@nextComment, 8000)

  nextComment: =>
    texts = @get('texts')<commit_msg>Make text carousel pick up where it left off<commit_after>class Dashing.Textcarousel extends Dashing.Widget

  ready: ->
    @currentIndex = 0
    @textElem = $(@node).find('p')
    @nextComment()
    @startCarousel()

  onData: (data) ->
    # attempt to pick up where we left off, but default to starting over
    @currentIndex = Math.max(0, @get('texts').indexOf(@get('current_text')))

  startCarousel: ->
    setInterval(@nextComment, 8000)

  nextComment: =>
    texts = @get('texts')
{'fraction_non_alphanumeric': 0.14494518879415347, 'fraction_numerical': 0.014616321559074299, 'mean_word_length': 3.6179775280898876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7236578', 'n_tokens_mistral': 282, 'n_tokens_neox': 264, 'n_words': 63}