0.0
No commit activity in last 3 years
No release in over 3 years
Generates permutations and returns an array, or prints to csv, or prints to console. See https://github.com/andydwyer/brutalitops for usage.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Generates permutations and returns an array, or prints to csv, or prints to console. See https://github.com/andydwyer/brutalitops for usage.

Usage

Initialization

Brutalitops.new( min_length_of_the_permutation, max_length_of_the_permutation, [optional_symbols_and_or_custom_array] )

Example:
b = Brutalitops.new(1,3,[:alpha_lowercase, :alpha_uppercase, :nums, :special_chars, ["ä", "ö", "ü"]])

:alpha_lowercase = ('a'..'z').to_a
:alpha_uppercase = ('A'..'Z').to_a
:nums = (0..9).to_a
:special_chars = [' ', '!', '@', '#', '$', '%','^', '&', '*', '(', ')', '-', '_', '+', '=', '[', ']', '{', '}', '|', '\\', '?', "/", '<', '>', '.', ',', '~', '`']
["ä", "ö", "ü"] = any array of elements

All arrays passed in as the 3rd argument are concatentated.

Note: Generating permutations when max_length_of_the_permutation > 3 might take a long time (i.e. hours) depending on your processing power.

Methods

b.print_permutations_to_console

-Prints the resulting permutations to console.
-Accepts an optional boolean argument to turn off status-related console messages, e.g. b.print_permutations_to_console(false)
b.print_permutations_to_csv

-Prints the resulting permutations to a CSV named brutalitops_<time stamp>.csv
-Accepts an optional boolean argument to turn off status-related console messages, e.g. b.print_permutations_to_csv(false)
a = b.to_array

-Returns the resulting permutations to an array