Skip to content

Instantly share code, notes, and snippets.

View PopeFelix's full-sized avatar

Aurelia Peters PopeFelix

View GitHub Profile
@PopeFelix
PopeFelix / list-lambdas-by-tag.ts
Created July 19, 2022 22:40
List AWS Lambdas by tag
import Log from "@dazn/lambda-powertools-logger"
import {
LambdaClient,
ListFunctionsCommand,
ListFunctionsCommandOutput,
ListTagsCommand,
} from "@aws-sdk/client-lambda"
const lambda = new LambdaClient({})
@PopeFelix
PopeFelix / range_exercise.rs
Created August 30, 2024 22:30
Build ranges of numbers in Rust
/// Takes a vector of closed intervals of the form [start, end], merges any invervals in which one interval
/// overlaps with another (i.e. at least one of the endpoints of one interval is contained within a second
/// interval), and returns a list of the merged intervals.
fn main() {
// sort ranges numerically
// Define a vector of ranges
let ranges = vec![[15, 18], [2, 6], [8, 10], [1, 3]];
// let ranges = vec![[1, 5], [2, 3], [4, 8], [9, 10], [9, 12]];