Skip to content

Instantly share code, notes, and snippets.

@bartowski1182
bartowski1182 / calibration_datav3.txt
Last active March 12, 2025 13:08
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
@moyix
moyix / gen_chat_html.py
Created November 15, 2023 23:18
Render LM-Studio Chat as HTML
import json
import argparse
import html
import os
from datetime import datetime
def generate_html(json_file, html_file="chat.html", metadata=None, date=None):
with open(json_file, 'r') as file:
data = json.load(file)
@0xdevalias
0xdevalias / generating-synth-patches-with-ai.md
Last active March 12, 2025 10:27
Some notes on generating software synthesizer patches with AI
@twobob
twobob / diff.py
Last active July 29, 2023 19:43
Amendment to the stable diffusion notebook to do titling and generate /n/ images
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import math
#Self contain this for easy single clicking
from PIL import Image
def image_grid(imgs, rows, cols):
#assert len(imgs) == rows*cols
w, h = imgs[0].size
grid = Image.new('RGB', size=(cols*w, rows*h))
@xshazwar
xshazwar / Sine.cs
Last active August 12, 2021 16:17
MapMagic2 Custom Generator Node
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using Den.Tools;
using Den.Tools.GUI;
using Den.Tools.Matrices;
using MapMagic.Products;
using MapMagic.Nodes;
@pojda
pojda / example_image_utils.py
Last active December 4, 2024 09:35 — forked from josephkern/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
#!/usr/bin/env python
# coding: utf-8
# You need PIL <http://www.pythonware.com/products/pil/> to run this script
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use
# any TTF you have)
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
from image_utils import ImageText
@p3jitnath
p3jitnath / opencv-4.2.0-cuda-10.1-Ubuntu-20.04.md
Last active May 15, 2024 10:11
Step-by-Step Guide to build OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04

How to install OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04 LTS (Focal Fossa)

Install updates and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Install required libraries:

@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active January 29, 2025 17:01
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@carrierdown
carrierdown / debugLog.js
Last active April 16, 2019 07:41
Drop-in replacement for post()
function debugLog(/* ... args */) {
var result = "";
for (var i = 0; i < arguments.length; i++) {
result += (i !== 0 && i < arguments.length ? " " : "") + debugPost(arguments[i], "");
}
post(result + "\r\n");
}
function debugPost(val, res) {
if (Array.isArray(val)) {
@samarthbhargav
samarthbhargav / CUDA Availability in Torch
Created September 24, 2018 10:00
One liner to test if cuda is available
python -c "import torch; print(torch.cuda.is_available())"