Skip to content

Instantly share code, notes, and snippets.

#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <ncurses.h>
#include <stdlib.h>
#include <string.h>
#define NCOL 26 // max number of columns (A..Z)
#define NROW 50 // max number of rows
#define CW 9 // column display width
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@The-Running-Dev
The-Running-Dev / removeDependency.sh
Created November 22, 2024 14:56
How to Remove a Dependency in QNAP Package
# Resources
# Sample package: https://www.myqnap.org/product/radarr-qbase24/
# Create a simple package: https://cheng-yuan-hong.gitbook.io/qdk-qpkg-development-kit/creating-a-qpkg-package-using-qdk/creating-a-simple-qpkg-package
# QNAP SDK docs: https://edhongcy.gitbooks.io/qdk-qpkg-development-kit/content/
# You will need the QNAP SDK, https://github.com/qnap-dev/QDK
# Download the package and put it on your NAS
# SSH into the nas and go to the directory where the package is located
# Create the QNAP build evnironment
@thesamesam
thesamesam / xz-backdoor.md
Last active May 4, 2026 20:15
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.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@tenekev
tenekev / .env
Last active February 21, 2026 10:09
Setting up Excalidraw with a Collaboration server
DOMAIN_NAME=yourdomain.tld
TZ=Europe/London
@s1gnate-sync
s1gnate-sync / build-container-vm.sh
Last active March 20, 2025 06:54
Bootstrapping custom virtual machine on chrome os without any dependencies (it reuses existing vm and it's kernel)
#!/usr/bin/env bash
export LC_ALL=C
set -eu
if test "$(id -u)" -ne 0; then
echo "install: must be root"
exit 1
fi
@Avgariat
Avgariat / disney_plus_fs_fix.js
Last active November 10, 2023 04:09
DisneyPlus Fullscreen fix
// ==UserScript==
// @name DisneyPlus Fullscreen fix
// @namespace https://github.com/Avgariat
// @version 1.0
// @description Blocks exiting fullscreen when not initiated by user; e.g. on next episode
// @author Avgariat
// @match https://www.disneyplus.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=disneyplus.com
// @grant none
// ==/UserScript==
@oaustegard
oaustegard / CookieStoreShim.js
Last active April 24, 2023 08:33
CookieStoreShim -- a shim for the CookieStore API
class CookieStoreShim {
static isSupported() {
return typeof window.CookieStore !== 'undefined';
}
async get(nameOrOptions) {
if (CookieStoreShim.isSupported()) {
return cookieStore.get(nameOrOptions);
} else {
const name = typeof nameOrOptions === 'string' ? nameOrOptions : nameOrOptions.name;
(venv) # Exit:0 2023-03-12 16:59:27 [r2q2@Reformer#[:~/opt/llama.cpp]
$(: !605 ) ./main -m ./models/65B/ggml-model-q4_0.bin -t 8 -n 128
main: seed = 1678658429
llama_model_load: loading model from './models/65B/ggml-model-q4_0.bin' - please wait ...
llama_model_load: n_vocab = 32000
llama_model_load: n_ctx = 512
llama_model_load: n_embd = 8192
llama_model_load: n_mult = 256
llama_model_load: n_head = 64
llama_model_load: n_layer = 80