<commit_before># coding: utf-8

#The class of Fibonacci inspired random number generators.
class FibonacciRng

  #A (mostly) compatible access point for random numbers.
  #<br>Endemic Code Smells
  #* :reek:FeatureEnvy
  def rand(max=0)
    if max.is_a?(Range)
      min = max.min
      dice(1 + max.max - min) + min
    elsif max.zero?
      float
    else
      dice(max.to_i)
    end
  end

  #Roll a dice.
  def dice(sides)
    limit = ((CHOP+1) / sides) * sides

    begin
      do_spin
    end until (value = @buffer[0]) < limit

    value % sides
  end

  #Get a pseudo random byte
  def byte
    do_spin
    @buffer[0] & BYTE
  end

  #Get a string of random bytes
  def bytes(length)
    result = ""
    length.times {result << byte.chr}
    result
  end

  #Get a pseudo random word
  def word
    do_spin
    @buffer[0] & WORD<commit_msg>Marked the bytes method [Deprecated].<commit_after># coding: utf-8

#The class of Fibonacci inspired random number generators.
class FibonacciRng

  #A (mostly) compatible access point for random numbers.
  #<br>Endemic Code Smells
  #* :reek:FeatureEnvy
  def rand(max=0)
    if max.is_a?(Range)
      min = max.min
      dice(1 + max.max - min) + min
    elsif max.zero?
      float
    else
      dice(max.to_i)
    end
  end

  #Roll a dice.
  def dice(sides)
    limit = ((CHOP+1) / sides) * sides

    begin
      do_spin
    end until (value = @buffer[0]) < limit

    value % sides
  end

  #Get a pseudo random byte
  def byte
    do_spin
    @buffer[0] & BYTE
  end

  #[Deprecated] Get a string of random bytes
  def bytes(length)
    result = ""
    length.times {result << byte.chr}
    result
  end

  #Get a pseudo random word
  def word
    do_spin
    @buffer[0] & WORD
{'fraction_non_alphanumeric': 0.0962536023054755, 'fraction_numerical': 0.008069164265129682, 'mean_word_length': 2.370873786407767, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '6487178', 'n_tokens_mistral': 628, 'n_tokens_neox': 610, 'n_words': 196}