Skip to content

Instantly share code, notes, and snippets.

@ghadj
ghadj / System Design.md
Created January 4, 2025 15:03 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ghadj
ghadj / latency.markdown
Created January 4, 2025 13:42 — 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

@ghadj
ghadj / Search my gists.md
Created November 18, 2024 21:00 — forked from santisbon/Search my gists.md
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@ghadj
ghadj / setup-azure-kinect-on-jetson-x-nx.md
Created January 18, 2023 10:35 — forked from madelinegannon/setup-azure-kinect-on-jetson-x-nx.md
Notes on Setting up the Microsoft Azure Kinect on Ubuntu 18.04
@ghadj
ghadj / message_filter_over_rosbag.py
Created December 29, 2022 16:20 — forked from awesomebytes/message_filter_over_rosbag.py
message_filters ApproximateTimeSynchronizer over a rosbag (without roscore or /use_sim_time)
#!/usr/bin/env python
import itertools
import sys
import time
import rospy
import rosbag
import message_filters
"""
Example using a message_filters filter (ApproximateTimeSynchronizer) iterating
@ghadj
ghadj / pgp.md
Created September 3, 2021 10:45 — forked from sepehr/pgp.md
PGP Guide

PGP Guide

GPG vs PGP

PGP can refer to two things:

The Pretty Good Privacy software originally written by Phil Zimmermann, and now owned by Symantec. The formats for keys, encrypted messages and message signatures defined by that software. These have now been formalised as the OpenPGP standard. The GPG software is an independent implementation of the OpenPGP standards, so you can use it to exchange encrypted messages with people using other OpenPGP implementations (e.g. Symantec's PGP).

@ghadj
ghadj / calculate_mean_ap.py
Last active December 23, 2020 20:46 — forked from tarlen5/calculate_mean_ap.py
Calculate mean Average Precision (mAP) for a set of ground truth and predicted bounding boxes for a set of images.
"""
author: Timothy C. Arlen
date: 28 Feb 2018
reviced: George Hadjiantonis
date: 23 Dec 2020
Calculate Mean Average Precision (mAP) for a set of bounding boxes corresponding to specific
image Ids. Usage: