Skip to content

Instantly share code, notes, and snippets.

View axsddlr's full-sized avatar
🎯
Focusing

Andre Saddler axsddlr

🎯
Focusing
View GitHub Profile

Why Proxmox VE shreds your SSDs

You must have read, at least once, that Proxmox recommend "enterprise" SSDs for their virtualisation stack. But why does it shred regular SSDs? It would not have to, in fact the modern ones, even without PLP, can endure as much as 2,000 TBW per life. But where do the writes come from? ZFS? Let's have a look.

The below is particularly of interest for any homelab user, but in fact everyone who cares about wasted system performance might be interested.

If you have a cluster, you can actually safely follow this experiment. Add a new "probe" node that you will later dispose of and let it join the cluster. On the "probe" node, let's isolate the configuration state backend database onto a separate filesystem, to be able to benchmark only pmxcfs - the virtual filesystem that is mounted to /etc/pve and holds your configuration files, i.e. cluster state.

dd if=/dev/zero of=/root/pmxcfsbd bs=1M count=256

Options 1

use this to provide your own values for dynamic rules

You must include these keys in the neseted dictionary

"static_param"
"suffix"
"prefix"
"checksum_indexes"
@neubig
neubig / dispatch_openai_requests.py
Last active February 19, 2024 17:55
A simple script to get results from the OpenAI Asynchronous API
# NOTE:
# You can find an updated, more robust and feature-rich implementation
# in Zeno Build
# - Zeno Build: https://github.com/zeno-ml/zeno-build/
# - Implementation: https://github.com/zeno-ml/zeno-build/blob/main/zeno_build/models/providers/openai_utils.py
import openai
import asyncio
from typing import Any
import os
import torch
import gradio as gr
from modules import script_callbacks, scripts, shared
class CLIPBlend:
def __init__(self):
@SteampunkEngi
SteampunkEngi / CivitAIScraper.py
Last active February 24, 2023 09:05
SteampunkEngi's Shitty Scraper Script for CivitAI
import requests
import os.path
import re
import time
# SteampunkEngi's Shitty Scraper Script for CivitAI. Source: https://gist.github.com/SteapunkEngi/a61c73545c27e9afc4b73316af7274dc
# This script automatically scrapes all models of a type. downloads the model/Model/whatever + all metadata + thumbnail picture
# Made for python 3.10, other versions not tested
# Looking for manual downloads? see https://github.com/axsddlr/civitai_downloader
@recoilme
recoilme / weightedsim.py
Created February 19, 2023 18:01
Cosine similarity merging
import os
import argparse
import torch
import numpy as np
from tqdm import tqdm
parser = argparse.ArgumentParser(description="Merge models with weighted similarity")
parser.add_argument("a", type=str, help="Path to model a")
parser.add_argument("b", type=str, help="Path to model b")
parser.add_argument("--out", type=str, help="Output file name, without extension", default="merged", required=False)
@saftle
saftle / replace_vae.py
Last active January 21, 2023 10:00 — forked from ProGamerGov/replace_vae.py
Fixed script to work with models that were merged with Automatic1111, and included the numpy dependency which the script uses.
# Script by https://github.com/ProGamerGov
import copy
import torch
import numpy as np
# Path to model and VAE files that you want to merge
vae_file_path = "vae-ft-mse-840000-ema-pruned.ckpt"
model_file_path = "v1-5-pruned-emaonly.ckpt"
# Name to use for new model file
@Kavan72
Kavan72 / README.md
Created June 12, 2021 12:44
How to fetch Valorant user inventory?

How to fetch valorant user inventory(in python)?

There is no endpoint available to fetch inventory. Wait a second ? how does the game fetch user skins, player_cards, buddy, etc? So, After digging into Valorant I found the user inventory.

I created down below a basic python code that fetches the Valorant user inventory.

import request
@NotOfficer
NotOfficer / Valorant-UUIDs.json
Last active October 13, 2024 22:33
UUIDs of all Valorant objects (release-02.00)
{
"characters": {
"5f8d3a7f-467b-97f3-062c-13acf203c006": "Breach",
"f94c3b30-42be-e959-889c-5aa313dba261": "Raze",
"6f2a04ca-43e0-be17-7f36-b3908627744d": "Skye",
"117ed9e3-49f3-6512-3ccf-0cada7e3823b": "Cypher",
"320b2a48-4d9b-a075-30f1-1f93a9b638fa": "Sova",
"1e58de9c-4950-5125-93e9-a0aee9f98746": "Killjoy",
"707eab51-4836-f488-046a-cda6bf494859": "Viper",
"eb93336a-449b-9c1b-0a54-a891f7921d69": "Phoenix",
@vbe0201
vbe0201 / music_bot_example.py
Last active November 14, 2024 23:13
A simple music bot written using discord.py rewrite and youtube_dl.
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Valentin B.
A simple music bot written in discord.py using youtube-dl.
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly.
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know.