Skip to content

Instantly share code, notes, and snippets.

View i80and's full-sized avatar
🦨
SKUNKS

Heli Aldridge i80and

🦨
SKUNKS
View GitHub Profile
import sys
from pathlib import Path
from pydantic import BaseModel
import ollama
MODEL = 'qwen3:30b-a3b-thinking-2507-q4_K_M'
SYSTEM_PROMPT = 'You are a translation engine which will translate subtitles accurately while maintaining context and natural flow.'
# Define the schema for the response
class TranslationResult(BaseModel):
import boto3
import sys
from pathlib import Path
import json
BUCKET_NAME = "docs-mongodb-org-dotcomprd"
versions = sys.argv[1:]
def remove_prefix(s: str, version: str) -> str:
return s.split(f"docs/{version}/", 1)[-1]
#!/bin/sh
set -e
DOCS_REPO=$1
DRIVER_REPO=$2
BRANCH=$3
DRIVER_BRANCH=$4
usage() {
echo "do.sh <docs-url> <driver-url> <branch>"

THE NORTH STAR

FREDERICK DOUGLASS, M. R. DELANY, Editors

RIGHT IS OF NO SEX - TRUTH IS OF NO COLOR - GOD IS THE FATHER OF US ALL, AND ALL WE ARE BRETHEREN

WILLIAM C. NEIL, Publisher JOHN DICK, Printer


(module
(func $vec_getx (param $a i64) (result f32)
(i64.and (get_local $a) (i64.const 0xffffffff))
i32.wrap/i64
f32.reinterpret/i32
)
(func $vec_gety (param $a i64) (result f32)
(i64.shr_u (get_local $a) (i64.const 32))
i32.wrap/i64

Keybase proof

I hereby claim:

  • I am i80and on github.
  • I am i80and (https://keybase.io/i80and) on keybase.
  • I have a public key whose fingerprint is 6845 D667 E1D5 6652 D750 8B0F 3450 34CF B36A 363F

To claim this, I am signing this object:

x = 0
for _ in range(100000):
f = lambda: x += 1
f()
'use strict';
let x = 0;
for(let i = 0; i < 10000000; i += 1) {
(function() {
x += 1;
})();
}
@i80and
i80and / x8664-asm-cheetsheet.txt
Last active September 17, 2019 15:29
x86-64 asm cheatsheet
Registers
Caller-saved Callee-saved
RAX RCX RSP RDI RSI RDX R8 R9 R10 R11 RBP RBX R12 R13 R14 R15
Args: RDI, RSI, RDX, RCX, R8, R9, XMM0–7
Return: RAX
Simple Compile
yasm -f macho64 foo.asm && gcc foo.c foo.o -Wall -Wextra -g -O1
#!/bin/bash
set -e
emailAddress=<USERNAME>@mongodb.com
# get the commit message
msg=`git log -1 --oneline | cut -d' ' -f2-`
hash=`git rev-parse HEAD`
hash=`git rev-parse HEAD~`..${hash}