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
NavigationRoute.ts144 linesDownload Raw Back to src
1/*2  Copyright 2018 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 {assert} from 'workbox-core/_private/assert.js';10import {logger} from 'workbox-core/_private/logger.js';11import {RouteHandler, RouteMatchCallbackOptions} from 'workbox-core/types.js';12 13import {Route} from './Route.js';14 15import './_version.js';16 17export interface NavigationRouteMatchOptions {18  allowlist?: RegExp[];19  denylist?: RegExp[];20}21 22/**23 * NavigationRoute makes it easy to create a24 * {@link workbox-routing.Route} that matches for browser25 * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.26 *27 * It will only match incoming Requests whose28 * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode}29 * is set to `navigate`.30 *31 * You can optionally only apply this route to a subset of navigation requests32 * by using one or both of the `denylist` and `allowlist` parameters.33 *34 * @memberof workbox-routing35 * @extends workbox-routing.Route36 */37class NavigationRoute extends Route {38  private readonly _allowlist: RegExp[];39  private readonly _denylist: RegExp[];40 41  /**42   * If both `denylist` and `allowlist` are provided, the `denylist` will43   * take precedence and the request will not match this route.44   *45   * The regular expressions in `allowlist` and `denylist`46   * are matched against the concatenated47   * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}48   * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}49   * portions of the requested URL.50   *51   * *Note*: These RegExps may be evaluated against every destination URL during52   * a navigation. Avoid using53   * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),54   * or else your users may see delays when navigating your site.55   *56   * @param {workbox-routing~handlerCallback} handler A callback57   * function that returns a Promise resulting in a Response.58   * @param {Object} options59   * @param {Array<RegExp>} [options.denylist] If any of these patterns match,60   * the route will not handle the request (even if a allowlist RegExp matches).61   * @param {Array<RegExp>} [options.allowlist=[/./]] If any of these patterns62   * match the URL's pathname and search parameter, the route will handle the63   * request (assuming the denylist doesn't match).64   */65  constructor(66    handler: RouteHandler,67    {allowlist = [/./], denylist = []}: NavigationRouteMatchOptions = {},68  ) {69    if (process.env.NODE_ENV !== 'production') {70      assert!.isArrayOfClass(allowlist, RegExp, {71        moduleName: 'workbox-routing',72        className: 'NavigationRoute',73        funcName: 'constructor',74        paramName: 'options.allowlist',75      });76      assert!.isArrayOfClass(denylist, RegExp, {77        moduleName: 'workbox-routing',78        className: 'NavigationRoute',79        funcName: 'constructor',80        paramName: 'options.denylist',81      });82    }83 84    super(85      (options: RouteMatchCallbackOptions) => this._match(options),86      handler,87    );88 89    this._allowlist = allowlist;90    this._denylist = denylist;91  }92 93  /**94   * Routes match handler.95   *96   * @param {Object} options97   * @param {URL} options.url98   * @param {Request} options.request99   * @return {boolean}100   *101   * @private102   */103  private _match({url, request}: RouteMatchCallbackOptions): boolean {104    if (request && request.mode !== 'navigate') {105      return false;106    }107 108    const pathnameAndSearch = url.pathname + url.search;109 110    for (const regExp of this._denylist) {111      if (regExp.test(pathnameAndSearch)) {112        if (process.env.NODE_ENV !== 'production') {113          logger.log(114            `The navigation route ${pathnameAndSearch} is not ` +115              `being used, since the URL matches this denylist pattern: ` +116              `${regExp.toString()}`,117          );118        }119        return false;120      }121    }122 123    if (this._allowlist.some((regExp) => regExp.test(pathnameAndSearch))) {124      if (process.env.NODE_ENV !== 'production') {125        logger.debug(126          `The navigation route ${pathnameAndSearch} ` + `is being used.`,127        );128      }129      return true;130    }131 132    if (process.env.NODE_ENV !== 'production') {133      logger.log(134        `The navigation route ${pathnameAndSearch} is not ` +135          `being used, since the URL being navigated to doesn't ` +136          `match the allowlist.`,137      );138    }139    return false;140  }141}142 143export {NavigationRoute};144 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai