Skip to content

Instantly share code, notes, and snippets.

View fextivity's full-sized avatar
🏠
Working from home

Trần Xuân Bách fextivity

🏠
Working from home
  • Chicago, US | Hanoi, Vietnam
  • 08:54 (UTC -06:00)
View GitHub Profile
@fextivity
fextivity / determinant.py
Created November 15, 2024 19:47
Calculate determinant and print latex with steps
r"""
Program to do Gaussian elimination for UChicago MATH 20250's homework.
Given a square matrix of size n, print out the steps
Intended to be put in align* environment.
Example:
> python3
"""
from __future__ import annotations
@fextivity
fextivity / gauss.py
Created October 23, 2024 23:06
Program to do Gaussian elimination for UChicago MATH 20250's homework. Given k systems of equations (with the same coefficient matrix), solve them and print out each steps.
r"""
Program to do Gaussian elimination for UChicago MATH 20250's homework.
Given k systems of equations (with the same coefficient matrix), solve them and print out each steps
Intended to be put in align* environment.
Example:
> python3 gauss.py
Number of equations (rows), variables (left columns), systems (right columns): 4 5 1
Elements of row 1 of the augmented matrix, input 6 space-separated fractions: 3 -1 1 -1 2 5
Elements of row 2 of the augmented matrix, input 6 space-separated fractions: 1 -1 -1 -2 -1 2