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
| def safe_func(default_value=None): | |
| def decorate(f): | |
| @functools.wraps(f) | |
| def wrapper(*args, **kwds): | |
| try: | |
| res = f(*args, **kwds) | |
| except: | |
| res = default_value | |
| return res | |
| return wrapper |
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
| %%time | |
| len1 = len(train) | |
| train["col"] = train["col"].str.strip() | |
| train.drop(train[train["col"].str.len() == 0].index, inplace=True) | |
| len2 = len(train) | |
| print(f"{len1 - len2} rows deleted") |
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 pathlib | |
| from datetime import datetime | |
| ts = datetime.now().strftime('%Y%m%d_%H%M%S') | |
| job_dir = f"models/mlp/{ts}" | |
| pathlib.Path(job_dir).mkdir(parents=True, exist_ok=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
| pd.set_option("use_inf_as_na", True) | |
| pd.set_option("max_info_columns", 9999) | |
| pd.set_option("display.max_columns", 9999) | |
| pd.set_option("display.max_rows", 9999) | |
| pd.set_option('max_colwidth', 9999) |
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
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = [email protected] | |
| username = pksunkara | |
| [core] | |
| editor = vim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| pager = delta | |
| [sendemail] | |
| smtpencryption = tls |
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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
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
| { | |
| "TrainingJobName": "", | |
| "HyperParameters": { | |
| "epochs": "40", | |
| "folds": "5", | |
| "patience": "4", | |
| "batch_size": "32", | |
| "input_shape": "300,300,3", | |
| "pooling": "avg", | |
| "hidden_layer_sizes": "100", |
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
| aws s3 cp s3://mybucket/models/ models/ --recursive --exclude "*" --include "*effnetb3-20210330-150641*" |
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
| [pytest] | |
| filterwarnings = | |
| ignore::DeprecationWarning:tensorflow.* | |
| markers = | |
| slow: marks tests as slow (deselect with '-m "not slow"') |
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
| aws sts get-session-token --duration-seconds 36000 |