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 random | |
def draw(deck): | |
take_idx = random.randint(0, len(deck)-1) | |
card = deck.pop(take_idx) | |
return card, deck | |
def fresh_deck(): |
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
Nov 17 18:09:56 ip-172-31-118-208 e9c708126bf6/40316ef/prod/mcp_v2/render-prepare.worker: 2018-11-18 02:09:56,179 - kailan.rendering.vrcomps - INFO - 8 - Baking Prop 64000 | |
Nov 17 18:09:59 ip-172-31-118-208 e9c708126bf6/40316ef/prod/mcp_v2/render-prepare.worker: 2018-11-18 02:09:59,912 - kailan.rendering.vrcomps - INFO - 8 - Baking Prop 12865 | |
Nov 17 18:10:03 ip-172-31-118-208 e9c708126bf6/40316ef/prod/mcp_v2/render-prepare.worker: 2018-11-18 02:10:03,662 - kailan.rendering.vrcomps - INFO - 8 - Baking Prop 49034 | |
Nov 17 18:10:14 ip-172-31-118-208 e9c708126bf6/40316ef/prod/mcp_v2/render-prepare.worker: 2018-11-18 02:10:14,039 - kailan.rendering.vrcomps - INFO - 8 - Baking Prop 49038 |
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
from troposphere import NoValue, Tags, Sub | |
from troposphere import ( | |
ec2, | |
elasticsearch, | |
iam, | |
) | |
from stacker.blueprints.base import Blueprint | |
from stacker.blueprints.variables.types import TroposphereType |
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
from awacs.helpers.trust import get_ecs_task_assumerole_policy | |
from troposphere import ( | |
ecs, | |
iam, | |
) | |
from troposphere import ( | |
NoValue, | |
Output, |
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
from awacs.helpers.trust import get_ecs_task_assumerole_policy | |
from troposphere import ( | |
ecs, | |
iam, | |
) | |
from troposphere import ( | |
NoValue, | |
Output, |
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
from awacs.aws import Policy | |
from awacs.helpers.trust import ( | |
make_service_domain_name, | |
make_simple_assume_policy, | |
) | |
from troposphere import ( | |
codebuild, | |
ecr, | |
iam, |
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 | |
from troposphere import Template, NoValue | |
from troposphere import s3 | |
key_id = os.getenv("BUCKET_ENCRYPTION_KEY_ID") | |
bucket_encryption = NoValue |
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
{ | |
"Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", | |
"Properties" : { | |
"PolicyName" : "MyScalingPolicy", | |
"PolicyType" : "TargetTrackingScaling", | |
"ResourceId" : "arn:aws:dynamodb:us-east-1:123456789012:table/books_table", | |
"ScalableDimension" : "dynamodb:table:WriteCapacityUnits", | |
"ServiceNamespace" : "dynamodb", | |
"TargetTrackingScalingPolicyConfiguration" : { | |
"PredefinedMetricSpecification": { |
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
{ | |
"Resources": { | |
"AllowSSHFromGroup1ToGroup2": { | |
"Properties": { | |
"FromPort": 22, | |
"GroupId": { | |
"Ref": "SecurityGroup2" | |
}, | |
"IpProtocol": "tcp", | |
"SourceSecurityGroupId": { |
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
from troposphere import Template | |
from troposphere.ec2 import ( | |
SecurityGroup, | |
SecurityGroupIngress, | |
) | |
t = Template() | |
sg1 = t.add_resource( |
NewerOlder