Strategy | Cross-validation set | Test set | Forecast |
---|---|---|---|
Direct | 14.302 | 8.378 | 13.124 |
Recursive | 14.302 | 8.378 | 16.471 |
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 re | |
from anytree.search import findall | |
def find_by_keyword(self, keyword) -> Node: | |
""" | |
Find the node whose regex matches the keyword given as input | |
""" | |
def match_regex(node): | |
has_regex = hasattr(node, "regex") and node.regex is not None | |
if has_regex: |
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/bash | |
# Publish a container to a given repository in the AWS ECR service | |
# Use the --help option to see it usage | |
set -e | |
AWS_PROFILE="default" | |
CLUSTER_NAME="qubec-cluster" | |
UPDATE_SRV=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
variable "cluster_name" { | |
description = "The ECS cluster to start the instances in" | |
type = string | |
default = "qubec-cluster" | |
} | |
module "ecs_cluster" { | |
source = "github.com/jetbrains-infra/terraform-aws-ecs-cluster?ref=v0.4.8" | |
cluster_name = var.cluster_name | |
spot = true |
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
module "sample_app" { | |
source = "github.com/madagra/terraform-aws-single-task-service" | |
ecs_cluster = aws_ecs_cluster._.id | |
task_name = "sample_app" | |
container_image = "mongo:latest" | |
task_exec_role = aws_iam_role.ecs_execution.arn | |
vpc_id = module.vpc.vpc_id |
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
data "aws_availability_zones" "available" { | |
state = "available" | |
} | |
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
version = "~> 2.48.0" | |
name = "example_vpc" | |
cidr = "10.0.0.0/16" |
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
resource "aws_route53_zone" "this" { | |
name = var.domain_name | |
} | |
module "acm" { | |
source = "terraform-aws-modules/acm/aws" | |
domain_name = var.domain_name | |
zone_id = aws_route53_zone.this.zone_id |
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
data "template_cloudinit_config" "config" { | |
gzip = false | |
base64_encode = true | |
part { | |
content_type = "text/x-shellscript" | |
content = <<EOT | |
#!/bin/bash | |
sudo mkdir -p /opt/pypi_server |
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
data "aws_ssm_parameter" "ec2_ami" { | |
name = "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" | |
} | |
resource "aws_instance" "pypi" { | |
ami = data.aws_ssm_parameter.ec2_ami.value | |
instance_type = "t3.nano" | |
user_data = data.template_file.cloud-init.rendered | |
key_name = "my-keypair" |
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
#cloud-config | |
repo_update: true | |
repo_upgrade: all | |
write_files: | |
- path: /opt/run_pypi_server.sh | |
content: | | |
#!/usr/bin/env bash | |
sudo yum update -y |