Skip to content

Instantly share code, notes, and snippets.

View inf3rtil's full-sized avatar

Fernando Ferreira inf3rtil

View GitHub Profile
@inf3rtil
inf3rtil / demo_llm_rigol_dp800.py
Created July 2, 2025 06:55
LLM on Rigol DP800
from telegram import Update
from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes
import pyvisa
import ollama
BOT_TOKEN = "meu token gerado no botfather"
system_context="""
You are a natural language to fixed command converter for a power supply (channel).
1. translate from portuguese to english and change all string numbers to digits values if necessary
@inf3rtil
inf3rtil / RigolDP800.py
Created May 9, 2025 21:30
Rigol DP800
"""Use a Rigol DP800 to monitor load and store test on database."""
import pyvisa
import time
import mysql.connector
from datetime import datetime, timezone
def connect_to_database():
"""Connect to mysql database."""
try:
;; START custom -----------------------------------------
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(c-basic-offset 4)
'(custom-enabled-themes '(modus-vivendi-deuteranopia))
'(custom-safe-themes