File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws rekognition search-faces-by-image \
3+ --image '{\" S3Object\" :{\" Bucket\" :\" facerek1612\" ,\" Name\" :\" new_image91.jpeg\" }}' \
4+ --collection-id \" images\" \
5+ --region us-east-1 \
6+ --profile adminuser"
7+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
8+
Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws rekognition create-collection \
3+ --collection-id \" images\" \
4+ --region us-east-1 \
5+ --profile adminuser"
6+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
7+
8+
9+
Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws s3 rm s3://facerek1612 --recursive"
3+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
4+
5+
Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws rekognition index-faces \
3+ --image '{\" S3Object\" :{\" Bucket\" :\" facerek1612\" ,\" Name\" :\" new_image1.jpeg\" }}' \
4+ --collection-id \" images\" \
5+ --region us-east-1 \
6+ --profile adminuser"
7+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
8+
9+
10+ c = "aws rekognition index-faces \
11+ --image '{\" S3Object\" :{\" Bucket\" :\" facerek1612\" ,\" Name\" :\" new_image2.jpeg\" }}' \
12+ --collection-id \" images\" \
13+ --region us-east-1 \
14+ --profile adminuser"
15+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
16+
17+ c = "aws rekognition index-faces \
18+ --image '{\" S3Object\" :{\" Bucket\" :\" facerek1612\" ,\" Name\" :\" new_image3.jpeg\" }}' \
19+ --collection-id \" images\" \
20+ --region us-east-1 \
21+ --profile adminuser"
22+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
23+
24+ c = "aws rekognition index-faces \
25+ --image '{\" S3Object\" :{\" Bucket\" :\" facerek1612\" ,\" Name\" :\" new_image4.jpeg\" }}' \
26+ --collection-id \" images\" \
27+ --region us-east-1 \
28+ --profile adminuser"
29+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
30+
31+
32+
33+
Original file line number Diff line number Diff line change 1+ import json
2+ with open ('output1.json' ,'r' ) as myfile :
3+ data = myfile .read ()
4+
5+ data = json .loads (data )
6+ l = len (data ['FaceMatches' ])
7+ if l == 0 :
8+ import mail
9+ else :
10+ print ("yes" )
11+
Original file line number Diff line number Diff line change 1+ from sparkpost import SparkPost
2+
3+ sp = SparkPost ('2a5e51536720e107050b8ec31e7428cea9266ca4' )
4+
5+ response = sp .transmissions .send (
6+ use_sandbox = True ,
7+ recipients = ['prateekkumar1612@gmail.com' ],
8+ html = '<p>Intruder Alert</p>' ,
9+ from_email = 'test@sparkpostbox.com' ,
10+ subject = 'Smart System'
11+ )
12+
13+ print (response )
Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws s3api create-bucket --bucket facerek1612 --region us-east-1"
3+ s .Popen (c ,shell = True , executable = '/bin/bash' )
Original file line number Diff line number Diff line change 1+ {
2+ "SearchedFaceBoundingBox" : {
3+ "Width" : 0.3706597089767456 ,
4+ "Top" : 0.2455555498600006 ,
5+ "Left" : 0.36917707324028015 ,
6+ "Height" : 0.2777777910232544
7+ },
8+ "SearchedFaceConfidence" : 99.82778930664062 ,
9+ "FaceMatches" : []
10+ }
Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws s3api put-object --bucket facerek1612 --key new_image1.jpeg --body /home/megatron/AWS/111"
3+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
4+
5+
6+ c = "aws s3api put-object --bucket facerek1612 --key new_image2.jpeg --body /home/megatron/AWS/211"
7+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
8+
9+
10+ c = "aws s3api put-object --bucket facerek1612 --key new_image3.jpeg --body /home/megatron/AWS/311"
11+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
12+
13+
14+ c = "aws s3api put-object --bucket facerek1612 --key new_image4.jpeg --body /home/megatron/AWS/411"
15+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
16+
Original file line number Diff line number Diff line change 1+ import subprocess as s
2+ c = "aws s3api put-object --bucket facerek1612 --key new_image91.jpeg --body /home/megatron/AWS/99"
3+ s .Popen (c ,shell = True ,executable = '/bin/bash' )
4+
5+
You can’t perform that action at this time.
0 commit comments