Skip to content

Commit

Permalink
Added name generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel3dartist committed Nov 19, 2023
1 parent a867ab4 commit 29ad123
Show file tree
Hide file tree
Showing 16 changed files with 525 additions and 17 deletions.
99 changes: 99 additions & 0 deletions pyFBIG/BR_names/BR_female_names.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"names": [
"Maria",
"Ana",
"Juliana",
"Amanda",
"Carla",
"Fernanda",
"Isabela",
"Larissa",
"Camila",
"Patrícia",
"Gabriela",
"Letícia",
"Beatriz",
"Luana",
"Lívia",
"Mariana",
"Débora",
"Raquel",
"Renata",
"Tatiane",
"Vitória",
"Bianca",
"Mirella",
"Thais",
"Cristiane",
"Lorena",
"Clara",
"Alice",
"Eduarda",
"Valentina",
"Giovanna",
"Laura",
"Sophia",
"Manuela",
"Rafaela",
"Natalia",
"Heloisa",
"Aline",
"Bárbara",
"Rosa",
"Cecília",
"Elaine",
"Priscila",
"Jéssica",
"Fátima",
"Renata",
"Kelly",
"Elaine",
"Patricia",
"Silvana",
"Roberta",
"Alessandra",
"Daniela",
"Monique",
"Talita",
"Adriana",
"Flávia",
"Leticia",
"Fernanda",
"Evelyn",
"Cintia",
"Lilian",
"Luciana",
"Sandra",
"Nicole",
"Marcela",
"Júlia",
"Natália",
"Denise",
"Priscila",
"Alessandra",
"Caroline",
"Valéria",
"Márcia",
"Fernanda",
"Vivian",
"Amanda",
"Vera",
"Lara",
"Andressa",
"Talita",
"Izabella",
"Andreia",
"Crislaine",
"Luma",
"Jordana",
"Tainá",
"Luiza",
"Marina",
"Isabelly",
"Nayara",
"Simone",
"Roberta",
"Lucimara"
]
}

100 changes: 100 additions & 0 deletions pyFBIG/BR_names/BR_male_names.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"names": [
"João",
"Pedro",
"Lucas",
"Mateus",
"Gabriel",
"Enzo",
"Luiz",
"Miguel",
"Arthur",
"Rafael",
"Heitor",
"Guilherme",
"Samuel",
"Vinícius",
"Eduardo",
"Daniel",
"Gustavo",
"Felipe",
"Luan",
"Matheus",
"Leonardo",
"Henrique",
"Pietro",
"Cauã",
"André",
"Bruno",
"Diego",
"Thiago",
"Carlos",
"Fernando",
"Joaquim",
"Ian",
"Vitor",
"Bryan",
"Alan",
"Raul",
"Erick",
"Caio",
"José",
"Leandro",
"Ricardo",
"Sérgio",
"Alexandre",
"Elias",
"Paulo",
"Antônio",
"Marcelo",
"Roberto",
"Ramon",
"Dieguinho",
"Mário",
"Francisco",
"Júlio",
"Hugo",
"Rodrigo",
"Nathan",
"Renato",
"Davi",
"Thales",
"Igor",
"Otávio",
"Ronaldo",
"Ivan",
"Cristiano",
"Wagner",
"Alberto",
"Joel",
"Valmir",
"Wesley",
"Adriano",
"Fábio",
"Levi",
"Maicon",
"Luciano",
"Vinícius",
"Nícolas",
"Dênis",
"Lorenzo",
"Flávio",
"Waldemar",
"Cláudio",
"Rui",
"Giovanni",
"Emanuel",
"Benício",
"Ariel",
"Éder",
"Hélio",
"Jair",
"Max",
"Ulisses",
"Wander",
"Yago",
"",
"Renê"
]
}

