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
watch -n1 nvidia-smi |
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
scale_cols = ['Time','Amount'] | |
scaler = StandardScaler() | |
# fit scaler | |
scaler.fit(train_df[scale_cols].to_numpy()) | |
# make copies of dataframes | |
train_df_ = train_df.copy() | |
val_df_ = val_df.copy() | |
test_df_ = test_df.copy() |
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 qrcode | |
qr = qrcode.QRCode(version=3, box_size=15, border=15) #box_size is QR dimension and border is thickness | |
data = "https:~/~/www.amazon.com" | |
qr.add_data(data) | |
image = qr.make_image(fill='black', back_color='white') |
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 - https://gitlab.com/juliensimon/aim410/-/blob/master/aim410.ipynb | |
# Number of GPUs on this machine | |
%env SM_NUM_GPUS=0 | |
# Where to save the model | |
%env SM_MODEL_DIR=/tmp/model | |
# Where the training data is | |
%env SM_CHANNEL_TRAINING=data | |
# Where the validation data is | |
%env SM_CHANNEL_VALIDATION=data |
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 os | |
import shutil | |
import tarfile | |
from collections import defaultdict | |
import logging | |
# Setup basic logging | |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
def copy_and_compress(src_directory, temp_directory, max_types, max_size): |
OlderNewer