Skip to content

Instantly share code, notes, and snippets.

View LeMoussel's full-sized avatar

LeMoussel LeMoussel

View GitHub Profile
@LeMoussel
LeMoussel / hermes-agent_vectorless_rag_demo.py
Last active May 6, 2026 12:34
Vectorless RAG demo with PageIndex and Hermes Agent: registers custom document tools, indexes a PDF, inspects its structure, and answers questions without embeddings.
"""Run a vectorless RAG demo with PageIndex and Hermes Agent.
This module demonstrates a document question-answering workflow that avoids
vector embeddings and chunk-based similarity search. Instead, PageIndex
provides a hierarchical representation of the document, and Hermes Agent uses
custom tools to inspect the structure, fetch metadata, and read selected pages
before answering a question.
The registered Hermes tools are:
get_document: Returns document metadata such as status and page count.
@LeMoussel
LeMoussel / Chromedriver_Get_Response.py
Last active April 25, 2025 01:43
Python Selenium: Get response attributes via the ChromeDriver performance logging capability
"""
Implementation of the Selenium Chrome WebDriver with HTTP Response data
included via the ChromeDriver performance logging capability
"""
import json
from requests.structures import CaseInsensitiveDict
# https://github.com/SeleniumHQ/selenium
from selenium import webdriver
@LeMoussel
LeMoussel / contentloader.py
Created February 15, 2021 14:15
Compare keyword extraction results, in French language, from TF/IDF, Yake, KeyBert.
import os
import codecs
import urllib3
import gzip
from pathlib import Path
# CChardet is faster and can be more accurate
try:
import cchardet as chardet
except ImportError: