Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
index.ts70 linesDownload Raw Back to src
1import { Point, pointsOnBezierCurves, simplify } from 'points-on-curve';2import { parsePath, absolutize, normalize } from 'path-data-parser';3 4export { Point } from 'points-on-curve';5 6export function pointsOnPath(path: string, tolerance?: number, distance?: number): Point[][] {7  const segments = parsePath(path);8  const normalized = normalize(absolutize(segments));9 10  const sets: Point[][] = [];11  let currentPoints: Point[] = [];12  let start: Point = [0, 0];13  let pendingCurve: Point[] = [];14 15  const appendPendingCurve = () => {16    if (pendingCurve.length >= 4) {17      currentPoints.push(...pointsOnBezierCurves(pendingCurve, tolerance));18    }19    pendingCurve = [];20  };21 22  const appendPendingPoints = () => {23    appendPendingCurve();24    if (currentPoints.length) {25      sets.push(currentPoints);26      currentPoints = [];27    }28  };29 30  for (const { key, data } of normalized) {31    switch (key) {32      case 'M':33        appendPendingPoints();34        start = [data[0], data[1]];35        currentPoints.push(start);36        break;37      case 'L':38        appendPendingCurve();39        currentPoints.push([data[0], data[1]]);40        break;41      case 'C':42        if (!pendingCurve.length) {43          const lastPoint = currentPoints.length ? currentPoints[currentPoints.length - 1] : start;44          pendingCurve.push([lastPoint[0], lastPoint[1]]);45        }46        pendingCurve.push([data[0], data[1]]);47        pendingCurve.push([data[2], data[3]]);48        pendingCurve.push([data[4], data[5]]);49        break;50      case 'Z':51        appendPendingCurve();52        currentPoints.push([start[0], start[1]]);53        break;54    }55  }56  appendPendingPoints();57 58  if (!distance) {59    return sets;60  }61 62  const out: Point[][] = [];63  for (const set of sets) {64    const simplifiedSet = simplify(set, distance);65    if (simplifiedSet.length) {66      out.push(simplifiedSet);67    }68  }69  return out;70}
Brunobkr/llama.cpp_AlgMor24_github · Team Ai