Skip to content

Instantly share code, notes, and snippets.

@insyhmi
insyhmi / funny minor matrix order 3.py
Created October 15, 2025 02:12
the partial blueprint for my matrix class
row, column = (3,3)
print(f"Minor / Cofactor calculator for {row} x {column} matrix\nSeparate your elements with a whitespace\neg. Row 1: a b c [ENTER]\n")
matrix = []
for i in range(row):
matrow = [int(x) for x in input(f"Row {i+1}: ").split(" ")]
if len(matrow) != column:
print("Invalid row, try again")
i -= 1
continue
matrix.append(matrow)
@insyhmi
insyhmi / Newtons method of approximation.py
Created October 15, 2025 02:06
Newtons method of approximation
from sympy import *
x= symbols('x')
# SETTINGS
# f -> function to be evaulated, in terms of x
# x0 -> starting value
# repeat -> amount of iterations
# precision -> floating point rounding.
f = x**2 - 168
@insyhmi
insyhmi / matrix.cpp
Last active October 15, 2025 02:21
class Matrix in c++ my implementation
#include <iostream>
#include <stdexcept>
#include <initializer_list>
#include <set>
using namespace std;
class Matrix{
int row;
int col;
double *ptr;