Skip to content

Instantly share code, notes, and snippets.

View TheLurps's full-sized avatar

Joshua Schraven TheLurps

View GitHub Profile
@TheLurps
TheLurps / litellm-config.yaml
Created April 14, 2025 11:37
OpenWebUI + Ollama + LiteLLM setup on Bazzite using Podman Quadlets (NVIDIA GPU)
general_settings:
master_key: sk-1234 # enter your own master key, ensure it starts with 'sk-'
alerting: [] # Setup slack alerting - get alerts on LLM exceptions, Budget Alerts, Slow LLM Responses
proxy_batch_write_at: 60 # Batch write spend updates every 60s
database_connection_pool_limit: 10 # limit the number of database connections to = MAX Number of DB Connections/Number of instances of litellm proxy (Around 10-20 is good number)
# OPTIONAL Best Practices
disable_spend_logs: True # turn off writing each transaction to the db. We recommend doing this is you don't need to see Usage on the LiteLLM UI and are tracking metrics via Prometheus
disable_error_logs: True # turn off writing LLM Exceptions to DB
allow_requests_on_db_unavailable: True # Only USE when running LiteLLM on your VPC. Allow requests to still be processed even if the DB is unavailable. We recommend doing this if you're running LiteLLM on VPC that cannot be accessed from the public internet.
@TheLurps
TheLurps / mlflow-server.container
Created April 1, 2025 16:04
Podman quadlet for local mlflow-server using SQLite
[Container]
ContainerName=mlflow-server
Image=ghcr.io/mlflow/mlflow:latest
Volume=mlruns:/mlruns:z
Volume=mlartifacts:/mlartifacts:z
Exec=mlflow server --backend-store-uri sqlite:///mlruns/backend.sqlite --registry-store-uri sqlite:///mlruns/registry.sqlite --serve-artifacts --artifacts-destination file:///mlartifacts --host 0.0.0.0
Pull=newer
PublishPort=5000:5000
AutoUpdate=registry
@TheLurps
TheLurps / duckdb_sampling.ipynb
Last active April 1, 2025 09:36
DuckDB sampling from parquet and hive partitioned parquet files
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TheLurps
TheLurps / service-map.html
Created September 17, 2024 17:30
Service map generated using D3.js and dummy data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dummy service map</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<style>
.node circle {
fill: blue;
stroke: black;
@TheLurps
TheLurps / count_heartbeats.ipynb
Created December 9, 2022 21:06
Evaluate number of online clients based upon heartbeats in MongoDB
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TheLurps
TheLurps / narrowing_grids.ipynb
Created November 28, 2022 19:11
Find maximum with narrowing grids
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TheLurps
TheLurps / docker-compose.yml
Last active November 15, 2022 15:17
docker compose start host with external IP
---
version: '3.8'
networks:
lan:
driver: ipvlan
driver_opts:
parent: enp0s31f6
ipam:
driver: default
@TheLurps
TheLurps / roman2int.py
Created October 11, 2022 18:45
Convert roman numerals to integer in python3
#!/usr/bin/env python3
def roman2int(roman):
sum = 0
previous = 0
roman_numerals = { 'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000 }
for c in [*roman][::-1]:
current = roman_numerals[c]
if previous > current:
sum -= current
const { Data } = require("dataclass");
class Timespan extends Data {
start;
end;
}
open = [
Timespan.create({
start: new Date("December 12, 2022 11:00:00"),
@TheLurps
TheLurps / planck_rev6_drop_thelurps.json
Last active March 20, 2025 09:33
Custom QMK layout for my Planck v6 by Massdrop
{
"version": 1,
"notes": "Added RightAlt in all layouts for international characters, added Dvorak Programmers without touching numbers and special characters",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "planck/rev6_drop",
"keymap": "thelurps",
"layout": "LAYOUT_ortho_4x12",
"layers": [
[
"KC_TAB",