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.js263 linesDownload Raw Back to cjs
1'use strict';2 3// http://www.w3.org/TR/CSS21/grammar.html4// https://github.com/visionmedia/css-parse/pull/49#issuecomment-300880275var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;6 7var NEWLINE_REGEX = /\n/g;8var WHITESPACE_REGEX = /^\s*/;9 10// declaration11var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;12var COLON_REGEX = /^:\s*/;13var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;14var SEMICOLON_REGEX = /^[;\s]*/;15 16// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill17var TRIM_REGEX = /^\s+|\s+$/g;18 19// strings20var NEWLINE = '\n';21var FORWARD_SLASH = '/';22var ASTERISK = '*';23var EMPTY_STRING = '';24 25// types26var TYPE_COMMENT = 'comment';27var TYPE_DECLARATION = 'declaration';28 29/**30 * @param {String} style31 * @param {Object} [options]32 * @return {Object[]}33 * @throws {TypeError}34 * @throws {Error}35 */36function index (style, options) {37  if (typeof style !== 'string') {38    throw new TypeError('First argument must be a string');39  }40 41  if (!style) return [];42 43  options = options || {};44 45  /**46   * Positional.47   */48  var lineno = 1;49  var column = 1;50 51  /**52   * Update lineno and column based on `str`.53   *54   * @param {String} str55   */56  function updatePosition(str) {57    var lines = str.match(NEWLINE_REGEX);58    if (lines) lineno += lines.length;59    var i = str.lastIndexOf(NEWLINE);60    column = ~i ? str.length - i : column + str.length;61  }62 63  /**64   * Mark position and patch `node.position`.65   *66   * @return {Function}67   */68  function position() {69    var start = { line: lineno, column: column };70    return function (node) {71      node.position = new Position(start);72      whitespace();73      return node;74    };75  }76 77  /**78   * Store position information for a node.79   *80   * @constructor81   * @property {Object} start82   * @property {Object} end83   * @property {undefined|String} source84   */85  function Position(start) {86    this.start = start;87    this.end = { line: lineno, column: column };88    this.source = options.source;89  }90 91  /**92   * Non-enumerable source string.93   */94  Position.prototype.content = style;95 96  /**97   * Error `msg`.98   *99   * @param {String} msg100   * @throws {Error}101   */102  function error(msg) {103    var err = new Error(104      options.source + ':' + lineno + ':' + column + ': ' + msg105    );106    err.reason = msg;107    err.filename = options.source;108    err.line = lineno;109    err.column = column;110    err.source = style;111 112    if (options.silent) ; else {113      throw err;114    }115  }116 117  /**118   * Match `re` and return captures.119   *120   * @param {RegExp} re121   * @return {undefined|Array}122   */123  function match(re) {124    var m = re.exec(style);125    if (!m) return;126    var str = m[0];127    updatePosition(str);128    style = style.slice(str.length);129    return m;130  }131 132  /**133   * Parse whitespace.134   */135  function whitespace() {136    match(WHITESPACE_REGEX);137  }138 139  /**140   * Parse comments.141   *142   * @param {Object[]} [rules]143   * @return {Object[]}144   */145  function comments(rules) {146    var c;147    rules = rules || [];148    while ((c = comment())) {149      if (c !== false) {150        rules.push(c);151      }152    }153    return rules;154  }155 156  /**157   * Parse comment.158   *159   * @return {Object}160   * @throws {Error}161   */162  function comment() {163    var pos = position();164    if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;165 166    var i = 2;167    while (168      EMPTY_STRING != style.charAt(i) &&169      (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))170    ) {171      ++i;172    }173    i += 2;174 175    if (EMPTY_STRING === style.charAt(i - 1)) {176      return error('End of comment missing');177    }178 179    var str = style.slice(2, i - 2);180    column += 2;181    updatePosition(str);182    style = style.slice(i);183    column += 2;184 185    return pos({186      type: TYPE_COMMENT,187      comment: str188    });189  }190 191  /**192   * Parse declaration.193   *194   * @return {Object}195   * @throws {Error}196   */197  function declaration() {198    var pos = position();199 200    // prop201    var prop = match(PROPERTY_REGEX);202    if (!prop) return;203    comment();204 205    // :206    if (!match(COLON_REGEX)) return error("property missing ':'");207 208    // val209    var val = match(VALUE_REGEX);210 211    var ret = pos({212      type: TYPE_DECLARATION,213      property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),214      value: val215        ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))216        : EMPTY_STRING217    });218 219    // ;220    match(SEMICOLON_REGEX);221 222    return ret;223  }224 225  /**226   * Parse declarations.227   *228   * @return {Object[]}229   */230  function declarations() {231    var decls = [];232 233    comments(decls);234 235    // declarations236    var decl;237    while ((decl = declaration())) {238      if (decl !== false) {239        decls.push(decl);240        comments(decls);241      }242    }243 244    return decls;245  }246 247  whitespace();248  return declarations();249}250 251/**252 * Trim `str`.253 *254 * @param {String} str255 * @return {String}256 */257function trim(str) {258  return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;259}260 261module.exports = index;262//# sourceMappingURL=index.js.map263