minefolder
Science Score: 31.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic links in README
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Unable to calculate vocabulary similarity
Last synced: 11 months ago
·
JSON representation
·
Repository
Basic Info
- Host: GitHub
- Owner: justrach
- Language: Python
- Default Branch: master
- Size: 19.5 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 5 years ago
· Last pushed almost 5 years ago
Metadata Files
Citation
Owner
- Name: Rach
- Login: justrach
- Kind: user
- Location: Bay Area, CA
- Website: https://rach.codes
- Repositories: 3
- Profile: https://github.com/justrach
Citation (citationgenerator.py)
import streamlit as st
from sympy import *
from sympy import *
import json
import numpy as np
st.title('MA1508E Algebric Simplifier')
number_input_1 = st.text_input("Please enter the text that you would wish to simplify",value="x")
truncated_output = simplify(number_input_1)
st.write(truncated_output)
# x = Symbol('x')
# solved = solve(number_input_1,x)
# st.write(solved)
polynomialMatrix = st.text_input("Please enter the polynomial Matrix", value=[1,2,3])
polynomialMatrix = json.loads(polynomialMatrix)
polynomialMatrix = np.poly1d(polynomialMatrix).r
polynomialMatrix = str(polynomialMatrix)
st.write("The roots are ", polynomialMatrix)
st.header("RREF calculator")
writtenStuff = st.text_input("Please enter the matrix", value=[[1,0]])
writtenStuff = json.loads(writtenStuff)
st.write(type(writtenStuff))
M = Matrix(writtenStuff)
M_rref = M.rref()
# st.write(np.array(M_rref)
st.header("Projection Vector Calculator")
projectiona = st.text_input("Please enter the matrix A", value=[[1,0]])
projectionb = st.text_input("Please enter the matrix B", value=[[1,0]])
projectiona = json.loads(projectiona)
projectionb = json.loads(projectionb)
aMatrix = np.array(projectiona)
bMatrix = np.array(projectionb)
aTransposeMatrix = np.array(transpose(aMatrix))
st.subheader("A and A Transpose")
st.write(aMatrix,aTransposeMatrix)
st.subheader("A*ATranpose = ")
AdotAtranspose = np.dot(aTransposeMatrix,aMatrix)
st.write(AdotAtranspose)
AdotAtranspose =AdotAtranspose.astype(np.float64)
main1 = True
AdotAtransposeLinear = AdotAtranspose
while main1:
try:
st.subheader("Inverted A*Atranspose")
AdotAtransposeLinear = np.array(np.linalg.inv(np.matrix(AdotAtranspose)))
st.write(AdotAtransposeLinear)
break
except:
st.write("It is singular")
main1=False
break
def calc_proj_matrix(A):
return A*np.linalg.inv(A.T*A)*A.T
def calc_proj(b, A):
P = calc_proj_matrix(A)
return P*b.T
st.subheader("Projection Vector P is")
st.write(np.matrix(AdotAtranspose).dtype)
main2 = True
main3 = True
while main2:
try:
answer = projectiona * (np.dot(aTransposeMatrix, bMatrix) / np.dot(aTransposeMatrix, aMatrix))
st.write(answer)
break
except:
while main3:
try:
calc_proj_matrix(aMatrix)
except:
st.write("Singular Check")
main3 = False
main2 = False
# aMatrix = aMatrix.astype(np.float64)
# aTransposeMatrix = aTransposeMatrix.astype(np.float64)
# otherAnswer = aMatrix*AdotAtransposeLinear*aTransposeMatrix
break
main4 = True
while main4:
try:
st.subheader("Main Projection Matrix is")
st.write(np.array(calc_proj(bMatrix,aMatrix)))
except:
st.write("Aint not using this bruh")
main4 = false
st.header("Simple Vector Multiplication")
st.header('Orthonormal Basis Calculator')
vector1 = st.text_input("Please enter the matrix 1", value=[[1],[1],[1],[1]])
vector2 = st.text_input("Please enter the matrix 2", value=[[1],[-1],[1],[0]])
vector3 = st.text_input("Please enter the matrix 3", value=[[1], [1], [-1], [-1]])
vector4 = st.text_input("Please enter the matrix 4", value=[[1],[2],[0],[1]])
vector1 = json.loads(vector1)
vector2 = json.loads(vector2)
vector3 = json.loads(vector3)
vector4 = json.loads(vector4)
matrix1 = np.array(vector1).astype(np.float64)
matrix2 = np.array(vector2).astype(np.float64)
matrix3 = np.array(vector3).astype(np.float64)
matrix4 = np.array(vector4).astype(np.float64)
st.write("V1 = ",matrix1)
matrixDotProduct0 = np.dot(matrix1.T,matrix1)
st.write("V1.T * V1 = ", matrixDotProduct0)
# MATRIX V2
matrix1T = np.array(transpose(matrix1))
def solveMe(v1,u1):
v1T = np.array(transpose(v1)).astype(np.float64)
matrixDotProduct1 = np.dot(v1T,v1)
matrixDotProductTop = np.dot(transpose(v1),u1)
fractionMain = matrixDotProductTop / matrixDotProduct1
return fractionMain
def solveMeFinalAnswer(fraction,matrix):
return fraction*matrix
matrixDotProduct1 = np.dot(matrix1T,matrix1)
matrixDotProductTop = np.dot(transpose(matrix1),matrix2)
st.write("V1.T * V1 = ", matrixDotProduct1)
st.write("Top Fractions = ",matrixDotProductTop)
st.write("Bottom Fraction/Matrix", matrixDotProduct1)
# v2 = (matrix2 - (matrix1.T * matrix1)*matrix2*(np.linalg.inv(matrix1.T*matrix1)*matrix1))
# st.write(v2)
st.write("V1 = ",matrix2)
fractionMain = matrixDotProductTop / matrixDotProduct1
st.header("Fraction * V1 ")
st.write(fractionMain*matrix1)
st.header("V2 = ")
v2 = matrix2 - (fractionMain*matrix1)
st.write(v2)
###### MATRIX V3 ######
st.header("V3 here")
firstFraction = solveMe(matrix1,matrix3)
firstMatrix = solveMeFinalAnswer(firstFraction,matrix1)
st.write("First fraction", firstFraction)
st.write("First Matrix is ",firstMatrix)
secondFraction = solveMe(v2,matrix3)
secondMatrix = solveMeFinalAnswer(secondFraction,v2)
st.write("Second fraction", secondFraction)
st.write("Second Matrix is ",secondMatrix)
v3 = matrix3 - firstMatrix-secondMatrix
st.write("The answer is " , v3)
# v2dotproducted = np.dot(transpose(v2),v2)
# v3 = matrix3 - ((np.dot(matrix3,transpose(matrix1))/matrixDotProduct1 )* matrix1 ) - ((np.dot(transpose(v2),matrix3)/v2dotproducted)*v2)
# st.header("V3 = ")
# st.write(v3)
#### V4###
st.header("V4 here")
firstFraction = solveMe(matrix1,matrix4)
firstMatrix = solveMeFinalAnswer(firstFraction,matrix1)
st.write("First fraction", firstFraction)
st.write("First Matrix is ",firstMatrix)
secondFraction = solveMe(v2,matrix4)
secondMatrix = solveMeFinalAnswer(secondFraction,v2)
st.write("Second fraction", secondFraction)
st.write("Second Matrix is ",secondMatrix)
thirdFraction = solveMe(v3,matrix4)
thirdMatrix = solveMeFinalAnswer(thirdFraction,v3)
st.write("Third fraction", thirdFraction)
st.write("Third Matrix is ",thirdMatrix)
v4 = matrix4 - firstMatrix-secondMatrix - thirdMatrix
st.write("The answer is " , v4)
# matrix2T = np.array(transpose(matrix1)).astype(np.float64)
# matrixDotProduct1 = np.dot(matrix1T,matrix1)
# matrixDotProductTop = np.dot(transpose(matrix1),matrix2)
# st.subheader("Projection Matrix P is")
# projMat = np.dot(aMatrix,answer)
# st.write(projMat)
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
requirements.txt
pypi
- matplotlib ==3.3.3
- nltk ==3.5
- numpy ==1.19.4
- pandas ==1.1.5
- plotly ==4.14.3
- scipy ==1.6.3
- streamlit ==0.78.0
- sympy ==1.8
- wordcloud ==1.8.1