Skip to content

Instantly share code, notes, and snippets.

@qoomon
qoomon / conventional_commit_messages.md
Last active April 18, 2024 15:20
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@aarmea
aarmea / 0-readme.md
Last active April 18, 2024 15:20
OpenCV Python example

This is a set of scripts that calibrates and calculates a depth map from a stereo camera. It is primarily written with this ELP stereo camera in mind, but it theoretically should work with other hardware.

See for a full writeup.

@jxmorris12
jxmorris12 / torch_ddp_verify.py
Last active April 18, 2024 15:19
verify parameter weights & gradients in pytorch
def verify_ddp_weights_equal(model: torch.nn.Module, atol: float = 1e-5) -> None:
if hasattr(model, "module"):
model = model.module
world_size = get_world_size()
for name, param in model.named_parameters():
gathered_param = gather(param).reshape((world_size, -1))
absolute_diffs = (gathered_param[None, 0, :] - gathered_param).abs()
rank_params_eq = (absolute_diffs < atol).all()
assert rank_params_eq, f"❌ param [{name}] not equal - got max_absolute_diff={absolute_diffs.max()}"
// Add ChatGPT Menu
const onOpen = () => {
const ui = SpreadsheetApp.getUi();
ui.createMenu("ChatGPT")
.addItem("💾 Save Responses as Text", "saveAsText")
.addItem("ChatGPT API Sheet by Sarah Tamsin 💜", "openUrl")
.addToUi();
};
@imthenachoman
imthenachoman / Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace.md
Last active April 18, 2024 15:17
Developing a GAS Powered Google Workspace Add-on And Launching It To The Marketplace
@shiritrong
shiritrong / gist:d85bb1e16c66d1a09896727780b4fc7c
Last active April 18, 2024 15:16
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG

Hide WPCodebox menu item and page from other users.

Make it availble to all admins with email of @agencyemail or by username

@etoosamoe
etoosamoe / sshd_config
Created February 2, 2024 10:47
SSH daemon configuration example
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 18, 2024 15:13
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'