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 diffusers import StableDiffusionPipeline, EulerDiscreteScheduler | |
import torch | |
model_id = "stabilityai/stable-diffusion-2-1-base" | |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler") | |
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16) | |
pipe = pipe.to("cuda") | |
prompt = "a photo of an astronaut riding a horse on mars" |
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 * as aws from '@pulumi/aws'; | |
const defaultTags = { Creator: 'pulumi' }; | |
const fearlessTools = new aws.route53.Zone('fearless.tools', { | |
name: 'fearless.tools', | |
tags: { Name: 'fearless.tools', ...defaultTags }, | |
}); | |
new aws.route53.Record('fearless.tools', { |
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 Head from 'next/head' | |
export default function Home() { | |
return ( | |
<> | |
<Head> | |
<title>Fearless Tools</title> | |
<meta name="description" content="Infrastructure without fear" /> | |
<link rel="icon" href="/favicon.ico" /> | |
</Head> |
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 * as aws from '@pulumi/aws'; | |
import { PolicyPack, ReportViolation, validateResourceOfType } from '@pulumi/policy'; | |
new PolicyPack('aws', { | |
policies: [ | |
{ | |
name: 'required-tags', | |
description: 'Certain tags are required.', | |
enforcementLevel: 'mandatory', |
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
const bobUser = new aws.iam.User('bob.bobby', { | |
name: 'bob.bobby', | |
tags: { Name: 'bob.bobby }, | |
}) |
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 * as aws from '@pulumi/aws'; | |
const defaultTags = { Creator: 'pulumi' }; | |
const timUser = new aws.iam.User('tim.myers', { | |
name: 'tim.myers', | |
tags: defaultTags, | |
}); |
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 * as aws from '@pulumi/aws'; | |
new aws.budgets.Budget('total-monthly-cost', { | |
name: 'total-monthly-cost', | |
budgetType: 'COST', | |
limitAmount: '10', | |
limitUnit: 'USD', | |
timeUnit: 'MONTHLY', | |
notifications: [{ | |
comparisonOperator: 'GREATER_THAN', |
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
name: pulumi | |
'on': | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize |
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 * as aws from '@pulumi/aws'; | |
const defaultTags = { Creator: 'pulumi' }; | |
const githubOIDC = new aws.iam.OpenIdConnectProvider('github', { | |
url: 'https://token.actions.githubusercontent.com', | |
thumbprintLists: ['15e29108718111e59b3dad31954647e3c344a231'], | |
clientIdLists: ['sts.amazonaws.com'], | |
tags: defaultTags, | |
}); |
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
config: | |
aws:region: us-west-2 | |
aws:assumeRole: | |
roleArn: arn:aws:iam::<AWS Account ID>:role/infrastructure |
NewerOlder