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
| $schema: http://json-schema.org/schema# | |
| properties: | |
| id: | |
| type: string | |
| description: f42dde0a-8741-48f4-b535-9baeb3bea170 | |
| given_name: | |
| type: string | |
| description: Joe | |
| middle_name: | |
| type: string |
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 yaml | |
| print(yaml.dump({'hello':'world', | |
| 'stacked': {'hello1':'world1'}})) |
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
| pip install -r https://gist.github.com/thanakijwanavit/cc1c456b62315823acdfe6352004e0fc/raw/requirements.txt |
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
| name="python38" | |
| version="3.8" | |
| # Create a new conda environment for the given Python version | |
| conda create -y -n "$name" python="$version" | |
| # Activate the environment | |
| source /home/ec2-user/anaconda3/bin/activate "$name" | |
| # Create a Jupyter kernel for your new environment |
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
| ####timestamp | |
| datetime.now().timestamp() | |
| ### datestamp | |
| dt = datetime.combine(date.today(), datetime.min.time()) | |
| dt.timestamp() |
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://villa-remove-bg-small-output/ s3://villa-remove-bg-small-output/ --recursive --content-t | |
| ype="image/png" --no-guess-mime-type --metadata-directive="REPLACE" |
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 dataclasses_json import dataclass_json, Undefined, CatchAll | |
| from dataclasses_jsonschema import JsonSchemaMixin | |
| from dataclasses import dataclass | |
| from typing import List | |
| @dataclass_json(undefined=Undefined.INCLUDE) | |
| @dataclass | |
| class Product(JsonSchemaMixin): | |
| iprcode: int |
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
| ##### for signor | |
| from s3bz.s3bz import S3 | |
| def presign (bucket:str, key:str, expiry:int)->dict: | |
| return S3.presignUpload(bucket=bucket, key = key, expiry = 1000) | |
| ``` | |
| {'url': 'https://inventory-bucket-dev-manual.s3-accelerate.amazonaws.com/', | |
| 'fields': {'key': 'test', |
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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Resources: | |
| CloudFrontCachePolicy: | |
| Type: AWS::CloudFront::CachePolicy | |
| Properties: | |
| CachePolicyConfig: | |
| CachePolicyConfig | |
| cloudfrontdistribution: | |
| Type: AWS::CloudFront::Distribution | |
| Properties: |
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
| Parameters: | |
| BRANCH: | |
| Type: String | |
| Default: dev-blank |