Skip to content

Instantly share code, notes, and snippets.

View vilsonrodrigues's full-sized avatar
🤠

Vilson Rodrigues vilsonrodrigues

🤠
View GitHub Profile
@vilsonrodrigues
vilsonrodrigues / chat_history.py
Last active October 2, 2024 17:04
A multimodal chat history multi user implementation in python. ChatHistory can manage chat duration based-on time. Implement reranker methods to search relevant messages from users.
import asyncio
import math
import re
from collections import defaultdict
from datetime import datetime, timedelta
from typing import Callable, Dict, List, Optional, Union
class BasicDBConnector:
kfolds = 5
scores = cross_val_score(modelo, x, Y, cv = kfolds, scoring = "accuracy")
print("Resultado dos k testes", scores)
print("Média dos testes", scores.mean())
print("Desvio Padrão dos testes", scores.std())
@vilsonrodrigues
vilsonrodrigues / lib-cross-validation.py
Last active February 20, 2020 18:24
Importando lib do cross-validation
from sklearn.model_selection import cross_val_score
import Numpy as np