This tutorial uses Homebrew to install colima and Docker.
It was tested on Apple MacBook Pro (13-inch, M1, 2020) 8G and macOS Monterey version 12.1 (21C52).
Make sure you have fully uninstall any versions of Docker. You can check using:
import os | |
print( | |
os.path.dirname(os.path.abspath(__file__))+os.sep | |
) |
# S3 - Sync Local Directory (deleting cloud files if local files were deleted) | |
aws s3 sync ./ s3://bucket_name/ --delete |
# List | |
hdfs dfs -ls / | |
# Delete Directory | |
hdfs dfs -rm -r /DIRECTORY |
-- CREATE EXTENAL SCHEMA | |
-- https://docs.aws.amazon.com/pt_br/redshift/latest/dg/r_CREATE_EXTERNAL_SCHEMA.html | |
CREATE EXTERNAL SCHEMA 'yourDatabase' | |
FROM DATA CATALOG DATABASE 'yourDatabase' | |
REGION 'us-east-1' | |
IAM_ROLE 'arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME'; |
import json,time | |
import boto3 | |
athena_output = 's3://aws-athena-query-results-ACCOUNTID-REGION' | |
athena = boto3.client('athena') | |
glue = boto3.client('glue') | |
s3 = boto3.client('s3') |
[ | |
"Alice Stark", | |
"Bruno Arryn", | |
"Casie Tully", | |
"Desmond Greyjoy", | |
"Eliane Tarly", | |
"Fran Lannister" | |
] |
import json, random | |
# load candidates file | |
candidates = json.load(open('candidates.json','r')) | |
# numbers of candidates | |
total_of_candidates = len(candidates) | |
# generate a random number | |
voting = random.randint(1,total_of_candidates) | |
# get the name of chosen candidate (array starts with zero) | |
chosen = candidates[voting-1] |
import json, random, time | |
from multiprocessing import Process | |
candidates = json.load(open('candidates.json','r')) | |
total_of_candidates = len(candidates) | |
# people in sequence X district in parallel = total of voting | |
people_in_sequence = 3 | |
district_in_parallel = 3 |