Skip to content

Instantly share code, notes, and snippets.

View rajshah001's full-sized avatar

Raj rajshah001

View GitHub Profile
@rajshah001
rajshah001 / recordBakeryOfferClickEvents
Created December 15, 2023 13:46
recordBakeryOfferClickEvents
import boto3
import uuid
import json
# Create a boto3 client for SES
ses_client = boto3.client('ses')
def lambda_handler(event, context):
for record in event['Records']:
print(record)
@rajshah001
rajshah001 / activationEmailSendingFunction.py
Last active December 15, 2023 13:47
Activation Email Sending Function
import json
import boto3
# Create a boto3 client for SES
ses_client = boto3.client("ses")
def lambda_handler(event, context):
# Activation
sender_email = "iambatmanbrucewayne6789@gmail.com"
@rajshah001
rajshah001 / sns-ses-access-policy.json
Created December 11, 2023 10:09
SNS Topic Access Policy for SES Access
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "stmt1689931588490",
"Effect": "Allow",
"Principal": {
"Service": "ses.amazonaws.com"
},
"Action": "SNS:Publish",
import json
def lambda_handler(event, context):
lambda_image = 'https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png'
response = {
'image': lambda_image,
'text': 'Hello from Lambda!!'
}
<html>
Ohh An Error Occured !!
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
</head>
<body>
@rajshah001
rajshah001 / gist:900f8cf2ab8abd34fba6b52c783109d3
Created November 19, 2017 13:41
Rock_Paper_Scissors Game
import random
import time
# Introduction
print("""-----------WELCOME TO THE ROCK PAPER SCISSORS GAME-----------
FOR ROCK PRESS 0
FOR PAPER PRESS 1
FOR SCISSORS PRESS 2""")
# It takes the input from the user and assigns a value to user_move variable.
while True:
@rajshah001
rajshah001 / gist:c53bb363c8fd5874be4055f58b274367
Created November 16, 2017 15:17
It is a Tic Tac Toe Game created by me. It is a basic game but,I hope that you would like it.
import time
import random
# asks for the sign from user
print("Which sign do you want to have ? x or o")
ask_sign = input()
# introduction
print("""|------|------|------|
| 1 | 2 | 3 |
|------|------|------|