Skip to content

Instantly share code, notes, and snippets.

View transkatgirl's full-sized avatar
💭
I may be slow to respond.

kat transkatgirl

💭
I may be slow to respond.
View GitHub Profile
@AgentOak
AgentOak / youtube_formats.md
Last active March 7, 2025 22:40
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@AkdM
AkdM / Edit_Repack_ISO_tutorial.md
Last active February 23, 2025 09:22
Edit and repack .iso bootable image

On Linux

Installing mkisofs

apt-get install mkisofs

Editing ISO image

mkdir /tmp/custom_iso

@Armster15
Armster15 / GetDiscordTokenFromConsole.js
Last active July 15, 2024 01:29
A script that, when copypasted in the Discord console, it gives you your Discord token
/*
This allows you to get your Discord token via the Discord console.
Why this method?
- Simpler, just copy paste the function and call it, no need to monitor and manually look for headers
- More accurate
- More visually appealing
This code is licensed under The Unlicense. For more information please visit https://unlicense.org/
@tararoys
tararoys / May12knausj-master-cheatsheet.pdf
Last active February 15, 2025 03:19
Code to print out all voice commands in the knausj talon repository,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OrionReed
OrionReed / dom3d.js
Last active February 17, 2025 22:17
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; // ¯\\_(ツ)_/¯
@deepfates
deepfates / convert_archive.py
Created November 17, 2024 19:33
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple
@deepfates
deepfates / convert_oai_to_sharegpt.py
Created November 17, 2024 20:26
Convert a fine-tuning dataset from OpenAI format to ShareGPT format
import json
import argparse
def convert_oai_to_sharegpt(input_file: str, output_file: str):
with open(input_file, 'r') as infile, open(output_file, 'w') as outfile:
for line in infile:
conversation = json.loads(line)
# Skip system messages
for message in conversation["messages"]:
if message.get("role") == "system":