Spaces:
Runtime error
Runtime error
Download src/lib/utils/array.ts from FallnAI/LLM-Inference: direct link, hf CLI and curl.
- Browser
- Download file 195 Bytes
-
https://huggingface.co/spaces/FallnAI/LLM-Inference/resolve/0ff4ef88e52ae018ce84a5c4cc1cd2d14ff35135/src/lib/utils/array.ts
- Command line
-
hf download hf://spaces/FallnAI/LLM-Inference@0ff4ef88e52ae018ce84a5c4cc1cd2d14ff35135/src/lib/utils/array.ts
-
curl -L -o array.ts https://huggingface.co/spaces/FallnAI/LLM-Inference/resolve/0ff4ef88e52ae018ce84a5c4cc1cd2d14ff35135/src/lib/utils/array.ts
195 Bytes
| export function last<T>(arr: T[]): T | undefined { | |
| return arr[arr.length - 1]; | |
| } | |
| export function randomPick<T>(arr: T[]): T | undefined { | |
| return arr[Math.floor(Math.random() * arr.length)]; | |
| } | |