98 changes: 98 additions & 0 deletions pyFBIG/BR_names/BR_surnames.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"surnames": [
"Silva",
"Santos",
"Oliveira",
"Pereira",
"Costa",
"Rodrigues",
"Martins",
"Gomes",
"Ferreira",
"Almeida",
"Rocha",
"Melo",
"Carvalho",
"Cardoso",
"Ribeiro",
"Lima",
"Araújo",
"Cavalcante",
"Dias",
"Sousa",
"Nascimento",
"Cruz",
"Monteiro",
"Mendes",
"Cunha",
"Moura",
"Castro",
"Campos",
"Farias",
"Fernandes",
"Tavares",
"Dantas",
"Sales",
"Correia",
"Freitas",
"Duarte",
"Moraes",
"Barbosa",
"Teixeira",
"Barros",
"Siqueira",
"Vieira",
"Lopes",
"Machado",
"Moreira",
"Bezerra",
"Andrade",
"Farias",
"Pinto",
"Menezes",
"Lins",
"Lacerda",
"Marques",
"Peixoto",
"Abreu",
"Lemos",
"Coutinho",
"Gonçalves",
"Figueiredo",
"Azevedo",
"Motta",
"Queiroz",
"Pessoa",
"Leal",
"Gusmão",
"Cordeiro",
"Dantas",
"Xavier",
"Brito",
"Braga",
"Diniz",
"Alves",
"Nogueira",
"Lima",
"Amorim",
"Barreto",
"Gentil",
"Fonseca",
"Vasconcelos",
"Morais",
"Gonçalves",
"Caldas",
"Oliveira",
"Prado",
"Pimentel",
"Câmara",
"Furtado",
"Vargas",
"Cavalcanti",
"Medeiros",
"Lacerda",
"Arantes",
"Paiva"
]
}

61 changes: 61 additions & 0 deletions pyFBIG/BR_names/name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import json
import os
import pathlib
from random import randrange

class Name:
def __init__(self):
self.path = pathlib.Path(__file__).parent.resolve()
self.path = str(self.path).replace('\\', '/')

def json_load(self, name_list):
return json.load(name_list)

def female_name(self):
female_name = open(self.path + '/BR_female_names.json')
_list = self.json_load(name_list=female_name)
return _list['names']

def male_name(self):
male_name = open(self.path + '/BR_male_names.json')
_list = self.json_load(name_list=male_name)
return _list['names']

def surname(self):
male_name = open(self.path + '/BR_surnames.json')
_list = self.json_load(name_list=male_name)
return _list['surnames']

def gen_name(self, is_complete: bool = False):
rand_list: list = [self.gen_female_name(), self.gen_male_name()]
_index = randrange(0, 2)
_name = rand_list[_index]
if is_complete == False:
return _name
else:
surnames: list = [self.gen_surname()]
while True:
if len(surnames) == 2:
break
rand_surname: str = self.gen_surname()
if surnames[0] != rand_surname:
surnames.append(rand_surname)
return _name + ' '+ surnames[0] + ' ' + surnames[1]

def gen_female_name(self):
female_name = self.female_name()
return female_name[randrange(0, len(female_name))]

def gen_male_name(self):
male_name = self.male_name()
return male_name[randrange(0, len(male_name))]

def gen_surname(self):
surname = self.surname()
return surname[randrange(0, len(surname))]


if __name__ == "__main__":
Name().female_name()
Name().male_name()
Name().surname()
4 changes: 3 additions & 1 deletion pyFBIG/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
from .rg_generator import RGGenerator
from .rg_product import RGProduct
from .crm_generator import CRMGenerator
from .crm_product import CRMProduct
from .crm_product import CRMProduct

from .BR_names.name import Name
5 changes: 2 additions & 3 deletions pyFBIG/cpf_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

class CPFProduct(IGenProduct):
def __init__(self):
self.especil_char = True
self.return_list = False

self.especil_char: bool = True
self.return_list: bool = False

def gen(self):
cpf: list = [str(self.rand_num()) for i in range(0, 11)]
Expand Down
4 changes: 2 additions & 2 deletions pyFBIG/crm_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class CRMProduct(IGenProduct):
def __init__(self):
self.especial_char = True
self.return_list = False
self.especial_char: bool = True
self.return_list: bool = False

def gen(self):
_br:str = 'BR'
Expand Down
Loading

0 comments on commit 29ad123

Please sign in to comment.