Extracts perms from cloud-custodian repo, sanitizes extracted data, and transforms into terraform
Dependency is ripgrep and git which can be installed using brew
brew install rg git
The code will
| import json | |
| import boto3 | |
| import random | |
| def lambda_handler(event, context): | |
| dynamodb = boto3.client('dynamodb') | |
| Records = event['Records'] | |
| print(json.dumps(event)) | |
| for Record in Records: | |
| #!/bin/sh | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... | |
| # 1. Copy the file into your repo at `.git/hooks/pre-push` | |
| # 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
| import itertools | |
| import os | |
| import adaptive | |
| import holoviews.plotting.mpl | |
| import matplotlib | |
| import matplotlib.cm | |
| import matplotlib.tri as mtri | |
| import numpy as np | |
| from matplotlib import animation |
| # from includes.movie import convert | |
| import os | |
| import random | |
| import traceback | |
| from io import BytesIO | |
| import torch | |
| from flask import Flask, send_file | |
| from pytorch_pretrained_biggan import (BigGAN, one_hot_from_names, truncated_noise_sample, convert_to_images) | |
| import numpy as np |
apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start| from flask import Flask, request, jsonify, json, abort | |
| from flask_cors import CORS, cross_origin | |
| import pandas as pd | |
| app = Flask(__name__) | |
| cors = CORS(app) | |
| app.config['CORS_HEADERS'] = 'Content-Type' |
| # Change the path below to your own audit log path. | |
| /var/log/vault/audit.log { | |
| rotate 30 | |
| daily | |
| # Do not execute rotate if the log file is empty. | |
| notifempty | |
| missingok | |
| compress | |
| # Set compress on next rotate cycl to prevent entry loss when performing compression. | |
| delaycompress |