<commit_before>require 'curses'

module PPCurses

  class PPWindow < Curses::Window

    def initialize(height, width, top, left)
      super(height,width,top,left)

      keypad(true)
      box('|', '-')
    end
<commit_msg>Add hack method to Window<commit_after>require 'curses'

module PPCurses

  class PPWindow < Curses::Window

    def initialize(height, width, top, left)
      super(height,width,top,left)

      keypad(true)
      box('|', '-')
    end



    # EXPERIMENTAL/HACK
    #
    # The following could be used to wrap all getch calls
    # and support window resizes when the getch is blocking
    # all threads.
    #
    def get_ch_handle_signals
      got_input = false
      until got_input
        begin
          c = getch
          got_input = true
        rescue NoMethodError
          # Assuming a SIGWINCH occurred -- reposition..
          c = ''
        end
      end

      c
    end

{'fraction_non_alphanumeric': 0.08396946564885496, 'fraction_numerical': 0.0, 'mean_word_length': 2.111864406779661, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6322729', 'n_tokens_mistral': 295, 'n_tokens_neox': 282, 'n_words': 81}