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
WorkboxEventTarget.ts78 linesDownload Raw Back to utils
1/*2  Copyright 2019 Google LLC3 4  Use of this source code is governed by an MIT-style5  license that can be found in the LICENSE file or at6  https://opensource.org/licenses/MIT.7*/8 9import {WorkboxEvent, WorkboxEventMap} from './WorkboxEvent.js';10 11export type ListenerCallback = (event: WorkboxEvent<any>) => any;12 13/**14 * A minimal `EventTarget` shim.15 * This is necessary because not all browsers support constructable16 * `EventTarget`, so using a real `EventTarget` will error.17 * @private18 */19export class WorkboxEventTarget {20  private readonly _eventListenerRegistry: Map<21    keyof WorkboxEventMap,22    Set<ListenerCallback>23  > = new Map();24 25  /**26   * @param {string} type27   * @param {Function} listener28   * @private29   */30  addEventListener<K extends keyof WorkboxEventMap>(31    type: K,32    listener: (event: WorkboxEventMap[K]) => any,33  ): void {34    const foo = this._getEventListenersByType(type);35    foo.add(listener as ListenerCallback);36  }37 38  /**39   * @param {string} type40   * @param {Function} listener41   * @private42   */43  removeEventListener<K extends keyof WorkboxEventMap>(44    type: K,45    listener: (event: WorkboxEventMap[K]) => any,46  ): void {47    this._getEventListenersByType(type).delete(listener as ListenerCallback);48  }49 50  /**51   * @param {Object} event52   * @private53   */54  dispatchEvent(event: WorkboxEvent<any>): void {55    event.target = this;56 57    const listeners = this._getEventListenersByType(event.type);58    for (const listener of listeners) {59      listener(event);60    }61  }62 63  /**64   * Returns a Set of listeners associated with the passed event type.65   * If no handlers have been registered, an empty Set is returned.66   *67   * @param {string} type The event type.68   * @return {Set<ListenerCallback>} An array of handler functions.69   * @private70   */71  private _getEventListenersByType(type: keyof WorkboxEventMap) {72    if (!this._eventListenerRegistry.has(type)) {73      this._eventListenerRegistry.set(type, new Set());74    }75    return this._eventListenerRegistry.get(type)!;76  }77}78 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai