Skip to content

Instantly share code, notes, and snippets.

View awestley's full-sized avatar
🎯
Focusing

Aaron Westley awestley

🎯
Focusing
View GitHub Profile
@awestley
awestley / Modelfile
Last active April 4, 2025 23:25
Benchmark Modelfile
FROM r1-1776:671b
PARAMETER num_predict 500
PARAMETER temperature 0.7
# Constrain internal reasoning politely
SYSTEM "You are a helpful assistant. Think briefly if necessary, but keep your internal reasoning very short. Focus on delivering direct and concise answers within two sentences whenever possible."
@awestley
awestley / speed.py
Last active April 8, 2025 17:06
speed.py
import ollama
import time
import re
from transformers import AutoTokenizer
MODEL = "r1-1776-500:671b"
QUESTIONS = [
"Explain how a rocket engine works in simple terms.",
"Can you tell me how fuel combustion happens inside the engine?",
@awestley
awestley / dji-rotate.md
Last active March 7, 2025 21:56
North-Up Image Correction for DJI Drone Photos

Overview

This script automatically rotates DJI drone images so that North is at the top, based on the Gimbal Yaw Degree stored in the image metadata.

How It Works

  • Extracts Gimbal Yaw Degree (the camera's direction when the photo was taken).
  • Computes the correct rotation using the formula:

Rotation Angle = 180 - Gimbal Yaw Degree

  • Rotates the image accordingly so that North is correctly up.

⠀Requirements