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 / 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 March 6, 2025 19:58
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 January 3, 2025 19:55
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 March 6, 2025 13:08
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.

@programus
programus / alacritty.yml
Last active December 20, 2024 04:42
pull down from top alacritty (like iTerm2)
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. The number of columns
# must be at least `2`, while using a value of `0` for columns and lines will
# fall back to the window manager's recommended size.
dimensions:
columns: 500
lines: 30
@gwangjinkim
gwangjinkim / how-to-save-entire-python-sessions-or-objects-or-session-code.py
Last active August 29, 2024 05:45
How to save entire Python sessions, single objects or only a session's code?
"""
Lisp languages support an image-based development cycle at the REPL.
R - having its roots in Lisp - it was first implemented in Scheme - has overtaken this.
R's base command `save.image(filepath)` can save the state of an entire REPL session in a file,
and next time you start R, you can start where you stopped, by hitting `load(filepath)`.
I was asking myself, since Python's REPL is ipython, what supports
similar functionailities for pythonistas.