<commit_before># encoding: utf-8

module Carto
  class StrongPasswordValidator
    DEFAULT_MIN_LENGTH = 8
    DEFAULT_MAX_LENGTH = 64
    DEFAULT_MIN_NUMBERS = 1
    DEFAULT_MIN_SYMBOLS = 1
    DEFAULT_MIN_LETTERS = 1

    SYMBOLS = %w({ } [ ] , . < > ; : ‘ “ ? / | \ ` ~ ! @ # $ % ^ & * ( ) _ - + =).freeze

    def initialize(min_length: DEFAULT_MIN_LENGTH,
                   max_length: min_length > DEFAULT_MAX_LENGTH ? min_length : DEFAULT_MAX_LENGTH,
                   min_letters: DEFAULT_MIN_NUMBERS,
                   min_symbols: DEFAULT_MIN_SYMBOLS,
                   min_numbers: DEFAULT_MIN_LETTERS)

      @min_length  = min_length
      @max_length  = max_length
      @min_letters = min_letters
      @min_symbols = min_symbols
      @min_numbers = min_numbers
    end<commit_msg>correct space inclussion<commit_after># encoding: utf-8

module Carto
  class StrongPasswordValidator
    DEFAULT_MIN_LENGTH = 8
    DEFAULT_MAX_LENGTH = 64
    DEFAULT_MIN_NUMBERS = 1
    DEFAULT_MIN_SYMBOLS = 1
    DEFAULT_MIN_LETTERS = 1

    SYMBOLS = %w({ } [ ] , . < > ; : ‘ “ ? / | \  ` ~ ! @ # $ % ^ & * ( ) _ - + =).freeze

    def initialize(min_length: DEFAULT_MIN_LENGTH,
                   max_length: min_length > DEFAULT_MAX_LENGTH ? min_length : DEFAULT_MAX_LENGTH,
                   min_letters: DEFAULT_MIN_NUMBERS,
                   min_symbols: DEFAULT_MIN_SYMBOLS,
                   min_numbers: DEFAULT_MIN_LETTERS)

      @min_length  = min_length
      @max_length  = max_length
      @min_letters = min_letters
      @min_symbols = min_symbols
      @min_numbers = min_numbers
    end
{'fraction_non_alphanumeric': 0.0880893300248139, 'fraction_numerical': 0.008684863523573201, 'mean_word_length': 2.3326446280991737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '916364', 'n_tokens_mistral': 560, 'n_tokens_neox': 518, 'n_words': 91}