- This is jank.
- Modify setup_model.sh to change the AI model in use. If you change the model, you may need to delete the "ollama_data" folder.
- This setup assumes that you're using an Nvidia GPU and have the Nvidia Container Toolkit setup on the host OS.
- Steps to running this:
- Download files from the gist to a folder.
- Open a terminal to that folder, and run
docker-compose up
- After everything is running, the web UI should be available on http://localhost:3000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pulsectl | |
import dbus | |
def show_notification(title, message, icon_name): | |
""" | |
Show a desktop notification using D-Bus directly. | |
Args: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
from datetime import datetime | |
from tabulate import tabulate | |
# Dictionary to store the 'Stopping' event timestamps | |
stopping_events = {} | |
# Dictionary to store the elapsed time for each service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
import dbus | |
import pygame | |
import argparse | |
import datetime | |
from gi.repository import GLib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import dbus | |
import dbus.mainloop.glib | |
import gi | |
from gi.repository import GLib | |
# Initialize the D-Bus main loop | |
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import json | |
import time | |
import subprocess | |
import statistics | |
""" | |
{ "sensor_low": 35, "sensor_high": 40, "fan_level": 30 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SERVICE="org.kde.KWin" | |
DBUS_PATH="/org/kde/KWin/InputDevice" | |
INTERFACE="org.kde.KWin.InputDevice" | |
METHOD_GET="org.freedesktop.DBus.Properties.Get" | |
METHOD_SET="org.freedesktop.DBus.Properties.Set" | |
function find_touchpad { | |
DM_INTERFACE="org.kde.KWin.InputDeviceManager" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GUEST_NAME=Win10_With_GPU | |
job_exited="false" | |
exec_result=$(virsh -c qemu:///system qemu-agent-command "$GUEST_NAME" '{"execute": "guest-exec", "arguments": { "path": "nvidia-smi.exe", "arg": [ "--format=csv,noheader", "--query-gpu=temperature.gpu" ], "capture-output": true }}') | |
exec_pid=$(echo "$exec_result" | jq ".return.pid") | |
while [ "$job_exited" == "false" ]; do | |
exec_job_data=$(virsh -c qemu:///system qemu-agent-command "$GUEST_NAME" '{"execute": "guest-exec-status", "arguments": { "pid": '" ${exec_pid}}}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a quick-and-dirty script to monitor the execution of a process, wait for it to die, | |
# and then ensure that the Ubisoft client dies shortly thereafter. This is useful, as when | |
# running under Lutris, Ubisoft games spawn the Ubisoft client, and it remains running after | |
# the game itself has quit. On my system, the Ubisoft client remaining running will keep | |
# the screen awake, which is decidedly undesirable. | |
# Enable the following 3 lines for debugging, if needed | |
#set -x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Flags to enable/disable various functionality (set flag to zero to disable) | |
UPDATE_MIRRORLIST=1 | |
UPDATE_KEYRING=1 | |
USE_POWERPILL=1 | |
REPORT_CACHE_STATS=1 | |
# Config elements | |
MIRRORLIST="/etc/pacman.d/mirrorlist" |
NewerOlder