Swpick.pcts: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/swpick.bend as Swpick Lines 225-229 of cswap-bend-cli@0.1.0.0/swpick.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&start_line=225&end_line=229 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq # The percentages `relevant_windows` looks at: 5h, 7d and, with models, the # scoped windows named by them (or all of them for "all"). def pcts(+row: Json.Json, +models: List<&2, String>) -> List<&2, U32>: push_pct(window_pct(row, "five_hour"), push_pct(window_pct(row, "seven_day"), sel_l(List.is_empty(&2, String, models), [], scoped_pcts(SSeq.unwrap_arr(SSeq.get_or("scoped", row, Json.JNull{})), lower_all(models))))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/seq.bend&name=get_or https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/seq.bend&name=unwrap_arr https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&name=lower_all https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&name=push_pct https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&name=scoped_pcts https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&name=sel_l https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&name=window_pct