Skip to content

Instantly share code, notes, and snippets.

@sayakpaul
sayakpaul / inference_with_torchao_serialized.py
Last active September 4, 2024 17:20
Shows how to run Flux schnell under 17GBs without bells and whistles. It additionally shows how to serialize the quantized checkpoint and load it back.
import torch
from huggingface_hub import hf_hub_download
from diffusers import FluxTransformer2DModel, DiffusionPipeline
dtype, device = torch.bfloat16, "cuda"
ckpt_id = "black-forest-labs/FLUX.1-schnell"
with torch.device("meta"):
config = FluxTransformer2DModel.load_config(ckpt_id, subfolder="transformer")
model = FluxTransformer2DModel.from_config(config).to(dtype)
(defun epicemacs/save-and-kill-tramp-buffers ()
(interactive)
(let* (
(filter "\*") ;; not any meta buffers such as #<buffer *tramp/ssh rootepicvps*> - let them be
(ssh-buffers (seq-filter (lambda (buf)
(not (string-match-p filter (buffer-name buf))))
(tramp-list-remote-buffers)))
(ssh-buffer-names (mapcar #'buffer-name ssh-buffers))
(prettylist (mapconcat 'identity ssh-buffer-names " "))
)

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@soulhotel
soulhotel / userChrome.css
Last active July 16, 2024 14:35
Method for stylizing the context menu (Firefox CSS)
/* ----------------------------------------------------------
Styling Firefoxs context (right-click) menu
- this will target all context menus, including the menubar, and drop downs.
- If you want this to only apply to the context menu activated within webpages you can specify it, such as: #contentAreaContextMenu
-----------------------------------------------------------*/
/*
Using your own defined variables makes switching styles/colors much easier to manage
*/
@bartowski1182
bartowski1182 / calibration_datav3.txt
Last active September 19, 2024 22:15
Calibration data provided by Dampf, combines his own efforts on top of Kalomaze's. Used for calibrating GGUF imatrix files
In addition to a significant decrease in hepatic lipid accumulation in the IOE group, which inhibited energy intake by propionate enrichment, hepatic lipids were also significantly reduced in the mice in the IOP group, which was largely enriched with butyrate. Compared with the IOE group, IOP had a stronger regulatory effect on hepatic metabolism and triglyceride metabolism and higher levels of TCA cycle in the host. In addition, butyrate has the ability to promote browning of white adipose tissue (WAT) to brown adipose tissue (BAT).^[@ref39],[@ref40]^ WAT stores energy, whereas BAT uses energy for heating and consequently host energy expenditure increases.^[@ref41],[@ref42]^ However, adipose tissue weight does not change after WAT browning.^[@ref43]^ Therefore, the weight of adipose tissue of mice in the IOP group dominated by butyrate was greater than that of the mice in the IOE group dominated by propionate.
In conclusion ([Figure [7](#fig7){ref-type="fig"}](#fig7){ref-type="fig"}C), the improvement of ob
@JohnRTitor
JohnRTitor / refind-nixos.md
Last active August 30, 2024 09:28
reFINd install on NixOS Secureboot

Refind is a beautiful and customisable boot manager. It can be installed easily on NixOS by a simple command.

Regular users

Run the following commands to get a shell with required components.

nix-shell -p refind efibootmgr sbsigntool

Now you can run refind-install to install the boot manager on to your EFI.

@ziozzang
ziozzang / README.txt
Created April 29, 2024 07:33
Delta Merge
Code from : https://github.com/StableFluffy/EasyLLMFeaturePorter/blob/main/1-Click.ipynb
- Just converted into CLI
Run Like this.
```
python convert.py [informative_model_path] [base_model_path] [target_model_path] [output_path]
```
Params:
@thesamesam
thesamesam / xz-backdoor.md
Last active September 17, 2024 08:32
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@OrionReed
OrionReed / dom3d.js
Last active September 23, 2024 03:02
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@JeodC
JeodC / TUC-Steam-Guide.md
Last active September 18, 2024 05:32
A guide to setting up Command & Conquer: The Ultimate Collection for Steam - Dated March 13th 2024

Command & Conquer: The Ultimate Collection (Steam Guide)

Author: Jeod

Contributors:

  • TerrorTowers
  • hxdr0n0s
  • Unstoppable
  • Agent