Skip to content

Instantly share code, notes, and snippets.

View baudneo's full-sized avatar
👽
Mars 2034

baudneo baudneo

👽
Mars 2034
  • dAIngerous Consulting
  • Canada
View GitHub Profile
@sammcj
sammcj / .textgen.env
Last active December 31, 2023 15:24
Willow Speech + Local LLM + HomeAssistant
# https://github.com/oobabooga/text-generation-webui/blob/main/README.md
# https://github.com/oobabooga/text-generation-webui/blob/main/docs/Spell-book.md
# by default the Dockerfile specifies these versions: 3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX
# https://developer.nvidia.com/cuda-gpus you can find the version for your card here
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
# TORCH_CUDA_ARCH_LIST=6.0,6.1,6.2,7.0,7.5,8.0,8.6+PTX
# RTX3090 = sm_86 and compute_86 (PTX)
#8.6+PTX
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
@ZeroIntensity
ZeroIntensity / mussolini.py
Created October 8, 2023 14:59
awful sorting algorithm
import ctypes
import sys
assert sys.implementation.name == "cpython"
def mussolini(array: list[int]):
if not array:
return
highest = array[0]
@techtycho
techtycho / tagswitch.md
Last active October 15, 2023 01:13
Adding Fancy Tag Switch Effects In AwesomeWM

Adding Fancy Tag Switch Effects In AwesomeWM

tagswitch

Before We Begin

First of all, you need to have AwesomeWM installed and running. I'm using awesome-git, the development release. I'm not sure whether this would work on the stable release.

@joanbm
joanbm / nvidia-fix-linux-5.13.patch
Created May 9, 2021 22:12
Tentative fix for NVIDIA 465.27 driver for Linux 5.13-rc1
From 6c1d401600b76dd7d9c24ca4c6aa8d6e6b54fb05 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 16 Apr 2021 09:29:24 +0200
Subject: [PATCH] Tentative fix for NVIDIA 465.27 driver for Linux 5.13-rc1
---
nvidia-drm/nvidia-drm-crtc.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-crtc.c b/nvidia-drm/nvidia-drm-crtc.c
@thraizz
thraizz / .xbindkeysrc
Created December 30, 2020 14:15
XF86 media key bindings using xbindkeys
"pactl set-sink-volume @DEFAULT_SINK@ -1000"
XF86AudioLowerVolume
"pactl set-sink-volume @DEFAULT_SINK@ +1000"
XF86AudioRaiseVolume
"playerctl play-pause"
m:0x0 + c:208
XF86AudioPlay
"playerctl play-pause"
m:0x0 + c:209
XF86AudioPause
@PhMota
PhMota / fstring.py
Last active July 20, 2021 19:39 — forked from Duroktar/fstring.py
f-string like behavior in Python 2
# -*- coding: utf-8 -*-
"""Python2 f-string like behavior"""
from __future__ import print_function
import inspect
import re
class F(object):
"""String formatter based on Python 3.6 'f' strings
@hemantapkh
hemantapkh / mac-vendors.json
Last active April 23, 2023 19:12
List of MAC address OUI with their Vendors in JSON format.
# https://gist.github.com/aallan/b4bb86db86079509e6159810ae9bd3e4
{
"OFFICIALLY XEROX": [
"000000"
],
"SUPERLAN-2U": [
"000001"
],
"BBN (WAS INTERNAL USAGE ONLY, NO LONGER USED)": [
@luukvbaal
luukvbaal / cacheremove.hook
Last active February 20, 2024 01:52
yay paccache hooks
[Trigger]
Operation = Remove
Type = Package
Target = *
[Action]
Description = Clearing cache...
When = PostTransaction
Exec = /home/<user>/.local/bin/tools/removehook
@conrad784
conrad784 / read_nonblocking.py
Created December 14, 2018 15:50
nonblocking read function for python, e.g. for named pipes
def read_nonblocking(path, bufferSize=100, timeout=.100):
import time
"""
implementation of a non-blocking read
works with a named pipe or file
errno 11 occurs if pipe is still written too, wait until some data
is available
"""
grace = True
@btamayo
btamayo / del_cluster.sh
Last active April 30, 2024 04:27 — forked from ianchen06/del_cluster.sh
delete proxmox cluster
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
killall pmxcfs