Skip to content

Instantly share code, notes, and snippets.

# Características:
# Cada nodo tiene un ID único --LISTO
# Mantiene una lista de vecinos (otros nodos) --LISTO
# Tiene un log interno de eventos y estados --LSITO
# - Puede proponer un estado y buscar consenso a través de un algoritmo simplificado
# - Puede simular particiones de red y fallos --LISTO
# - Puede registrar todos los mensajes y transiciones de estado LSITO
class Node
attr_reader :id, :log
import gspread
from google.oauth2.service_account import Credentials
SCOPES = [
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/drive",
]
SERVICE_ACCOUNT_FILE = (
"/Users/cristopher/Desktop/gsheet_api/gentle-dominion-453920-r8-f2a7cc04be1f.json"