Skip to content

Instantly share code, notes, and snippets.

View Rishav09's full-sized avatar

Rishav Sapahia Rishav09

View GitHub Profile
@Rishav09
Rishav09 / System Design.md
Created June 6, 2025 16:21 — 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?
model.train()
for batch_idx, (data, target) in enumerate(loader['train']):
# move to GPU
if torch.cuda.is_available():
data, target = data.to('cuda', non_blocking=True), target.to('cuda', non_blocking = True) # noqa
optimizer.zero_grad()
output = model(data)
pred = torch.argmax(output, dim=1)
# pred = pred.to(torch.double)
# target = target.to(torch.double)