This file contains hidden or 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
http://www.atmos.washington.edu/~dennis/MatrixCalculus.pdf |
This file contains hidden or 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
https://rdipietro.github.io/friendly-intro-to-cross-entropy-loss/ |
This file contains hidden or 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
x = float(input('Digite um número qualquer (positivo ou negativo): ')) | |
y = str(input('Digite um substantivo precedido de seu artigo definido: ')) | |
z = str(input('Digite um predicado que concorde em número e gênero com o substantivo: ')) | |
if x > 0: | |
w = "Na sociedade dominada pela indústria cultural, " | |
k = "instante único" | |
u = " em si" | |
l = " Benjamin " | |
elif x < 0: |
This file contains hidden or 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 smtplib | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEText import MIMEText | |
from email.MIMEBase import MIMEBase | |
from email import encoders | |
fromaddr = "YOUR EMAIL" | |
toaddr = "EMAIL ADDRESS YOU SEND TO" | |
msg = MIMEMultipart() |
This file contains hidden or 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 numpy import linalg as la | |
a = np.array([[3,1,1],[-1,3,1]],dtype='float32') | |
b = np.matmul(a,a.T) | |
eivalues, eivectors =la.eig(b) | |
#CAREFUL : the match is between the list | |
#of eigenvectors.T and eigenvalues |
This file contains hidden or 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 | |
import scipy.spatial as ss | |
u = np.array([1,2,3]) | |
u1 = np.array([1,2,3]) | |
v = np.array([2,3,-4]) | |
a = ss.distance.cosine(u, v) | |
a1 = ss.distance.cosine(u, u1) |
This file contains hidden or 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
#--------TENSORFLOW------------- | |
#MULTINOMIAL LOGISTIC CLASSIFIER | |
#APPLIED TO THE IRIS DATASET | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import tensorflow as tf | |
import scipy as sp | |
from sklearn.datasets import load_iris | |
%matplotlib inline |
This file contains hidden or 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 IPython.display import Image | |
Image(filename="nome do arquivo") |
This file contains hidden or 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 Conta: | |
#Exemplo mais simples de classe" | |
#Como inicialiar o objeto de uma classe" | |
def __init__(self): | |
self.data = [] | |
self.saldo = 2200 | |
self.ano = 2016 | |
self.nome = "Felipe" | |
def f(self,z): |
This file contains hidden or 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
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>saving | |
import pickle | |
a = 1 | |
b = [23,4,4,22] | |
c = "Hello" | |
d = "Baby I got me" | |
e = 99999 |