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
svg.js117 linesDownload Raw Back to bin
1import { SVGNS } from './core';2import { RoughGenerator } from './generator';3export class RoughSVG {4    constructor(svg, config) {5        this.svg = svg;6        this.gen = new RoughGenerator(config);7    }8    draw(drawable) {9        const sets = drawable.sets || [];10        const o = drawable.options || this.getDefaultOptions();11        const doc = this.svg.ownerDocument || window.document;12        const g = doc.createElementNS(SVGNS, 'g');13        const precision = drawable.options.fixedDecimalPlaceDigits;14        for (const drawing of sets) {15            let path = null;16            switch (drawing.type) {17                case 'path': {18                    path = doc.createElementNS(SVGNS, 'path');19                    path.setAttribute('d', this.opsToPath(drawing, precision));20                    path.setAttribute('stroke', o.stroke);21                    path.setAttribute('stroke-width', o.strokeWidth + '');22                    path.setAttribute('fill', 'none');23                    if (o.strokeLineDash) {24                        path.setAttribute('stroke-dasharray', o.strokeLineDash.join(' ').trim());25                    }26                    if (o.strokeLineDashOffset) {27                        path.setAttribute('stroke-dashoffset', `${o.strokeLineDashOffset}`);28                    }29                    break;30                }31                case 'fillPath': {32                    path = doc.createElementNS(SVGNS, 'path');33                    path.setAttribute('d', this.opsToPath(drawing, precision));34                    path.setAttribute('stroke', 'none');35                    path.setAttribute('stroke-width', '0');36                    path.setAttribute('fill', o.fill || '');37                    if (drawable.shape === 'curve' || drawable.shape === 'polygon') {38                        path.setAttribute('fill-rule', 'evenodd');39                    }40                    break;41                }42                case 'fillSketch': {43                    path = this.fillSketch(doc, drawing, o);44                    break;45                }46            }47            if (path) {48                g.appendChild(path);49            }50        }51        return g;52    }53    fillSketch(doc, drawing, o) {54        let fweight = o.fillWeight;55        if (fweight < 0) {56            fweight = o.strokeWidth / 2;57        }58        const path = doc.createElementNS(SVGNS, 'path');59        path.setAttribute('d', this.opsToPath(drawing, o.fixedDecimalPlaceDigits));60        path.setAttribute('stroke', o.fill || '');61        path.setAttribute('stroke-width', fweight + '');62        path.setAttribute('fill', 'none');63        if (o.fillLineDash) {64            path.setAttribute('stroke-dasharray', o.fillLineDash.join(' ').trim());65        }66        if (o.fillLineDashOffset) {67            path.setAttribute('stroke-dashoffset', `${o.fillLineDashOffset}`);68        }69        return path;70    }71    get generator() {72        return this.gen;73    }74    getDefaultOptions() {75        return this.gen.defaultOptions;76    }77    opsToPath(drawing, fixedDecimalPlaceDigits) {78        return this.gen.opsToPath(drawing, fixedDecimalPlaceDigits);79    }80    line(x1, y1, x2, y2, options) {81        const d = this.gen.line(x1, y1, x2, y2, options);82        return this.draw(d);83    }84    rectangle(x, y, width, height, options) {85        const d = this.gen.rectangle(x, y, width, height, options);86        return this.draw(d);87    }88    ellipse(x, y, width, height, options) {89        const d = this.gen.ellipse(x, y, width, height, options);90        return this.draw(d);91    }92    circle(x, y, diameter, options) {93        const d = this.gen.circle(x, y, diameter, options);94        return this.draw(d);95    }96    linearPath(points, options) {97        const d = this.gen.linearPath(points, options);98        return this.draw(d);99    }100    polygon(points, options) {101        const d = this.gen.polygon(points, options);102        return this.draw(d);103    }104    arc(x, y, width, height, start, stop, closed = false, options) {105        const d = this.gen.arc(x, y, width, height, start, stop, closed, options);106        return this.draw(d);107    }108    curve(points, options) {109        const d = this.gen.curve(points, options);110        return this.draw(d);111    }112    path(d, options) {113        const drawing = this.gen.path(d, options);114        return this.draw(drawing);115    }116}117 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai