Skip to content

Instantly share code, notes, and snippets.

@Tkachov
Tkachov / simplex.py
Last active October 26, 2017 13:06
Implements simplex method algorithm, pretty prints the table on every step
from fractions import Fraction
def is_straight(z):
rows = len(z)
for i in range(1, rows):
if z[i][0] < 0:
return False
return True
def is_dual(z):
native/pre do
##include <cstdio>
end
native @nohold _printf();
class Class1 with do end
class Class2 with do end
class Class3 with do end
class Class4 with do end