<commit_before>#!usr/bin/env ruby

require 'terminfo'
require 'io/console'
require 'ostruct'
require 'termios'

#
#  terminal.rb
#
# Created by <NAME> on 2008-03-01.
# Copyright (c) 2008 <NAME>. All rights reserved.
#
# This is Free Software.  See LICENSE for details.
#
#
#
module RawLine

  #
  # The Terminal class defines character codes and code sequences which can be
  # bound to actions by editors.
  # An OS-dependent subclass of RawLine::Terminal is automatically instantiated by
  # RawLine::Editor.
  #
  class Terminal
    include HighLine::SystemExtensions

    attr_accessor :escape_codes, :input, :output
    attr_reader :keys, :escape_sequences

    #
    # Create an instance of RawLine::Terminal.
    #
    def initialize(input, output)
      @input = input
      @output = output
      @snapshotted_tty_attrs = []
      @keys =
        {
        :tab => [?\t.ord],
        :return => [?\r.ord],
        :newline => [?\n.ord],
        :escape => [?\e.ord],
        :space => [32],

        :ctrl_a => [?\C-a.ord],
        :ctrl_b => [?\C-b.ord],
        :ctrl_c => [?\C-c.ord],
        :ctrl_d => [?\C-d.ord],<commit_msg>Provide shift_tab as a key.<commit_after>#!usr/bin/env ruby

require 'terminfo'
require 'io/console'
require 'ostruct'
require 'termios'

#
#  terminal.rb
#
# Created by <NAME> on 2008-03-01.
# Copyright (c) 2008 <NAME>. All rights reserved.
#
# This is Free Software.  See LICENSE for details.
#
#
#
module RawLine

  #
  # The Terminal class defines character codes and code sequences which can be
  # bound to actions by editors.
  # An OS-dependent subclass of RawLine::Terminal is automatically instantiated by
  # RawLine::Editor.
  #
  class Terminal
    include HighLine::SystemExtensions

    attr_accessor :escape_codes, :input, :output
    attr_reader :keys, :escape_sequences

    #
    # Create an instance of RawLine::Terminal.
    #
    def initialize(input, output)
      @input = input
      @output = output
      @snapshotted_tty_attrs = []
      @keys =
        {
        :tab => [?\t.ord],
        :shift_tab => [27, 91, 90],
        :return => [?\r.ord],
        :newline => [?\n.ord],
        :escape => [?\e.ord],
        :space => [32],

        :ctrl_a => [?\C-a.ord],
        :ctrl_b => [?\C-b.ord],
        :ctrl_c => [?\C-c.ord],
        :ctrl_d => [?\C-d.ord],
{'fraction_non_alphanumeric': 0.14549356223175966, 'fraction_numerical': 0.014592274678111588, 'mean_word_length': 2.484304932735426, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 26, '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': '479088', 'n_tokens_mistral': 839, 'n_tokens_neox': 789, 'n_words': 213}