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
import numpy as np | |
from scipy.linalg import lu | |
def linearly_dependent(x, y): | |
if len(x) == 2 and len(y) == 2: | |
matrix = np.array([x, y]).T | |
return np.linalg.det(matrix) == 0.0 | |
else: | |
matrix = np.array([x, y]) | |
_, u = lu(matrix, permute_l=True) |
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 readmail(volume): | |
time.sleep(1.5) | |
m = imaplib.IMAP4_SSL("imap.gmail.com") | |
m.login(user, pwd) | |
m.select('"[Gmail]/All Mail"') | |
resp, items = m.search(None, | |
"NOT SEEN FROM tradingview") | |
items = items[0].split() | |
for emailid in items: | |
resp, data = m.fetch(emailid, |