Heading 1: # [space] or === or <h1>Heading 1</h1>
Heading 2: ## [space] or --- or <h1>Heading 2</h2>
Heading 3: ### [space] or <h1>Heading 3</h3>
Heading 4: #### [space] or <h1>Heading 4</h4>
...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Program for determining the inverse matrix | |
without using additional modules NumPy or SciPy. | |
###################################################### | |
Ax=b -> A^(-1)Ax=A^(-1)b -> Ix=A^(-1)b -> x=A^(-1)b # | |
###################################################### | |
''' | |
def printout_matrix(title_matrix, matrix): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Program for determining the inverse matrix and solve | |
system linear equation without using additional | |
modules NumPy or SciPy. | |
###################################################### | |
Ax=b -> A^(-1)Ax=A^(-1)b -> Ix=A^(-1)b -> x=A^(-1)b # | |
###################################################### | |
''' | |
def printout_matrix(title_matrix, matrix): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def determinant(A, output=0): | |
''' | |
The function return determinant of a square matrix using full recursion. | |
output=0 - etablish a output at each recursion level. | |
''' | |
# Store indices in list for row referencing | |
index=list(range(len(A))) | |
# If at 2 x 2 submatrices recursive calls end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sum(A,B): | |
''' | |
The function return result | |
additional two matrices. | |
parametr A: First variable m x n | |
parametr B: Second variable k x p | |
... | |
return C: result additional | |
''' | |
# Ensure dimensions are valid for matrix additional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def difference(A,B): | |
''' | |
The function return defferentail number and matricies. | |
parametr A: First variable | |
parametr B: Second variable | |
... | |
return C: result difference | |
''' | |
if type(A)==int and type(B)==int or \ | |
type(A)==float and type(B)==float: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#importing the packages | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#Defining the delta function | |
def delta(n): | |
if n == 0: | |
return 1 | |
else: | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Program for determining the inverse matrix and solve | |
# system linear equation without using additional modules NumPy / SciPy | |
import sys | |
def inv(A): | |
''' | |
The function returns the inverse of the passed in matrix. | |
– parametr A: The matrix to be inversed. | |
– return: The inverse of the matrix A. | |
''' | |
# Initializing the main values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class iset(object): | |
# matrix = [] | |
def __init__(self, mat = []): | |
# method - __init__ - constructor | |
self.matrix = mat | |
def __xor__(self, other): | |
value_1 = self - other | |
value_2 = other - self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Толкачев мне сразу непонятно мне объяснил зачем менять эту дату, подумал о дате на текущий момент | |
# потому и стал выводить сегодняшнюю дату | |
from datetime import datetime | |
today = datetime.now().strftime('%m/%d/%Y %H:%M:%S') | |
# Как цикл написал, то и понял что это необходимо GARM | |
# Который по дефолту принимает файл с необходимым форматом даты (со временем понятно) | |
import os | |
# chardet - класс по определению кодировки, а UniversalDetector это уже функция, которая нам и поможет | |
# вернуть словарь с кодировкой, языком... | |
from chardet.universaldetector import UniversalDetector |
OlderNewer