Skip to content

Instantly share code, notes, and snippets.

@smartexpert
smartexpert / report.html
Created May 5, 2026 20:18
OpenRouter × GPU Break-even Calculator
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>OpenRouter × GPU Breakeven</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
:root { color-scheme: dark; }
html, body { background: #08090a; min-height: 100%; }
body { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
@smartexpert
smartexpert / llama_cpp_sm120_softmax_gist.md
Last active May 2, 2026 19:40
llama.cpp SOFT_MAX failed: invalid argument on Blackwell consumer (sm_120) — root cause and 12-line fix

llama.cpp SOFT_MAX failed: invalid argument on Blackwell consumer (sm_120) — root cause + 12-line fix

If you searched for this error, you're in the right place:

ggml_cuda_compute_forward: SOFT_MAX failed
CUDA error: invalid argument
  current device: 0, in function ggml_cuda_compute_forward at ggml/src/ggml-cuda/ggml-cuda.cu:2962
JVBERi0xLjUNJeLjz9MNCjczIDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDc0NzY4MS9PIDc1L0UgNTI2NjQwL04gMi9UIDc0NjEwNi9IIFsgMTYxNiAzNzNdPj4NZW5kb2JqDSAgICAgICAgICAgICAgIA14cmVmDQo3MyA2Ng0KMDAwMDAwMDAxNiAwMDAwMCBuDQowMDAwMDAxOTg5IDAwMDAwIG4NCjAwMDAwMDIxMDAgMDAwMDAgbg0KMDAwMDAwMzI4MyAwMDAwMCBuDQowMDAwMDAzNDE4IDAwMDAwIG4NCjAwMDAwMDM1NjAgMDAwMDAgbg0KMDAwMDAwNDE1OCAwMDAwMCBuDQowMDAwMDA0NTM4IDAwMDAwIG4NCjAwMDAwMDQ5ODggMDAwMDAgbg0KMDAwMDAwNTE5MCAwMDAwMCBuDQowMDAwMDA1MjI2IDAwMDAwIG4NCjAwMDAwMDU0ODAgMDAwMDAgbg0KMDAwMDAwNTU5MyAwMDAwMCBuDQowMDAwMDA1OTUwIDAwMDAwIG4NCjAwMDAwMDYyMTQgMDAwMDAgbg0KMDAwMDAwNjcyMCAwMDAwMCBuDQowMDAwMDA2OTg1IDAwMDAwIG4NCjAwMDAwMDc3NjEgMDAwMDAgbg0KMDAwMDAwNzc4NyAwMDAwMCBuDQowMDAwMDA4MzEzIDAwMDAwIG4NCjAwMDAwMDg5MDIgMDAwMDAgbg0KMDAwMDAwODkyOCAwMDAwMCBuDQowMDAwMDEwODMwIDAwMDAwIG4NCjAwMDAwMTI0MDggMDAwMDAgbg0KMDAwMDAxNDExMiAwMDAwMCBuDQowMDAwMDE2MDYzIDAwMDAwIG4NCjAwMDAwMTgwMjYgMDAwMDAgbg0KMDAwMDAxOTg1MCAwMDAwMCBuDQowMDAwMDIxODczIDAwMDAwIG4NCjAwMDAwMjM2MDkgMDAwMDAgbg0KMDAwMDA0MDEwNyAwMDAwMCBuDQowMDAwMDQwMzg2IDAwMDAwIG4N
@smartexpert
smartexpert / cf_domain_pricing.json
Created October 27, 2024 17:00
Cloudflare Domain Pricing
[
{
"Extension": ".academy",
"Current fee (per year)": "$25.18",
"New fee (per year)": "$33.18",
"Effective from": "October 15, 2024"
},
{
"Extension": ".accountants",
"Current fee (per year)": "$75.18",
@smartexpert
smartexpert / docx_to_conll.py
Last active June 1, 2024 19:09 — forked from harshildarji/docx_to_conll.py
Python script to extract comments from .docx file, and convert into CoNLL format.
import json
import os
import string
import zipfile
from lxml import etree
from nltk.tokenize import RegexpTokenizer
from tqdm import tqdm
import docx
@smartexpert
smartexpert / script.js
Created February 15, 2024 17:13 — forked from gd3kr/script.js
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@smartexpert
smartexpert / index.html
Created March 4, 2023 00:56
Redirect counter with message
<center>
<br/>
<h1>Announcement</h1>
<p>You will be redirected in <span id="seconds-holder"></span> seconds.<br/><br/> If your browser does not redirect you automatically click <a href="" id="link">here</a>.
</p>
</center>
@smartexpert
smartexpert / .gitignore
Last active December 18, 2022 12:58
generic gitignore file for my projects
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
@smartexpert
smartexpert / tw_fxrates.json
Created November 1, 2022 17:54
Exchange Rates JSON
This file has been truncated, but you can view the full file.
[
{
"rate": 0.133411,
"source": "INR",
"target": "SEK",
"time": "2022-11-01T17:51:04+0000"
},
{
"rate": 7.49562,
"source": "SEK",
@smartexpert
smartexpert / poetry_debug.toml
Created October 13, 2022 19:05
Debug for poetry git SSL issue
[tool.poetry]
name = "whisper-play"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [{include = "whisper_play"}]
[tool.poetry.dependencies]
python = "^3.8"