10/17/2021
install awscli for linux (python)
Try to do these command
>pip install awscli --upgrade --user
>sudo apt install awscli
Thank you.
www.marearts.com
10/13/2021
Get file list in s3 bucket folder (example python code)
refer to source code
..
import boto3
import botocore
ACCESS_KEY = '**'
SECRET_KEY = '**'
s3_client = boto3.client(
's3',
aws_access_key_id=ACCESS_KEY,
aws_secret_access_key=SECRET_KEY,
region_name = 'eu-west-1'
)
bucket_name = '***'
folder_name = '***'
#check folder exist
try:
result = s3_client.list_objects_v2(Bucket=bucket_name, Prefix=folder_name )
for o in result['Contents']:
print(o['Key']) #file list in folder
except botocore.exceptions.ClientError as e:
print('no folder exist')
..
Thank you
www.marearts.com
10/12/2021
aws dynamodb scan all item using paginate
Refer to code, Thank you!
..
import boto3
ACCESS_KEY = '***'
SECRET_KEY = '***'
dynamo_client = boto3.client(
'dynamodb',
aws_access_key_id=ACCESS_KEY,
aws_secret_access_key=SECRET_KEY,
region_name = 'eu-west-1'
)
def Search_Item(TABLE_NAME):
paginator = dynamo_client.get_paginator('scan')
operation_parameters = {'TableName': TABLE_NAME,}
page_iterator = paginator.paginate(**operation_parameters)
return page_iterator
TABLE_NAME ='****'
page_iterator = Search_Item(TABLE_NAME)
for page in page_iterator:
for item in page['Items']:
print(item['UID']['S'])
..
www.marearts.com
ππ»♂️
10/03/2021
Docker container stop by image name
Stop docker container by image name:
imagename='mydockerimage'
docker stop $(docker ps | awk '{split($2,image,":"); print $1, image[1]}' | awk -v image=$imagename '$2 == image {print $1}')
Stop docker container by image name and tag:
imagename='mydockerimage:latest'
docker stop $(docker ps | awk -v image=$imagename '$2 == image {print $1}')
Subscribe to:
Posts (Atom)
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv rgb converting example code. refer to this page -> http://feel...
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
Created Date : 2007.8 Language : Matlab / C++(MFC) Tool : Matlab / Visual C++ 6.0 Library & Utilized : - / OpenGL Reference : ...
-
fig 1. Left: set 4 points (Left Top, Right Top, Right Bottom, Left Bottom), right:warped image to (0,0) (300,0), (300,300), (0,300) Fi...
-
The MNIST dataset is a dataset of handwritten digits, comprising 60 000 training examples and 10 000 test examples. The dataset can be downl...
-
Created Date : 2009.10. Language : C++ Tool : Visual Studio C++ 2008 Library & Utilized : Point Grey-FlyCapture, Triclops, OpenCV...
-
In the YUV color format, Y is bright information, U is blue color area, V is red color area. Show the below picture. The picture is u-v col...
-
Created Date : 2011.8 Language : Matlab Tool : Matlab 2010 Library & Utilized : - Reference : Multiple View Geometry (Hartly and Z...