Skip to content

Instantly share code, notes, and snippets.

View ibehnam's full-sized avatar
:dependabot:
prompting ChatGPT

Behnam Moh ibehnam

:dependabot:
prompting ChatGPT
View GitHub Profile
@ibehnam
ibehnam / You want to meet me, don't make me work for it.md
Last active October 2, 2025 18:38
You want to meet me, don’t make me work for it

Because I work on AI, people sometimes email/DM me and ask for a meeting to discuss their ideas about a paper/project. I already have a lot on my plate so collaborating with them is not an option. Still, I often read their messages and agree to chat, despite having a tight schedule. Sometimes the conversation goes like this:

  • Them: Can we talk sometime this week?
  • Me: Sure, how does Friday 2pm sound?
  • Them: Can we do it earlier, like 11am?
  • Me: I can’t, there’s a seminar I have to go to.
  • Them: Okay, 2pm actually works for me.

At this point, they’ve already shown their disrespect for my time: 2pm would work for them but they prioritized their convenience over mine. But it gets worse: these people typically then ask me to send them a calendar invite or Zoom link!

@ibehnam
ibehnam / latency.markdown
Created May 17, 2025 19:31 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@ibehnam
ibehnam / cloud-init.yaml
Created March 9, 2025 03:47 — forked from NatElkins/cloud-init.yaml
cloud-init script for VPS
#cloud-config
# Enable automatic package updates and upgrades during cloud-init execution
package_update: true
package_upgrade: true
packages:
# Security and Hardening
- ufw
- fail2ban
@ibehnam
ibehnam / response.txt
Last active January 22, 2025 06:05
deepseek-r1-distill-qwen-32b
Jeff has two brothers and each of his brothers has three sisters and each of
the sisters has four step brothers. How many step brothers does each brother
have?
<think> Okay, so I've got this problem: Jeff has two brothers, and each of his
brothers has three sisters. Then it says that each of the sisters has four step
brothers. The question is asking how many step brothers each brother has.
Hmm, let me start by breaking down the information piece by piece. First, Jeff
@ibehnam
ibehnam / response.txt
Last active January 21, 2025 03:33
model: deepseek-r1-distill-qwen-14b
Question: Jeff has two brothers and each of his brothers has three sisters
and each of the sisters has four step brothers. How many step brothers does
each brother have?
Model's Response:
<think> okay, let's try to figure out this problem step by step. so jeff has
two brothers. that means there are three boys in total: jeff and his two
@adibhanna
adibhanna / config
Last active October 13, 2025 17:00
Ghostty config
font-family = BerkeleyMono Nerd Font
#font-family = Iosevka Nerd Font
# font-family = SFMono Nerd Font
font-size = 20
theme = GruvboxDarkHard
shell-integration-features = no-cursor,sudo,no-title
cursor-style = block
adjust-cell-height = 35%
# background-opacity = 0.96
@dannguyen
dannguyen / README.openai-structured-output-demo.md
Last active October 2, 2025 18:53
A basic test of OpenAI's Structured Output feature against financial disclosure reports and a newspaper's police blotter. Code examples use the Python SDK and pydantic for the schema definition.

Extracting financial disclosure reports and police blotter narratives using OpenAI's Structured Output

tl;dr this demo shows how to call OpenAI's gpt-4o-mini model, provide it with URL of a screenshot of a document, and extract data that follows a schema you define. The results are pretty solid even with little effort in defining the data — and no effort doing data prep. OpenAI's API could be a cost-efficient tool for large scale data gathering projects involving public documents.

OpenAI announced Structured Outputs for its API, a feature that allows users to specify the fields and schema of extracted data, and guarantees that the JSON output will follow that specification.

For example, given a Congressional financial disclosure report, with assets defined in a table like this:

@rain-1
rain-1 / LLM.md
Last active October 7, 2025 18:38
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@ibehnam
ibehnam / karabiner.edn
Created June 1, 2022 18:39 — forked from kaushikgopal/karabiner.edn
My source Karabiner file in Goku's edn format
{
;; :!Ca is keycode :a and prefix a with !C
;; C | left_command
;; T | left_control
;; O | left_option
;; S | left_shift
;; F | fn
;; Q | right_command
;; W | right_control

Karabiner layouts for symbols and navigation

Gavin Sinclair, January 2022

Introduction

I use Karabiner (configured with Gosu) to make advanced key mappings on my Apple computer. Karabiner allows you to create “layers”, perhaps simulating those on a programmable mechanical keyboard. I make good use of these layers to give me easy access (home-row or nearby) to all symbols and navigational controls, and even a numpad.

The motivation is to keep hand movement to a minimum. Decades of coding on standard keyboards has unfortunately left me with hand and wrist pain. I will soon enough own a small split keyboard which will force me to use layers to access symbols etc., so this Karabiner solution, which has evolved over months, is a training run for that.