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.js111 linesDownload Raw Back to workbox-routing
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*/8import { assert } from 'workbox-core/_private/assert.js';9import { logger } from 'workbox-core/_private/logger.js';10import { Route } from './Route.js';11import './_version.js';12/**13 * NavigationRoute makes it easy to create a14 * {@link workbox-routing.Route} that matches for browser15 * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.16 *17 * It will only match incoming Requests whose18 * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode}19 * is set to `navigate`.20 *21 * You can optionally only apply this route to a subset of navigation requests22 * by using one or both of the `denylist` and `allowlist` parameters.23 *24 * @memberof workbox-routing25 * @extends workbox-routing.Route26 */27class NavigationRoute extends Route {28    /**29     * If both `denylist` and `allowlist` are provided, the `denylist` will30     * take precedence and the request will not match this route.31     *32     * The regular expressions in `allowlist` and `denylist`33     * are matched against the concatenated34     * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}35     * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}36     * portions of the requested URL.37     *38     * *Note*: These RegExps may be evaluated against every destination URL during39     * a navigation. Avoid using40     * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),41     * or else your users may see delays when navigating your site.42     *43     * @param {workbox-routing~handlerCallback} handler A callback44     * function that returns a Promise resulting in a Response.45     * @param {Object} options46     * @param {Array<RegExp>} [options.denylist] If any of these patterns match,47     * the route will not handle the request (even if a allowlist RegExp matches).48     * @param {Array<RegExp>} [options.allowlist=[/./]] If any of these patterns49     * match the URL's pathname and search parameter, the route will handle the50     * request (assuming the denylist doesn't match).51     */52    constructor(handler, { allowlist = [/./], denylist = [] } = {}) {53        if (process.env.NODE_ENV !== 'production') {54            assert.isArrayOfClass(allowlist, RegExp, {55                moduleName: 'workbox-routing',56                className: 'NavigationRoute',57                funcName: 'constructor',58                paramName: 'options.allowlist',59            });60            assert.isArrayOfClass(denylist, RegExp, {61                moduleName: 'workbox-routing',62                className: 'NavigationRoute',63                funcName: 'constructor',64                paramName: 'options.denylist',65            });66        }67        super((options) => this._match(options), handler);68        this._allowlist = allowlist;69        this._denylist = denylist;70    }71    /**72     * Routes match handler.73     *74     * @param {Object} options75     * @param {URL} options.url76     * @param {Request} options.request77     * @return {boolean}78     *79     * @private80     */81    _match({ url, request }) {82        if (request && request.mode !== 'navigate') {83            return false;84        }85        const pathnameAndSearch = url.pathname + url.search;86        for (const regExp of this._denylist) {87            if (regExp.test(pathnameAndSearch)) {88                if (process.env.NODE_ENV !== 'production') {89                    logger.log(`The navigation route ${pathnameAndSearch} is not ` +90                        `being used, since the URL matches this denylist pattern: ` +91                        `${regExp.toString()}`);92                }93                return false;94            }95        }96        if (this._allowlist.some((regExp) => regExp.test(pathnameAndSearch))) {97            if (process.env.NODE_ENV !== 'production') {98                logger.debug(`The navigation route ${pathnameAndSearch} ` + `is being used.`);99            }100            return true;101        }102        if (process.env.NODE_ENV !== 'production') {103            logger.log(`The navigation route ${pathnameAndSearch} is not ` +104                `being used, since the URL being navigated to doesn't ` +105                `match the allowlist.`);106        }107        return false;108    }109}110export { NavigationRoute };111 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai