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 | |
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
| SCRIPT_NAME="arg-parse" | |
| SCRIPT_DES=$'pass in arguments with \e[3m./scripts/arg-parse --arg1 this --arg2 that\e[0m' | |
| function log(){ | |
| echo -e "\e[92m$(date +"%r")\e[0m: \e[4;32m$SCRIPT_NAME\e[0m : >> $1" | |
| } |
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
| Description: A stack containing resources for an AWS Serverless Lambda function deployed through an AWS ECR. The Lambda will be given a role that grants it permission to access resources in a VPC. The IDs of the security group and subnet of the VPC resource must be specified as parameters. An optional parameter allows the application name to be set so resources will be tagged appropriately. In addition, secrets are delivered to the Lambda environment. These secrets must exist in the SecretManager store before this template can be spun up. | |
| Parameters: | |
| applicationName: | |
| Type: String | |
| Default: my-lambdas | |
| Description: Name of the application | |
| securityGroupID: | |
| Type: String | |
| Description: ID of the security group allowing ingress into the VPC resource Lambda is accessing. |
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
| from typing import List, Union | |
| import random | |
| def recursive_sum_of_squares( | |
| x: List[Union[float,int]], | |
| checked: bool = False | |
| ) -> float: | |
| n = len(x) |
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
| #!/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 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
| # 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 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
| 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 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
| 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 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
| // single option strategy test | |
| const legsTest = [ | |
| { | |
| StrikePrice: 97, | |
| Type: "put", | |
| TransType: "buy", | |
| Quantity: 100, | |
| Ask: 1.55, | |
| Bid: 1.53 | |
| } |
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
| 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 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
| def _squares(n): | |
| """ | |
| Arguments: | |
| n (int): arbitray integer | |
| Returns: | |
| a list of squares up to the value of ``n``. | |
| """ | |
| return [ |
OlderNewer