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 nicHelper.colab import autoSetupAws | |
from getpass import getpass | |
path = '/content/drive/MyDrive/.test' | |
autoSetupAws(path=path, | |
password = getpass('enter your password').encode(), | |
region='ap-southeast-1' ) |
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
numpy.base_repr(10, base=3) |
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
name: deploy | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
name: build |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# for a list that looks like this | |
''' | |
“[strawberry, apple, orange]” | |
[credit](https://towardsdatascience.com/dealing-with-list-values-in-pandas-dataframes-a177e534f173) | |
''' | |
def clean_alt_list(list_): | |
list_ = list_.replace(', ', '","') | |
list_ = list_.replace('[', '["') | |
list_ = list_.replace(']', '"]') |
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 marshmallow import Schema, fields | |
from marshmallow_jsonschema import JSONSchema | |
class UserSchema(Schema): | |
name = fields.String() | |
address = fields.String() | |
class Athlete(object): | |
user_schema = UserSchema() | |
def __init__(self): |
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
Model.create(billing_mode='PAY_PER_REQUEST) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 chunk(items:(list, str), sz:int)->Iterable: | |
return [items[i:i + sz] for i in range(0, len(items), sz) |
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
https://otuyrsy65a.execute-api.ap-southeast-1.amazonaws.com/Prod/getOrder |