<commit_before>class IO
  SEEK_SET = 0
  SEEK_CUR = 1
  SEEK_END = 2
  SEEK_DATA = 3
  SEEK_HOLE = 4

  READABLE = 1
  WRITABLE = 4

  def initialize(fd, flags = 'r')
    @fd = fd
    @flags = flags
    @eof = false

    if flags.include?('r') && !flags.match?(/[wa+]/)
      @closed = :write
    elsif flags.match?(/[wa]/) && !flags.match?(/[r+]/)
      @closed = :read
    end
  end

  def tty?
    `self.tty == true`
  end

  attr_accessor :write_proc
  attr_accessor :read_proc

  def write(string)
    `self.write_proc(string)`
    string.size
  end

  attr_accessor :sync, :tty<commit_msg>IO#fileno<commit_after>class IO
  SEEK_SET = 0
  SEEK_CUR = 1
  SEEK_END = 2
  SEEK_DATA = 3
  SEEK_HOLE = 4

  READABLE = 1
  WRITABLE = 4

  def initialize(fd, flags = 'r')
    @fd = fd
    @flags = flags
    @eof = false

    if flags.include?('r') && !flags.match?(/[wa+]/)
      @closed = :write
    elsif flags.match?(/[wa]/) && !flags.match?(/[r+]/)
      @closed = :read
    end
  end

  def fileno
    @fd
  end

  def tty?
    `self.tty == true`
  end

  attr_accessor :write_proc
  attr_accessor :read_proc

  def write(string)
    `self.write_proc(string)`
    string.size
  end

  attr_accessor :sync, :tty
{'fraction_non_alphanumeric': 0.1416803953871499, 'fraction_numerical': 0.011532125205930808, 'mean_word_length': 2.4322033898305087, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5678755', 'n_tokens_mistral': 531, 'n_tokens_neox': 491, 'n_words': 113}