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
| openapi: '3.0.0' | |
| info: | |
| title: SquirrelVL API | |
| description: > | |
| SquirrelVL API is a collection of endpoints that support the Squirrel | |
| VanLife application. | |
| version: '0.0.1' | |
| servers: | |
| - url: https://api.nicesquirrel.com | |
| description: Production API server |
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
| <escape>:%!python -mjson.tool |
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
| class Order2(Model): | |
| class Meta: | |
| table_name = ORDER_TABLE | |
| region = 'ap-southeast-1' | |
| dax_read_endpoints = ['longtermcluster.vuu7lr.clustercfg.dax.apse1.cache.amazonaws.com:8111'] | |
| dax_write_endpoints = ['longtermcluster.vuu7lr.clustercfg.dax.apse1.cache.amazonaws.com:8111'] | |
| ## keys | |
| ownerId=UnicodeAttribute() | |
| basketId=UnicodeAttribute() | |
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 pynamodb_attributes import UnicodeEnumAttribute | |
| from pynamodb.models import Model | |
| from enum import Enum | |
| class ShippingType(Enum): | |
| delivery = 'DELIVERY' | |
| pickUp = 'PICKUP' | |
| class PynamoClass(Model): | |
| shippingType = UnicodeEnumAttribute(ShippingType, null=True) # enum shipping type |
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 | |
| import yaml | |
| @dataclass_json(undefined=Undefined.INCLUDE) | |
| @dataclass | |
| class Product(JsonSchemaMixin): | |
| iprcode: int | |
| cprcode: 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
| - /deploymentId, | |
| - /description, | |
| - /cacheClusterEnabled, | |
| - /cacheClusterSize, | |
| - /clientCertificateId, | |
| - /accessLogSettings, | |
| - /accessLogSettings/destinationArn, | |
| - /accessLogSettings/format, | |
| - /{resourcePath}/{httpMethod}/metrics/enabled, | |
| - /{resourcePath}/{httpMethod}/logging/data Trace, |
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 |