This file contains 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 functools import partial | |
from queue import SimpleQueue | |
def imap(exc, func, src, size=None, return_exc=False): | |
if size is None: | |
size = exc._max_workers | |
if size < 1: | |
raise ValueError("imap hang if size is less than one.") | |
results = SimpleQueue() | |
futures = {} |
This file contains 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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
A test case for the GetAttr bug with ECS's long ARNs. When this is fixed, | |
if you are opted in to long ARNs, the output ServiceName should be 'stack-Service-texttext' | |
and not equal to ClusterName. | |
Resources: | |
DummyCluster: | |
Type: AWS::ECS::Cluster |
This file contains 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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: > | |
Constructs a managed IAM policy to deploy a serverless project. | |
This template assumes the stack is being deployed in the current region and account. | |
You can then attach this policy to other IAM objects, such as users or roles. | |
Based on the work done in: https://github.com/serverless/serverless/issues/1439 |
This file contains 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 numpy as np | |
%matplotlib inline | |
from seaborn import tsplot | |
stars_planets = np.sort(0.05 + np.random.rand(100, 8), axis=1) | |
tsplot(np.log(stars_planets), err_style='unit_traces') |
This file contains 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
template = ''' | |
Resources: | |
LambdaLogGroup1234: | |
Type: "AWS::Logs::LogGroup" | |
Properties: | |
LogGroupName: !Join [ "", [ "/aws/lambda/", !Ref "AWS::StackName", "1234" ] ] | |
LambdaLogGroup: | |
Type: "AWS::Logs::LogGroup" | |
Properties: |