Skip to content

Instantly share code, notes, and snippets.

View shamzos's full-sized avatar
🎯
Focusing

Hamza Saadi shamzos

🎯
Focusing
  • Momentum Technologies INC.
  • Canada
View GitHub Profile
@bogdan-kulynych
bogdan-kulynych / transport.py
Last active May 10, 2024 15:27
Transportation problem solver in Python
import numpy as np
from collections import Counter
def transport(supply, demand, costs):
# Only solves balanced problem
assert sum(supply) == sum(demand)
s = np.copy(supply)