Created
December 17, 2019 06:52
-
-
Save baweaver/5cd03d89c335a0263265fc36bbc8ef79 to your computer and use it in GitHub Desktop.
My spectacularly convoluted selection criteria
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
names = %w( | |
@OtherChrisPine @DaveAronson @mellowfish @ktcarrel18 @yvonesre @molbrwn @_MylesHigh_ @DoodlingDev @nilsding @mae701 | |
) | |
totally_random_results = "Lemur fun!" | |
.chars | |
.map(&:ord) | |
.zip(names.shuffle.map(&:ord)) | |
.sample | |
.sum | |
.*(Time.now.to_i / 100_000 / 418) | |
.times | |
.map { names.sample } | |
.tally | |
.sort_by(&:last) | |
.to_h | |
puts "...and the winner is: #{totally_random_results.first.first}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment