Well, not so much a quirk - but an interesting anti-pattern I found in some (poor quality) PowerShell. Documenting the "how and why" so I can refer to it again if needed!
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 | |
""" | |
Author: Jeremy M. Stober | |
Program: SOFTMAX.PY | |
Date: Wednesday, February 29 2012 | |
Description: Simple softmax function. | |
""" | |
import numpy as np | |
npa = np.array |
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
// http://aperiodic.net/phil/scala/s-99/ | |
// P08 (**) Eliminate consecutive duplicates of list elements. | |
// If a list contains repeated elements they should be replaced with a single copy of the element. The order of the elements should not be changed. | |
// Example: | |
// scala> compress(List('a, 'a, 'a, 'a, 'b, 'c, 'c, 'a, 'a, 'd, 'e, 'e, 'e, 'e)) | |
// res0: List[Symbol] = List('a, 'b, 'c, 'a, 'd, 'e) | |
object Problem08 { |
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 Declarative Pipeline is defined within a 'pipeline' block. | |
pipeline { | |
// agent defines where the pipeline will run. | |
agent { | |
// This also could have been 'agent any' - that has the same meaning. | |
label "" | |
// Other possible built-in agent types are 'agent none', for not running the | |
// top-level on any agent (which results in you needing to specify agents on | |
// each stage and do explicit checkouts of scm in those stages), 'docker', |
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
Param( | |
[Parameter(Mandatory = $true, | |
HelpMessage="URL of the secret stored in the keyvault")] | |
[ValidateNotNullOrEmpty()] | |
[string]$secretUrl, | |
[Parameter(Mandatory = $true, | |
HelpMessage="Resource group of keyvault")] | |
[ValidateNotNullOrEmpty()] | |
[string]$keyVaultResourceGroup, |
Bash script to install the latest released version of the AWS CLI v2 from the distrubuted source.
Using this method to exectue the CLI under a MacBook M1 laptop as a native ARM binary - rather than falling back to Rosetta. Currently the offically packaged macOS .pkg
doesn't support both Intel/M1 architectures.
Script designed to be re-run - will blow away an existing install and re-install the latest available version.
Note
This install script assumes you have installed a suitable version of Python 3 - has been tested against: