Skip to content

Instantly share code, notes, and snippets.

View Nevin243's full-sized avatar

Marc Nevin Nevin243

View GitHub Profile
@Nevin243
Nevin243 / emotion_detect.py
Created May 18, 2020 20:42
Open CV and rekognition demo for emotions on face capture
import numpy as np
import cv2
import boto3
import json
# Rekognition Detect faces
def detect_faces(photo):
client=boto3.client('rekognition')
@Nevin243
Nevin243 / opencv_capture.py
Created May 12, 2020 15:21
OpenCV and Rekognition
import numpy as np
import cv2
import boto3
import json
# Rekognition Detect faces
def detect_faces(photo):
client=boto3.client('rekognition')
@Nevin243
Nevin243 / foo_bar.py
Created March 24, 2020 10:12
Python Imports
def foo():
return("Hello ")
def bar():
return("World")
@Nevin243
Nevin243 / simple_flask_example.py
Created March 20, 2020 14:49
Node & Flask API Example
# For running a simple flask app
# Run via; export FLASK_APP = simple_flask_example.py
# python -m flask run
from flask import Flask, json
app = Flask(__name__)
def do_something():
# Go do something, normally this is seperated out in a seperate file / class
@Nevin243
Nevin243 / admin-ip-policy.json
Last active February 3, 2020 13:11
AWS Policy for IP Restricted Admin
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "<your-ip-goes-here>"