Make split by gender faster

This commit is contained in:
Roberto Alsina 2024-05-15 20:58:16 -03:00
parent 9a84e979ac
commit b05327fd8d

View File

@ -204,7 +204,7 @@ class Handler
if genero
DB.open("postgres://#{USER}:#{PASS}@10.61.0.1:5432/nombres") do |cursor|
filtered = Array(Tuple(Int32, String)).new
nombres.map { |nombre|
datos.map { |nombre|
fem = feminidad(cursor, nombre[1])
# El overlap en 0.5 es intencional!
if fem >= 0.5 && genero == "f"