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
{"type":"object","required":["environments","modules"],"properties":{"environments":{"type":"object","description":"List of environments that will be deployed to by any module or pipeline in the project. Include any smoke environments.","patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"object","required":["name","awsAccount"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"awsAccount":{"type":"string","description":"The account alias of the AWS account."}}}},"required":[]},"modules":{"type":"object","patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"object","required":["name","path","pipelines"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"description":{"type":"string","nullable":true},"repo":{"type":"string","description":"The repo where source files are found in format: GithubOrg/RepoName. Defaults to the stack's primary repo.","nullable":true},"path":{"type":"string","description":"The path within the repo |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.stream.Collectors; | |
/** | |
* Examples of some best practices |
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
// Returns the value at a given percentile in a sorted numeric array. | |
// "Linear interpolation between closest ranks" method | |
function percentile(arr, p) { | |
if (arr.length === 0) return 0; | |
if (typeof p !== 'number') throw new TypeError('p must be a number'); | |
arr.concat().sort((a,b) => a-b); | |
if (p <= 0) return arr[0]; | |
if (p >= 1) return arr[arr.length - 1]; | |
var index = (arr.length - 1) * p, |