Write a function that, given an input array of integers and a desired target_sum, returns the number of combinations, of any length, that add up to that target_sum.
I hereby claim:
- I am igorlg on github.
- I am igorlg (https://keybase.io/igorlg) on keybase.
- I have a public key ASDKo31X3pr6syAi9zz3oFyns-h0nk9evecYBjpm_dtaWwo
To claim this, I am signing this object:
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": "Template for a VPC with High Availability NAT for ECS", | |
"Parameters": { | |
"NATInstanceType": { | |
"Description": "NAT instance type", | |
"Type": "String", | |
"Default": "t2.micro", | |
"AllowedValues": [ | |
"t2.micro", |
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 datetime import datetime, timedelta | |
from tabulate import tabulate | |
from calendar import day_name | |
import sys | |
def wd(d): | |
return list(day_name)[d] | |
def sorted_week(): | |
return sorted([(j+1)%7 for j in range(7)], key=lambda n: (n+1)%7) |
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
source 'https://rubygems.org' | |
gem 'colorize' | |
gem 'inifile' |
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": "Template for a VPC with High Availability NAT for ECS", | |
"Parameters": { | |
"ClusterName": { | |
"Description": "The ECS Cluster Name", | |
"Type": "String" | |
}, | |
"InstanceType": { | |
"Description": "NAT instance type", |
Creates a basic CloudWatch Dashboard for an EC2 instance and it's EBS volumes.
usage: cw_dashboard_ec2.py [-h] [--dashboard_name DASHBOARD_NAME]
[--skip_devices [SKIP_DEVICES [SKIP_DEVICES ...]]]
[--volume_group VOLUME_GROUP]
[--aws_profile AWS_PROFILE] [--dump]
instance_id
Generate a CloudWatch Dashboard for an EC2 Instance
OlderNewer