Skip to content

Instantly share code, notes, and snippets.

View revolunet's full-sized avatar
🐫
Killing bugz

Julien Bouquillon revolunet

🐫
Killing bugz
View GitHub Profile
@revolunet
revolunet / console.js
Created February 26, 2025 22:37
extract updown.io down url
copy(Array.from($0.querySelectorAll("li.down .url")).map(li =>
`${li.querySelector(".link a.internal").textContent}\t${li.querySelector("div.status:first-child").textContent}`
).join("\n"))
@revolunet
revolunet / MLOPS-GIT.md
Last active January 28, 2025 23:50
GitOps for machine learning
@revolunet
revolunet / workflow.md
Last active January 20, 2025 14:24
upload process

File upload workflow

graph TD

browser-->|POST file|API
API-->Parser[Parser : html,md,pdf...]-->|content,metadata|Chunker
Chunker(LangchainRecursiveCharacterTextSplitter)-->Search
@revolunet
revolunet / ollama.sh
Created January 10, 2025 01:11
curl + jq + ollama FTW
# run query from a plain prompt text file
jq -Rs '{ stream: false, model: "llama3.2", prompt: . }' ./some.prompt | curl -X POST http://127.0.0.1:11434/api/generate --data-binary @- | jq -r '.response'
@revolunet
revolunet / .env
Last active January 3, 2025 10:39
ProConnect + oauth2-proxy test
#
# for some reason this give "neither the id_token nor the profileURL set an email"
#
#
#
# https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview
#
OAUTH2_PROXY_HTTP_ADDRESS: "0.0.0.0:4180"
OAUTH2_PROXY_WHITELIST_DOMAINS: "*.kube-dev.incubateur.net"
OAUTH2_PROXY_DISPLAY_NAME: "test-pc provider"
@revolunet
revolunet / scaleway-gen-api.js
Last active December 29, 2024 14:31
Scaleway GenAI example with fetch
const query =
"Fais-moi un texte de RAP à la gloire de betagouv et formattes le en markdown";
const res = fetch(
"https://api.scaleway.ai/xxx",
{
method: "POST",
headers: {
Authorization: "Bearer xxx",
"Content-Type": "application/json",
@revolunet
revolunet / internet.mjs
Last active December 11, 2024 00:19
Albert internet collection demo
// @ts-check
// run in your browser or with `node internet.mjs` with the ALBERT_API_KEY set below
// see also: https://albert.api.etalab.gouv.fr/documentation
const API_KEY = process.env.ALBERT_API_KEY;
const API_URL = "https://albert.api.etalab.gouv.fr";
const LANGUAGE_MODEL = "AgentPublic/llama3-instruct-8b"; // see https://albert.api.etalab.gouv.fr/v1/models
@revolunet
revolunet / francejs.geojson
Created December 9, 2024 23:30
francejs.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@revolunet
revolunet / albert.mjs
Last active December 11, 2024 00:18
Albert API With RAG and JavaScript
// @ts-check
// see also: https://albert.api.etalab.gouv.fr/documentation
import { readFile, readdir } from "fs/promises";
import pAll from "p-all";
const API_KEY = process.env.ALBERT_API_KEY;
const API_URL = "https://albert.api.etalab.gouv.fr";
@revolunet
revolunet / test.md
Created November 29, 2024 23:14
test mermaid charts

test mermaid charts

see all on https://mermaid.live

Pie

pie title Pets adopted by volunteers
    "Dogs" : 386
    "Cats" : 85