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
export const exampleLambda = new ESBuildNodeFunction('example', { | |
entry: path.resolve(__dirname, 'handler.ts'), | |
role: role.arn, | |
timeout: 8, | |
memorySize: 128, | |
environment: { | |
variables: { | |
DB_HOST: db.address, | |
DB_USER: db.username, | |
DB_PASS: dbPassword, |
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 enum | |
from dataclasses import dataclass | |
# ========= Helper code to set the scene ========= | |
# fake data loaded from csv | |
DATA = [ | |
{"object_id": "1", "state": "0"}, | |
{"object_id": "2", "state": "1"}, | |
{"object_id": "3", "state": "2"}, | |
{"object_id": "4", "state": "0"}, |
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
class EBEnvironmentEc2(pulumi.ComponentResource): | |
def __init__(self, env_config: EBEnvironmentEc2Config, opts: pulumi.ResourceOptions = None): | |
super().__init__( | |
"stekz:infrastructure:aws:elastic-beanstalk:EBEnvironmentEc2", | |
f"{env_config.environment_name}-eb-component", | |
None, | |
opts, | |
) | |
self._config = env_config |
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
"""A Python Pulumi program.""" | |
import enum | |
import pulumi | |
import pulumi_aws.ec2 as ec2 | |
from pulumi import ResourceOptions | |
class Situation(str, enum.Enum): | |
current = "a" |
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
"""A Python Pulumi program.""" | |
import pulumi | |
import pulumi_aws.sns as sns | |
import pulumi | |
from pydantic import BaseModel | |
from pulumi import ComponentResource, ResourceOptions, Alias | |
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 pulumi | |
from pulumi_aws import s3 | |
from pulumi import Output, Input, ResourceOptions, ComponentResource, set, get | |
import time | |
import json | |
from pydantic import BaseModel | |
async def w2(): | |
"""Awaitable simulating output""" |
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
{ | |
"version": 2, | |
"name": "blog", | |
"builds": [ | |
{ | |
"src": "api/**/*.py", | |
"use": "@now/python" | |
}, | |
{ | |
"src": "www/**/*", |
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
[debug] [2019-11-14T20:59:48.611Z] Found config in file ~/blog/pelican/blog/now.json | |
> [debug] [2019-11-14T20:59:48.617Z] Using Now CLI 16.5.2 | |
> [debug] [2019-11-14T20:59:48.619Z] user supplied a possible target for deployment | |
> [debug] [2019-11-14T20:59:48.643Z] GET https://api.zeit.co/www/user | |
> [debug] [2019-11-14T21:00:24.470Z] GET https://api.zeit.co/www/user : 35825.794ms | |
> Deploying ~/blog/pelican/blog/public under 1oglop1 | |
> Using project blog | |
[now-client-debug] 2019-11-14T21:00:24.491Z Creating deployment... | |
[now-client-debug] 2019-11-14T21:00:24.491Z Provided 'path' is a directory. Reading subpaths... | |
[now-client-debug] 2019-11-14T21:00:24.493Z Read 4 subpaths |
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
{ | |
"version": 2, | |
"name": "my-python-project", | |
"builds": [ | |
{ "src": "www/**/*", "use": "@now/static" }, | |
{ "src": "api/**/*.py", "use": "@now/python" } | |
], | |
"routes": [ | |
{ | |
"src": "/", |
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
""" | |
https://stackoverflow.com/questions/19145097/ | |
""" | |
import socket | |
from OpenSSL import SSL | |
import certifi | |
hostname='www.google.com' | |
port=443 |
NewerOlder