Skip to content

Instantly share code, notes, and snippets.

View Bnowako's full-sized avatar
🧙‍♂️
🦤

Błażej Nowakowski Bnowako

🧙‍♂️
🦤
View GitHub Profile
# /// script
# dependencies = [ "transformers", "accelerate" ]
# ///
# run on 2xH200 rented from primeintellect.ai
import gc
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
@pesterhazy
pesterhazy / six-questions.md
Last active June 15, 2025 14:55
Eli Goldratt's six questions about a new technology
  1. What is the power of the technology?
  2. What limitation does it diminish?
  3. What are the old rules that accommodated the old limitation?
  4. What are the new rules that should be used now?
  5. In light of the new rules, what changes are required in the technology?
  6. How to cause the change to take advantage of the new technology?

Source: Eli Goldratt, Beyond the Goal

@ausfestivus
ausfestivus / AzureRegionData.md
Last active September 18, 2025 10:55
A list of the Azure regions

List of Azure Regions

A list of all the region names and locations for Azure

Creating the list

You can recreate the list anytime using this command:

az account list-locations -o table
@squarism
squarism / iterm2.md
Last active December 29, 2025 18:51
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
@scaryguy
scaryguy / change_primary_key.md
Last active October 6, 2025 15:35
How to change PRIMARY KEY of an existing PostgreSQL table?
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
@Dynyx
Dynyx / LINQ2XML.cs
Created June 4, 2012 13:20
LINQ2XML example
<?xml version="1.0" encoding="utf-8" ?>
<Patients>
<Patient EMail="LeBron@James.com">
<FirstName>LeBron</FirstName>
<LastName>James</LastName>
</Patient>
<Patient EMail="Kobe@Bryant.com">
<FirstName>Kobe</FirstName>
<LastName>Bryant</LastName>
</Patient>
@jboner
jboner / latency.txt
Last active December 27, 2025 02:15
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD