Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

@acaladolopes
acaladolopes / Flux_Flask_Api.py
Created August 5, 2024 16:26
An API for quantized version of Flux-dev
import logging
from flask import Flask, request, jsonify
import torch
from optimum.quanto import freeze, qfloat8, quantize
from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
from diffusers.models.transformers.transformer_flux import FluxTransformer2DModel
from diffusers.pipelines.flux.pipeline_flux import FluxPipeline
from transformers import CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5TokenizerFast
from io import BytesIO
import base64
@abel0b
abel0b / install-linux-perf-on-wsl2.sh
Last active May 26, 2026 08:08
Install perf on WSL 2
apt install flex bison
git clone https://github.com/microsoft/WSL2-Linux-Kernel --depth 1
cd WSL2-Linux-Kernel/tools/perf
make -j8
sudo cp perf /usr/local/bin
@cb372
cb372 / riscv.md
Last active May 22, 2026 05:37
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active September 13, 2026 20:48
Conventional Commits Cheatsheet
@soarez
soarez / ca.md
Last active September 5, 2026 22:00
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.