Skip to content

Instantly share code, notes, and snippets.

View btbytes's full-sized avatar
🐎
🏈

Pradeep Gowda btbytes

🐎
🏈
View GitHub Profile
@btbytes
btbytes / readme.md
Created May 4, 2024 08:32 — forked from aspose-com-gists/readme.md
Split a Word Document into Multiple Documents in Python
@btbytes
btbytes / pdftk-split-every-n-page.sh
Created May 4, 2024 06:50 — forked from ThomasG77/pdftk-split-every-n-page.sh
Need to split PDF every n pages, do it with pdftk
# Recipe from https://unix.stackexchange.com/questions/66931/split-pdf-into-documents-with-several-pages-each
pagesper=2
file=layout_atlas_multipage.pdf
number=$(pdfinfo -- "$file" 2> /dev/null | awk '$1 == "Pages:" {print $2}')
count=$((number / pagesper))
filename=${file%.pdf}
counter=0
while [ "$count" -gt "$counter" ]; do

-> lmg-train.png<-

The Novice's LLM Training Guide

->Written by Alpin<- ->Inspired by /hdg/'s LoRA train rentry<- !!!warning This guide is being slowly updated. We've already moved to the axolotl trainer.


[TOC2]

<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="36x36" href="/android-chrome-36x36.png">
<link rel="icon" type="image/png" sizes="48x48" href="/android-chrome-48x48.png">
<link rel="icon" type="image/png" sizes="72x72" href="/android-chrome-72x72.png">
<link rel="icon" type="image/png" sizes="96x96" href="/android-chrome-96x96.png">
<link rel="icon" type="image/png" sizes="144x144" href="/android-chrome-144x144.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
@btbytes
btbytes / rust.png
Last active April 5, 2024 15:23
Rust Strings
rust.png
@btbytes
btbytes / base36_encode_decode.sql
Created October 25, 2013 18:53
Base36 Conversion in PostgreSQL
-- source: http://www.jamiebegin.com/base36-conversion-in-postgresql/
CREATE OR REPLACE FUNCTION base36_encode(IN digits bigint, IN min_width int = 0)
RETURNS varchar AS $$
DECLARE
chars char[];
ret varchar;
val bigint;
BEGIN
chars := ARRAY['0','1','2','3','4','5','6','7','8','9'
,'A','B','C','D','E','F','G','H','I','J','K','L','M'
@btbytes
btbytes / README.md
Last active March 21, 2024 16:33
Gist created by gistash

gistash

Stash files on gist.github.com

Installation

$ wget https://gist.githubusercontent.com/btbytes/73d6ddb0cf940e730edf22a60208691b/raw/fbf9efb44ee1c88eaaa3f62d6437737402ea74ce/gistash 
$ chmod +x gistash
@btbytes
btbytes / README.md
Last active March 18, 2024 21:19
GrantSlatton CSS
@btbytes
btbytes / untangling.md
Last active March 12, 2024 11:41
Untangling Lifetimes: The Arena Allocator by Ryan Fleury

Untangling Lifetimes: The Arena Allocator

Making performant dynamic manual memory management in C feel almost like garbage collection.

RYAN FLEURY

SEP 24, 2022

In every instance when I’ve said that I prefer to write my software in C, the response is—normally—raised eyebrows. Several dominant memes in the programming world make my position unpopular, and thus uncommon to find. I regularly hear, “why would you write new code in an unsafe systems language?”, “performance isn’t everything!”, and perhaps the most common, “why subject yourself to the requirement of manually managing memory?”.