Skip to content

Instantly share code, notes, and snippets.

View alangixxer's full-sized avatar

alangixxer

View GitHub Profile
@alangixxer
alangixxer / license-plate-detect.py
Created July 29, 2019 03:42
license-plate-detect
'''
Copyright 2019 Alan Newcomer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. For referenced software, check for specific copyright and licenses.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, A
@alangixxer
alangixxer / QLDB-Account-Activity-cf-template.json
Created July 20, 2019 19:24
QLDB-Account-Activity-cf-template.json
{
"AWSTemplateFormatVersion":"2010-09-09",
"Parameters":{
"JavaFunctionName":{
"Type":"String",
"Default":"QLDB-java-function",
"Description":"Enter name for the java lambda function."
},
"PythonFunctionName":{
"Type":"String",
@alangixxer
alangixxer / empty-s3-bucket.py
Created July 4, 2019 16:21
python lambda function to detect empty s3 buckets
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import boto3
s3 = boto3.client('s3')
# creates a generator for files in bucket, this is a fast approach is not reading each object name.