This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import boto3 | |
def main(): | |
all_ec2 = {} | |
all_rds = {} | |
all_cache = {} | |
all_elb = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE GROUP read_only; | |
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM GROUP read_only; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO GROUP read_only; | |
CREATE USER | |
time_limited_reader | |
WITH | |
PASSWORD 'md5b3d32f5a247d71dd338a1effa3976ede' | |
IN GROUP read_only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
ZONE=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone 2>/dev/null) | |
failed() { | |
echo Failed after ${X} | |
exec curl http://169.254.169.254/latest/meta-data/placement/availability-zone | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import PIL | |
import PIL.Image | |
import PIL.ImageOps | |
import numpy as np | |
print('Number of images before: {}'.format(X_train.shape[0])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import cv2 | |
import numpy as np | |
own_pictures = [] | |
dirname = './extra_images/' | |
for fn in os.listdir(dirname): | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<![CDATA[ | |
// a few things don't have var in front of them - they update already existing variables the game needs | |
// Input is 7 lanes, security is 5 slots back and 6 ahead | |
lanesSide = 2; | |
patchesAhead = 11; | |
patchesBehind = 6; | |
trainIterations = 10000; | |
var num_inputs = (lanesSide * 2 + 1) * (patchesAhead + patchesBehind); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You may not | |
# use this file except in compliance with the License. A copy of the License | |
# is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/FusionEKF.cpp w/FusionEKF.cpp | |
index 5092324..93b0cc5 100644 | |
--- i/FusionEKF.cpp | |
+++ w/FusionEKF.cpp | |
@@ -37,8 +37,8 @@ FusionEKF::FusionEKF() { | |
0, 0.0225; | |
- double noise_ax = 9; // x uncertainty added | |
- double noise_ay = 9; // y uncertainty added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
def respond(res, statusCode=200): | |
return { | |
'statusCode': statusCode, | |
'body': res if isinstance(res, (type(None), str, bytes, bytearray)) else json.dumps(res), | |
'headers': { | |
'Content-Type': 'application/json', | |
'Access-Control-Allow-Origin': '*' | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from google.cloud import pubsub | |
# Instantiates a client | |
pubsub_client = pubsub.Client() | |
sbscr = pubsub_client.subscription('demoapi_subscription_createTenant') | |
i = 0 | |
while True: | |
for x in sbscr.pull(return_immediately=True): |