Skip to content

Instantly share code, notes, and snippets.

View genevera's full-sized avatar

genevera (she/her) genevera

  • Queens, NY
View GitHub Profile
@sanguivore-easyco
sanguivore-easyco / peft.py
Last active January 28, 2025 19:12 — forked from edicam/peft.py
Script to convert the conceptmod safetensors slider to an usable .safetensors slider
import os.path
from collections import OrderedDict
from safetensors.torch import save_file, load_file
import torch
state_dict=load_file("path to your slider.safetensors")
alpha_keys = [
'lora_unet-single_transformer_blocks-0-attn-to_q.alpha',
@edicam
edicam / peft.py
Created September 24, 2024 15:26
Script to convert the .pt slider to an usable .safetensors slider
import os.path
from collections import OrderedDict
from safetensors.torch import save_file
import torch
state_dict=torch.load("path to your slider.pt")
alpha_keys = [
'lora_unet_single_transformer_blocks_0_attn_to_q.alpha'
@av
av / bbh_256.yml
Created September 22, 2024 10:56
Example Harbor Bench tasks file - 256 tasks from Big Bench Hard
- tags:
- bbh
question: >-
Complete the rest of the sequence, making sure that the parentheses are
closed properly. Input: { < { { [ ] } } { < [ { { < > } } [ ( ) ( ) ] [ [ [
[ ( { < ( < ( [ ] ) > ) > } ) ] ] ] ] ] ( ) ( [ ] { } ) > } > [ { ( ( ) ) }
]
criteria:
correctness: 'The answer is }'
- tags:
@arenasys
arenasys / prune.py
Last active January 3, 2023 14:01
prune.py
#!/usr/bin/python
import torch
import safetensors
import safetensors.torch
import os
MODEL_KEYS = [
"model.",
"first_stage_model",
// ==UserScript==
// @name hCAPTCHA solver
// @namespace hCAPTCHA solver
// @version 1.0
// @description Automatically solves hCAPTCHAs in browser
// @author Abdul Rehman Sheikh - engageub
// @licence MIT
// @match *://*/*
// @grant GM_xmlhttpRequest
// @grant GM_setValue
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
@origamiofficial
origamiofficial / Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser).user.js
Last active December 10, 2024 14:02
Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser) by Md ubeadulla | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
// ==UserScript==
// @name Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser)
// @namespace Hcaptcha Solver
// @version 10.0
// @description Hcaptcha Solver in Browser | Automatically solves Hcaptcha in browser
// @author Md ubeadulla
// @match https://*.hcaptcha.com/*hcaptcha-challenge*
// @match https://*.hcaptcha.com/*checkbox*
// @grant GM_xmlhttpRequest
// @grant GM_setValue

Fix magisk stock backup does not exist

# put stock boot.img into /sdcard/boot.img

# get sha1
adb shell
su
SHA1=$(cat $(magisk --path)/.magisk/config | grep SHA1 | cut -d '=' -f 2)
import numpy as np
import os
from scipy.io import wavfile
import pyroomacoustics as pra
frame_len = 80
mu = 30 # higher value can give more suppression but more distortion
thres = 0.01 # threshold between (signal+noise) and noise
# How many frames to look back for the noise floor estimate.
@fl64
fl64 / docker-mod.yml
Created April 4, 2019 16:05
Ansible playbook for modifying /etc/docker/daemon.json config (based on https://stackoverflow.com/questions/50796341/add-a-new-key-value-to-a-json-file-using-ansible)
- hosts: all
become: yes
gather_facts: false
vars:
tasks:
- name: Check that the /etc/docker/daemon.json exists
stat:
path: /etc/docker/daemon.json
register: stat_result