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.
03.1k
1"use strict";2var __create = Object.create;3var __defProp = Object.defineProperty;4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;5var __getOwnPropNames = Object.getOwnPropertyNames;6var __getProtoOf = Object.getPrototypeOf;7var __hasOwnProp = Object.prototype.hasOwnProperty;8var __export = (target, all) => {9 for (var name in all)10 __defProp(target, name, { get: all[name], enumerable: true });11};12var __copyProps = (to, from, except, desc) => {13 if (from && typeof from === "object" || typeof from === "function") {14 for (let key of __getOwnPropNames(from))15 if (!__hasOwnProp.call(to, key) && key !== except)16 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });17 }18 return to;19};20var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(21 // If the importer is in node compatibility mode or this is not an ESM22 // file that has been converted to a CommonJS file using a Babel-23 // compatible transform (i.e. "__esModule" has not been set), then set24 // "default" to the CommonJS "module.exports" for node compatibility.25 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,26 mod27));28var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);29var clock_exports = {};30__export(clock_exports, {31 Clock: () => Clock32});33module.exports = __toCommonJS(clock_exports);34var rawClockSource = __toESM(require("../generated/clockSource"));35class Clock {36 constructor(browserContext) {37 this._initScripts = [];38 this._browserContext = browserContext;39 }40 async uninstall(progress) {41 await progress.race(this._browserContext.removeInitScripts(this._initScripts));42 this._initScripts = [];43 }44 async fastForward(progress, ticks) {45 await this._installIfNeeded(progress);46 const ticksMillis = parseTicks(ticks);47 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('fastForward', ${Date.now()}, ${ticksMillis})`));48 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.fastForward(${ticksMillis})`));49 }50 async install(progress, time) {51 await this._installIfNeeded(progress);52 const timeMillis = time !== void 0 ? parseTime(time) : Date.now();53 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('install', ${Date.now()}, ${timeMillis})`));54 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.install(${timeMillis})`));55 }56 async pauseAt(progress, ticks) {57 await this._installIfNeeded(progress);58 const timeMillis = parseTime(ticks);59 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('pauseAt', ${Date.now()}, ${timeMillis})`));60 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.pauseAt(${timeMillis})`));61 }62 resumeNoReply() {63 if (!this._initScripts.length)64 return;65 const doResume = async () => {66 this._initScripts.push(await this._browserContext.addInitScript(void 0, `globalThis.__pwClock.controller.log('resume', ${Date.now()})`));67 await this._evaluateInFrames(`globalThis.__pwClock.controller.resume()`);68 };69 doResume().catch(() => {70 });71 }72 async resume(progress) {73 await this._installIfNeeded(progress);74 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('resume', ${Date.now()})`));75 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.resume()`));76 }77 async setFixedTime(progress, time) {78 await this._installIfNeeded(progress);79 const timeMillis = parseTime(time);80 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('setFixedTime', ${Date.now()}, ${timeMillis})`));81 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.setFixedTime(${timeMillis})`));82 }83 async setSystemTime(progress, time) {84 await this._installIfNeeded(progress);85 const timeMillis = parseTime(time);86 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('setSystemTime', ${Date.now()}, ${timeMillis})`));87 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.setSystemTime(${timeMillis})`));88 }89 async runFor(progress, ticks) {90 await this._installIfNeeded(progress);91 const ticksMillis = parseTicks(ticks);92 this._initScripts.push(await this._browserContext.addInitScript(progress, `globalThis.__pwClock.controller.log('runFor', ${Date.now()}, ${ticksMillis})`));93 await progress.race(this._evaluateInFrames(`globalThis.__pwClock.controller.runFor(${ticksMillis})`));94 }95 async _installIfNeeded(progress) {96 if (this._initScripts.length)97 return;98 const script = `(() => {99 const module = {};100 ${rawClockSource.source}101 if (!globalThis.__pwClock)102 globalThis.__pwClock = (module.exports.inject())(globalThis);103 })();`;104 const initScript = await this._browserContext.addInitScript(progress, script);105 await progress.race(this._evaluateInFrames(script));106 this._initScripts.push(initScript);107 }108 async _evaluateInFrames(script) {109 await this._browserContext.safeNonStallingEvaluateInAllFrames(script, "main", { throwOnJSErrors: true });110 }111}112function parseTicks(value) {113 if (typeof value === "number")114 return value;115 if (!value)116 return 0;117 const str = value;118 const strings = str.split(":");119 const l = strings.length;120 let i = l;121 let ms = 0;122 let parsed;123 if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {124 throw new Error(125 `Clock only understands numbers, 'mm:ss' and 'hh:mm:ss'`126 );127 }128 while (i--) {129 parsed = parseInt(strings[i], 10);130 if (parsed >= 60)131 throw new Error(`Invalid time ${str}`);132 ms += parsed * Math.pow(60, l - i - 1);133 }134 return ms * 1e3;135}136function parseTime(epoch) {137 if (!epoch)138 return 0;139 if (typeof epoch === "number")140 return epoch;141 const parsed = new Date(epoch);142 if (!isFinite(parsed.getTime()))143 throw new Error(`Invalid date: ${epoch}`);144 return parsed.getTime();145}146// Annotate the CommonJS export names for ESM import in node:1470 && (module.exports = {148 Clock149});150 