Skip to content

Instantly share code, notes, and snippets.

# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@jfeilbach
jfeilbach / gist:18b08ea0ed9eaf844d643ab092905973
Last active May 6, 2024 08:28
tvOS.xml for plex (modified) for use with AppleTV 4k
<?xml version="1.0" encoding="utf-8"?>
<Client name="tvOS">
<!-- Author: Plex Inc. -->
<!-- This profile is used by A10X-based tvOS (Apple TV 4K) devices using the MPV ("experimental") video player. Currently, this requires a Plex Pass subscription. -->
<!-- Because Plex does not currently support TrueHD or DTS-MA playback in the client, this audio is transcoded to FLAC. -->
<Settings>
<Setting name="DirectPlayStreamSelection" value="true" />
<Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
</Settings>
<TranscodeTargets>
@DeezNutq
DeezNutq / info.md
Last active May 6, 2024 08:27
AIDA64 keys for all editions (working @ 08.04.2024)

Note : FinalWire, you can keep trying to stop us, but you can't. You know why ? You've been using the same algorithm for 10 years. Changing it would be an inconvenience for you and your customers.

By the way, I'd suggest that you proofread your DMCA requests. If you didn't know, it's "generated" and not "genereated". Also, when referencing to someone's belonging you use the possessive form "their" and not "there".

FOR EDUCATIONAL PURPOSES ONLY, PLEASE SUPPORT THE DEVELOPPERS :)

Check BLACKLISTED for blacklisted keys

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 6, 2024 08:27
crack activate Office on mac with license file
@DraTeots
DraTeots / ComPort over Network.md
Last active May 6, 2024 08:22
ComPort over Network
@ChxGuillaume
ChxGuillaume / EMQX-and-Traefik.md
Last active May 6, 2024 08:20
Configuring an EMQX instance behind Traefik with ProxyProtocol

EMQX x Traefik

1. Treafik config

docker-compose.yml

services:
  reverse-proxy:
    image: traefik:v2.11
@rickklaasboer
rickklaasboer / how-to-setup-plex-with-sonarr-radarr-jackett-overseerr-and-qbittorrent-using-docker.md
Last active May 6, 2024 08:19
How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

This is a guide that will show you how to setup Plex Media Server with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent with Docker. It is written for Ubuntu 20.04 but should work on other Linux distributions as well (considering supported distributions by Docker). It is also written for people who have some experience with Linux and Docker. If you are new to Docker, I recommend you to read the Docker documentation, and if you are new to Linux, I recommend you to read the Ubuntu documentation.

Now, let's get started!

Please note: This guide was written without considering hardlinking for Sonarr/Radarr. If you want to use hardlinking refer to #Hardlinking

Prerequisites

@lincolnthalles
lincolnthalles / random_memo.js
Last active May 6, 2024 08:16
Add "Random Memo" button to Memos v0.21+ sidebar
const RANDOM_MEMO_SETTINGS = {
// Amount of memos to cache
memoAmount: 100,
// Kinds of memos to cache: PUBLIC = visible to everyone, PROTECTED = logged in users, PRIVATE = only the creator
memoKinds: ["PUBLIC", "PROTECTED", "PRIVATE"],
// Time in minutes to cache the memos
memoCacheTimeMinutes: 60,
// Username of the memo creator to filter the memos
memoCreatorUsername: "",
// Button text
@ytkang
ytkang / mongodbIndexExporter.js
Last active May 6, 2024 08:15
Mongodb Index exporter importer
/*
How to export
* mongo is mongoshell command
mongo dbname --quiet mongodbIndexExporter.js > index.js
*/
let collectionNames = db.getCollectionNames();
let index_data = {'collections': []};
for (let i in collectionNames) {