あまり深く理解してないので識者のツッコミ大歓迎
取り敢えず最低限だけ
# 補完を有効にする
# Welcome to Serverless! | |
# | |
# This file is the main config file for your service. | |
# It's very minimal at this point and uses default values. | |
# You can always add more config options for more control. | |
# We've included some commented out config examples here. | |
# Just uncomment any of them to get that config option. | |
# | |
# For full config options, check the docs: | |
# docs.serverless.com |
import os | |
import json | |
import logging | |
from unittest.mock import Mock | |
LOG_LEVEL = os.environ.get('LOG_LEVEL', 'DEBUG').upper() | |
if not (LOG_LEVEL in ('DEBUG', 'INFO', 'WARN', 'WARNING', 'ERROR', 'CRITICAL', 'FATAL')): |
# | |
# CC0 license | |
# | |
function make-pypkg-dir () { | |
curdir=$(pwd); | |
created_dir=$(dirname $1)/$(basename $1); | |
mkdir $1 \ | |
&& touch ${created_dir}/__init__.py \ | |
&& echo "${created_dir}/__init__.py is created." |
AWSTemplateFormatVersion: "2010-09-09" | |
Description: The AWS CloudFormation template for this Serverless application | |
Resources: | |
# Application resource | |
MyQueue: | |
Type: AWS::SQS::Queue | |
Properties: | |
Tags: | |
- Key: Name |
import * as path from 'path'; | |
import * as cdk from '@aws-cdk/core'; | |
import * as ddb from '@aws-cdk/aws-dynamodb'; | |
import * as apiGatewayV2 from '@aws-cdk/aws-apigatewayv2'; | |
import { LambdaProxyIntegration } from '@aws-cdk/aws-apigatewayv2-integrations'; | |
import { NodejsFunction, NodejsFunctionProps } from '@aws-cdk/aws-lambda-nodejs'; | |
import { HttpIntegration, HttpIntegrationType } from '@aws-cdk/aws-apigatewayv2'; | |
import { dirname } from 'path'; | |
const project_root_dir = path.join(dirname(__filename), '../') |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
from dotenv import load_dotenv | |
from pathlib import Path | |
from botocore.exceptions import ClientError | |
import boto3 | |
import json |
import functools | |
class Hook(object): | |
def init(self, event, context): | |
print(f'hook init: {event} {context}') | |
def before(self, event, context, record): | |
print(f'hook before: {event} {context} {record}') |
from pprint import pprint | |
# pprint(C) | |
import sys | |
from collections import Counter | |
from itertools import product, combinations | |
H, W, K = map(int, input().split()) | |
C = [] | |
for _ in range(H): |
# WA | |
H, W, K = map(int, input().split()) | |
C = [] | |
for _ in range(H): | |
C.append(input()) | |
from pprint import pprint | |
# pprint(C) |