Skip to content

Instantly share code, notes, and snippets.

View axsddlr's full-sized avatar
🎯
Focusing

Andre Saddler axsddlr

🎯
Focusing
View GitHub Profile

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 March 15, 2023 02:48
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 June 21, 2024 12:36
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.
@schmich
schmich / ducky.md
Last active July 10, 2024 10:25
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function: