python2.7 or 3.xpipvirtualenv
The following command creates a new virtual environment named venv in the current directory, usually this will be your project's directory.
python 2.7 or 3.xpipvirtualenvThe following command creates a new virtual environment named venv in the current directory, usually this will be your project's directory.
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "ReadOnlyPermissions", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "lambda:GetAccountSettings", | |
| "lambda:ListFunctions", | |
| "lambda:ListTags", |
| { | |
| "Sid": "AllowListingOfBucketRoot", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:ListBucket" | |
| ], | |
| "Resource": [ | |
| "arn:aws:s3:::{{BUCKET_NAME}}" | |
| ], | |
| "Condition": { |
| { | |
| "Sid": "AllowListingOfBucketRoot", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:ListBucket" | |
| ], | |
| "Resource": [ | |
| "arn:aws:s3:::{{BUCKET_NAME}}" | |
| ], | |
| "Condition": { |
| # /etc/nginx/conf.d/shiny.conf | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { | |
| listen 80; | |
| listen [::]:80 ipv6only=on; |
Reduce video size (H.264)
docker run --rm -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg -stats -i input.mp4 -vcodec libx264 -crf 28 output.mp4
Use libx265 (H.265) for even more reduction (not compatible with Windows 10 without additional codec).
Out of the box PowerBI is not able to connect to a PostgreSQL database; this limitation applies also to the On-premises data gateway that needs to be installed in order to connect to the RDS from outside of a VPC (more info here). Assuming that the host on which the two applications are running have network connectivity with the database there are a few steps needed in order to solve the following issues:
Get instance metadata on AWS EC2
curl -H Metadata:true "http://169.254.169.254/latest/meta-data/instance-id"On Azure Windows VM
curl -H @{'Metadata'='true'} "http://169.254.169.254/metadata/instance/compute/vmId?api-version=2017-08-01&format=text"Use the script above by making it executable (chmod +x convert.sh) and running it (./convert.sh).
If you want to add a page break use <<<, if you want to add syntax highlighting add :source-highlighter: rouge at the top of the Markdown file, it won't be rendered in Markdown but will be used by asciidoctor.
| import boto3 | |
| import json | |
| class EC2Handler: | |
| """ | |
| Class used to handle operations with EC2 through boto3. | |
| """ | |
| def __init__(self, region_name: str): | |
| self.client = boto3.resource('ec2', region_name) | |