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
""" | |
The Invocation of Metric Code | |
============================= | |
A Pythonic poem in (mostly) metric form. | |
Hacks until the devs publish a fix: | |
- "()", "[]", ".", ":", "_", "=" and "==" don't contribute! | |
- Comments are part of the poem! Except the first one! |
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
terraform init | |
2024-09-05T16:16:13.333-0400 [INFO] Terraform version: 1.8.5 | |
2024-09-05T16:16:13.333-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.51.0 | |
2024-09-05T16:16:13.333-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.20.0 | |
2024-09-05T16:16:13.333-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1 | |
2024-09-05T16:16:13.333-0400 [DEBUG] using github.com/zclconf/go-cty v1.14.3 | |
2024-09-05T16:16:13.333-0400 [INFO] Go runtime version: go1.22.1 | |
2024-09-05T16:16:13.333-0400 [INFO] CLI args: []string{"terraform", "init"} | |
2024-09-05T16:16:13.333-0400 [TRACE] Stdout is a terminal of width 192 | |
2024-09-05T16:16:13.333-0400 [TRACE] Stderr is a terminal of width 192 |
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
def _squares(n): | |
""" | |
Arguments: | |
n (int): arbitray integer | |
Returns: | |
a list of squares up to the value of ``n``. | |
""" | |
return [ |
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: "Resources for hooking continuous integration into a version control repository" | |
Parameters: | |
applicationName: | |
Type: String | |
Description: Name of the application | |
Default: demo | |
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
// single option strategy test | |
const legsTest = [ | |
{ | |
StrikePrice: 97, | |
Type: "put", | |
TransType: "buy", | |
Quantity: 100, | |
Ask: 1.55, | |
Bid: 1.53 | |
} |
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: lambda function update with ecr image github action | |
# see: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview | |
on: | |
workflow_call: | |
inputs: | |
# Non-defaultable inputs, must be passed in from the caller workflow. | |
# see: https://docs.github.com/en/actions/using-workflows/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow | |
FUNCTION_NAME: | |
description: Name of the function to deploy |
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: ecr image build and push | |
# see: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview | |
on: | |
workflow_call: | |
inputs: | |
# Non-defaultable inputs, must be passed in from the caller workflow. | |
# see: https://docs.github.com/en/actions/using-workflows/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow | |
IMAGE_NAME: | |
description: Name of the image to build |
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
# ensure `gh-pages` branch is initialized before executing this workflow | |
# assumes sphinx files reside in /docs/ folder, with a `requirements.txt` file inside of that directory, with the following: | |
# sphinx>=4.3.0 | |
# sphinx-material>=0.0.35 | |
# myst-parser>=0.15.2 | |
# note: sphinx-material is not required, but myst-parser is required for MD parsing. | |
name: sphinx gh-pages action workflow |
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
#!/usr/bin/env python | |
import argparse | |
def main(command_line=None): | |
parser = argparse.ArgumentParser('Blame Praise app') | |
parser.add_argument( | |
'--debug', | |
action='store_true', | |
help='Print debug info' |
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 typing import List, Union | |
import random | |
def recursive_sum_of_squares( | |
x: List[Union[float,int]], | |
checked: bool = False | |
) -> float: | |
n = len(x) |
NewerOlder