-
Install the fonts on your computer:
git clone https://github.com/powerline/fonts.git cd fonts ./install.sh cd .. && rm -rf fonts
-
Then, open the settings (ctrl+p > "settings json" > enter) in vscode.
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
| services: | |
| db: | |
| image: pgvector/pgvector:pg17 | |
| restart: always | |
| container_name: pgvector-db | |
| environment: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: mysecretpassword | |
| POSTGRES_DB: vectordb | |
| ports: |
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
| ################################################# | |
| #### Automatic Pythonic Developer Environment #### | |
| ################################################# | |
| ## | |
| ## If you don't really know what to do, run `make help`. | |
| ## If you don't have make installed, | |
| ## To be used on Linux system | |
| ## Make sure you have `pyenv` installed beforehand | |
| ## | |
| ## https://github.com/pyenv/pyenv |
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
| # Download new VSCode Version | |
| echo "Update and Upgrade" | |
| sudo apt update -y | |
| sudo apt upgrade -y | |
| CODEPATH=~/Downloads/vscode.deb | |
| echo "Download new VSCode version" | |
| curl -L "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64" -o "$CODEPATH" |
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
| n_entradas = X_train.shape[1] | |
| keras_model = Sequential([ | |
| Dense(n_entradas, input_shape=(n_entradas, ), activation='relu'), | |
| Dense(32, activation='relu'), | |
| Dense(2, activation='softmax') | |
| ]) | |
| from keras.utils.vis_utils import plot_model | |
| plot_model(keras_model, show_shapes=True, show_layer_names=True) |
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
| #1. Escolha do modelo | |
| from sklearn.tree import DecisionTreeClassifier | |
| #2. Instanciar o modelo e escolher os hyperparametros | |
| model_tree = DecisionTreeClassifier(max_depth=4, criterion="entropy") | |
| #3. Fit do modelo | |
| model_tree.fit(X_rand, y_rand) | |
| #Fazer previsões em cima dos novos dados |
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
| #1. Escolher o modelo | |
| from sklearn.linear_model import LogisticRegression | |
| #2. Instanciar o modelo | |
| np.random.seed(2) | |
| model_lr = LogisticRegression() | |
| #3. Fit do modelo | |
| model_lr.fit(X_rand, y_rand) |
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 imblearn.under_sampling import RandomUnderSampler | |
| rand = RandomUnderSampler() | |
| X_rand, y_rand = rand.fit_sample(X_train, y_train) |
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
| #remover colunas que contém dados não numéricos | |
| cols_to_remove = [] #criar uma lista vazia onde serão armazenadas as colunas a serem removidas | |
| for col in df.columns: | |
| try: | |
| _ = df[col].astype(float) #se os dados na coluna forem do tipo float(numerico) OK | |
| except ValueError: #se os dados na coluna forem diferentes de numérico, serão acrescidas a lista de colunas removidas | |
| print('Nao foi possivel converter a coluna %s para float' % col) #mostra quais colunas serão removidas | |
| cols_to_remove.append(col) #adicionar a coluna para a lista de colunas a remover | |
| pass |
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
| # importar os pacotes necessários | |
| import pandas as pd | |
| # importar o arquivo | |
| df = pd.read_csv("train.csv") #aqui você deve especificar o nome do arquivo .csv que deseja importar | |
| # ver 5 as primeiras entradas | |
| df.head() |
NewerOlder