Skip to content

Instantly share code, notes, and snippets.

View guiathayde's full-sized avatar
🚀
Flying high

Guilherme Athayde guiathayde

🚀
Flying high
View GitHub Profile
@guiathayde
guiathayde / Tests.java
Created September 19, 2025 14:03
Engenharia de Software 2 - PC.04
// ### Inicio testes caixa-branca ###
// Ex7
/**
* Grafo de Fluxo de Controle do método enviarPara(..):
* Nós:
* 1: Início
* 2: if (nomes == null)
* 3: usuarios = usuarioDAO.getAllUsuarios()
* 4: if (usuarios == null || usuarios.size() == 0)
@guiathayde
guiathayde / RelatorioDeFuncionariosTest.java
Created September 7, 2025 20:24
RelatorioDeFuncionariosTest.java
package org.example.s03.ex4;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.util.ArrayList;
import static org.junit.jupiter.api.Assertions.assertEquals;
@guiathayde
guiathayde / SomatoriaTest.java
Created September 7, 2025 20:23
Ex3: SomatoriaTest.java
package org.example.s03.ex3;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.*;
@guiathayde
guiathayde / SomatoriaTest.java
Created September 7, 2025 20:22
SomatoriaTest.java
package org.example.s03.ex2;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.*;
@guiathayde
guiathayde / google_drive_uploader.py
Created September 3, 2025 19:58
Google Drive Uploader Python
import json
import mimetypes
from typing import Optional
import os
from urllib.parse import urlencode, quote
# ==== Exceptions ====
class TokenExchangeError(Exception):
pass
@guiathayde
guiathayde / AnalisadorTest.java
Created September 2, 2025 14:14
AnalisadorTest.java
package org.example.s01.ex5;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import static org.junit.jupiter.api.Assertions.*;
public class AnalisadorTest {
@Test
public void testAnalisarComListaNulaOuVazia() {
@guiathayde
guiathayde / ClassificadorTest.java
Created September 2, 2025 14:14
ClassificadorTest.java
package org.example.s01.ex4;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class ClassificadorTest {
@Test
public void testDefinirFaixaEtariaComIdadeInvalida() {
Classificador classificador = new Classificador();
@guiathayde
guiathayde / IMCCalculadoraTest.java
Created September 2, 2025 14:13
IMCCalculadoraTest.java
package org.example;
import org.example.s01.ex3.IMCCalculadora;
import org.example.s01.ex3.IMCStatus;
import org.example.s01.ex3.Pessoa;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class IMCCalculadoraTest {
@guiathayde
guiathayde / media_dispersao_analise_estatistica_t.py
Last active July 4, 2025 21:53
Médias de tempo de execução das estratégias e Dispersão dos tempos de execução (Boxplot)
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
# Dados simulados baseados no artigo: "An Experimental Analysis on Different Pivot Selection Approaches for the Quicksort Algorithm"
data = {
'Estratégia': ['MOT', 'MO5', 'MO7'],
'Média de Tempo (s)': [0.0124, 0.0139, 0.0112],
'Desvio Padrão': [0.001, 0.002, 0.0008]
}
@guiathayde
guiathayde / portal_do_cidadao_grupo_10.sql
Created June 11, 2025 18:06
Script SQL para criação do esquema físico do subsistema Portal do Cidadão - Grupo 10 - PIBD
-- ================================================================
-- 1. Criação do Banco de Dados e Implementação de Restrições
-- ================================================================
-- Drop e criação do banco de dados
DROP DATABASE IF EXISTS portal_cidadao;
CREATE DATABASE portal_cidadao;
\c portal_cidadao;
-- Tabela: Cidadão