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
func uploadfileAWSS3(fileuploadurl, contenttype, file): Observable<any>{ | |
//this will be used to upload all csv files to AWS S3 | |
const headers = new HttpHeaders({‘Content-Type’: contenttype}); | |
const req = new HttpRequest( | |
‘PUT’, | |
fileuploadurl, | |
file, | |
{ | |
headers: headers, | |
reportProgress: true, //This is required for track upload process |
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
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on /tmp/archive.7z $dir |
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
{ | |
"Version":"2012-10-17", | |
"Statement":[ | |
{ | |
"Sid":"PublicRead", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject","s3:GetObjectVersion"], | |
"Resource":["arn:aws:s3:::DOC-EXAMPLE-BUCKET/*"] | |
} |
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
zip -9r CP0069.zip CP0069 |
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 beartype import beartype | |
from typing import Optional, List | |
from enum import Enum | |
class Animal(Enum): | |
fish=1 | |
cat=2 | |
@beartype | |
def testBeartype(i:int, s:str, a:Optional[Animal]=None): |
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 enum import Enum | |
class Animal(Enum): | |
cat=1 | |
dog=2 | |
def testEnum(te:Animal): | |
animal:Animal = Animal[te] | |
print(animal.name) | |
print(animal.value) | |
testEnum('cat') |
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
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 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 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() | |