export PROFILE=some-profile
aws stepfunctions list-state-machines --region eu-central-1 --profile $PROFILE | jq -r '.stateMachines | .[] | .stateMachineArn' |
while read uname1; do
echo "Deleting $uname1";
aws stepfunctions delete-state-machine --region eu-central-1 --state-machine-arn $uname1 --profile $PROFILE;
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": "0", | |
"id": "c9888434-815d-c6f4-9fc2-4dd7bdeccaaf", | |
"detail-type": "Object Created", | |
"source": "aws.s3", | |
"account": "528068194338", | |
"time": "2023-08-09T13:09:50Z", | |
"region": "eu-west-1", | |
"resources": [ | |
"arn:aws:s3:::mxcd-magic-star-691-in" |
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
# #!/bin/bash | |
set -ex | |
sudo -u ec2-user -i <<'EOF' | |
conda create --name glue_pyspark python=3.9 ipykernel jupyter nb_conda -y | |
source activate glue_pyspark | |
python3 -m pip install --upgrade --user aws-glue-sessions jupyter_client | |
rm -r /home/ec2-user/anaconda3/envs/glue_pyspark/share/jupyter/kernels/python3 | |
echo "Copying Glue PySpark Kernel" |
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
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash | |
sudo yum install git-lfs |
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
# install these dependencies | |
# pip install torch transformers pillow | |
# import the dependencies | |
from PIL import Image | |
from transformers import CLIPProcessor, CLIPModel | |
import torch | |
# emoji images: https://public-assets-vincent-claes.s3.eu-west-1.amazonaws.com/emoji-precitor/emojis.zip | |
path_to_emoji_folder = "<path to the folder with images of emojis>" |
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
n = 1000 | |
df = pd.DataFrame( | |
np.repeat(df.to_numpy(), n, axis=0), columns=df.columns | |
) |
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
sepal.length | sepal.width | petal.length | petal.width | variety | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | .2 | Setosa | |
4.9 | 3 | 1.4 | .2 | Setosa | |
4.7 | 3.2 | 1.3 | .2 | Setosa | |
4.6 | 3.1 | 1.5 | .2 | Setosa | |
5 | 3.6 | 1.4 | .2 | Setosa | |
5.4 | 3.9 | 1.7 | .4 | Setosa | |
4.6 | 3.4 | 1.4 | .3 | Setosa | |
5 | 3.4 | 1.5 | .2 | Setosa | |
4.4 | 2.9 | 1.4 | .2 | Setosa |
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
{ | |
"resource": "/", | |
"path": "/", | |
"httpMethod": "GET", | |
"headers": { | |
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", | |
"accept-encoding": "gzip, deflate, br", | |
"accept-language": "en-US,en;q=0.9", | |
"cookie": "s_fid=7AAB6XMPLAFD9BBF-0643XMPL09956DE2; regStatus=pre-register", | |
"Host": "70ixmpl4fl.execute-api.us-east-2.amazonaws.com", |
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
import os | |
import re | |
import datetime | |
import json | |
import urllib3 | |
from urllib.parse import urlencode | |
def lambda_handler(event, context): | |
stack_overflow = StackOverflow() |
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": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:CreateUploadBucket", | |
"cloudformation:CancelUpdateStack", | |
"cloudformation:CreateStack", | |
"cloudformation:DeleteStack", |
NewerOlder