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
index.js88 linesDownload Raw Back to lib
1/**2 * @typedef {import('hast').Element} Element3 * @typedef {import('hast').Properties} Properties4 */5 6/**7 * @template {string} SimpleSelector8 *   Selector type.9 * @template {string} DefaultTagName10 *   Default tag name.11 * @typedef {(12 *   SimpleSelector extends ''13 *     ? DefaultTagName14 *     : SimpleSelector extends `${infer TagName}.${infer Rest}`15 *     ? ExtractTagName<TagName, DefaultTagName>16 *     : SimpleSelector extends `${infer TagName}#${infer Rest}`17 *     ? ExtractTagName<TagName, DefaultTagName>18 *     : SimpleSelector extends string19 *     ? SimpleSelector20 *     : DefaultTagName21 * )} ExtractTagName22 *   Extract tag name from a simple selector.23 */24 25const search = /[#.]/g26 27/**28 * Create a hast element from a simple CSS selector.29 *30 * @template {string} Selector31 *   Type of selector.32 * @template {string} [DefaultTagName='div']33 *   Type of default tag name (default: `'div'`).34 * @param {Selector | null | undefined} [selector]35 *   Simple CSS selector (optional).36 *37 *   Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).38 *   Multiple classes are allowed.39 *   Uses the last ID if multiple IDs are found.40 * @param {DefaultTagName | null | undefined} [defaultTagName='div']41 *   Tag name to use if `selector` does not specify one (default: `'div'`).42 * @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}43 *   Built element.44 */45export function parseSelector(selector, defaultTagName) {46  const value = selector || ''47  /** @type {Properties} */48  const props = {}49  let start = 050  /** @type {string | undefined} */51  let previous52  /** @type {string | undefined} */53  let tagName54 55  while (start < value.length) {56    search.lastIndex = start57    const match = search.exec(value)58    const subvalue = value.slice(start, match ? match.index : value.length)59 60    if (subvalue) {61      if (!previous) {62        tagName = subvalue63      } else if (previous === '#') {64        props.id = subvalue65      } else if (Array.isArray(props.className)) {66        props.className.push(subvalue)67      } else {68        props.className = [subvalue]69      }70 71      start += subvalue.length72    }73 74    if (match) {75      previous = match[0]76      start++77    }78  }79 80  return {81    type: 'element',82    // @ts-expect-error: tag name is parsed.83    tagName: tagName || defaultTagName || 'div',84    properties: props,85    children: []86  }87}88 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai