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
scss-tokenize.js336 linesDownload Raw Back to lib
1'use strict'2 3const SINGLE_QUOTE = "'".charCodeAt(0)4const DOUBLE_QUOTE = '"'.charCodeAt(0)5const BACKSLASH = '\\'.charCodeAt(0)6const SLASH = '/'.charCodeAt(0)7const NEWLINE = '\n'.charCodeAt(0)8const SPACE = ' '.charCodeAt(0)9const FEED = '\f'.charCodeAt(0)10const TAB = '\t'.charCodeAt(0)11const CR = '\r'.charCodeAt(0)12const OPEN_SQUARE = '['.charCodeAt(0)13const CLOSE_SQUARE = ']'.charCodeAt(0)14const OPEN_PARENTHESES = '('.charCodeAt(0)15const CLOSE_PARENTHESES = ')'.charCodeAt(0)16const OPEN_CURLY = '{'.charCodeAt(0)17const CLOSE_CURLY = '}'.charCodeAt(0)18const SEMICOLON = ';'.charCodeAt(0)19const ASTERISK = '*'.charCodeAt(0)20const COLON = ':'.charCodeAt(0)21const AT = '@'.charCodeAt(0)22 23// SCSS PATCH {24const COMMA = ','.charCodeAt(0)25const HASH = '#'.charCodeAt(0)26// } SCSS PATCH27 28const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g29const RE_WORD_END = /[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g30const RE_BAD_BRACKET = /.[\r\n"'(/\\]/31const RE_HEX_ESCAPE = /[\da-f]/i32 33const RE_NEW_LINE = /[\n\f\r]/g // SCSS PATCH34 35// SCSS PATCH function name was changed36module.exports = function scssTokenize(input, options = {}) {37  let css = input.css.valueOf()38  let ignore = options.ignoreErrors39 40  let code, next, quote, content, escape41  let escaped, prev, n, currentToken42 43  let length = css.length44  let pos = 045  let buffer = []46  let returned = []47 48  let brackets // SCSS PATCH49 50  function position() {51    return pos52  }53 54  function unclosed(what) {55    throw input.error('Unclosed ' + what, pos)56  }57 58  function endOfFile() {59    return returned.length === 0 && pos >= length60  }61 62  // SCSS PATCH {63  function interpolation() {64    let deep = 165    let stringQuote = false66    let stringEscaped = false67    while (deep > 0) {68      next += 169      if (css.length <= next) unclosed('interpolation')70 71      code = css.charCodeAt(next)72      n = css.charCodeAt(next + 1)73 74      if (stringQuote) {75        if (!stringEscaped && code === stringQuote) {76          stringQuote = false77          stringEscaped = false78        } else if (code === BACKSLASH) {79          stringEscaped = !stringEscaped80        } else if (stringEscaped) {81          stringEscaped = false82        }83      } else if (code === SINGLE_QUOTE || code === DOUBLE_QUOTE) {84        stringQuote = code85      } else if (code === CLOSE_CURLY) {86        deep -= 187      } else if (code === HASH && n === OPEN_CURLY) {88        deep += 189      }90    }91  }92  // } SCSS PATCH93 94  function nextToken(opts) {95    if (returned.length) return returned.pop()96    if (pos >= length) return undefined97 98    let ignoreUnclosed = opts ? opts.ignoreUnclosed : false99 100    code = css.charCodeAt(pos)101 102    switch (code) {103      case NEWLINE:104      case SPACE:105      case TAB:106      case CR:107      case FEED: {108        next = pos109        do {110          next += 1111          code = css.charCodeAt(next)112        } while (113          code === SPACE ||114          code === NEWLINE ||115          code === TAB ||116          code === CR ||117          code === FEED118        )119 120        currentToken = ['space', css.slice(pos, next)]121        pos = next - 1122        break123      }124 125      case OPEN_SQUARE:126      case CLOSE_SQUARE:127      case OPEN_CURLY:128      case CLOSE_CURLY:129      case COLON:130      case SEMICOLON:131      case CLOSE_PARENTHESES: {132        let controlChar = String.fromCharCode(code)133        currentToken = [controlChar, controlChar, pos]134        break135      }136 137      // SCSS PATCH {138      case COMMA: {139        currentToken = ['word', ',', pos, pos + 1]140        break141      }142      // } SCSS PATCH143 144      case OPEN_PARENTHESES: {145        prev = buffer.length ? buffer.pop()[1] : ''146        n = css.charCodeAt(pos + 1)147 148        // SCSS PATCH {149        if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE) {150          brackets = 1151          escaped = false152          next = pos + 1153          while (next <= css.length - 1) {154            n = css.charCodeAt(next)155            if (n === BACKSLASH) {156              escaped = !escaped157            } else if (n === OPEN_PARENTHESES) {158              brackets += 1159            } else if (n === CLOSE_PARENTHESES) {160              brackets -= 1161              if (brackets === 0) break162            }163            next += 1164          }165 166          content = css.slice(pos, next + 1)167          currentToken = ['brackets', content, pos, next]168          pos = next169          // } SCSS PATCH170        } else {171          next = css.indexOf(')', pos + 1)172          content = css.slice(pos, next + 1)173 174          if (next === -1 || RE_BAD_BRACKET.test(content)) {175            currentToken = ['(', '(', pos]176          } else {177            currentToken = ['brackets', content, pos, next]178            pos = next179          }180        }181 182        break183      }184 185      case SINGLE_QUOTE:186      case DOUBLE_QUOTE: {187        // SCSS PATCH {188        quote = code189        next = pos190 191        escaped = false192        while (next < length) {193          next++194          if (next === length) unclosed('string')195 196          code = css.charCodeAt(next)197          n = css.charCodeAt(next + 1)198 199          if (!escaped && code === quote) {200            break201          } else if (code === BACKSLASH) {202            escaped = !escaped203          } else if (escaped) {204            escaped = false205          } else if (code === HASH && n === OPEN_CURLY) {206            interpolation()207          }208        }209        // } SCSS PATCH210 211        currentToken = ['string', css.slice(pos, next + 1), pos, next]212        pos = next213        break214      }215 216      case AT: {217        RE_AT_END.lastIndex = pos + 1218        RE_AT_END.test(css)219        if (RE_AT_END.lastIndex === 0) {220          next = css.length - 1221        } else {222          next = RE_AT_END.lastIndex - 2223        }224 225        currentToken = ['at-word', css.slice(pos, next + 1), pos, next]226 227        pos = next228        break229      }230 231      case BACKSLASH: {232        next = pos233        escape = true234        while (css.charCodeAt(next + 1) === BACKSLASH) {235          next += 1236          escape = !escape237        }238        code = css.charCodeAt(next + 1)239        if (240          escape &&241          code !== SLASH &&242          code !== SPACE &&243          code !== NEWLINE &&244          code !== TAB &&245          code !== CR &&246          code !== FEED247        ) {248          next += 1249          if (RE_HEX_ESCAPE.test(css.charAt(next))) {250            while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {251              next += 1252            }253            if (css.charCodeAt(next + 1) === SPACE) {254              next += 1255            }256          }257        }258 259        currentToken = ['word', css.slice(pos, next + 1), pos, next]260 261        pos = next262        break263      }264 265      default:266        // SCSS PATCH {267        n = css.charCodeAt(pos + 1)268 269        if (code === HASH && n === OPEN_CURLY) {270          next = pos271          interpolation()272          content = css.slice(pos, next + 1)273          currentToken = ['word', content, pos, next]274          pos = next275        } else if (code === SLASH && n === ASTERISK) {276          // } SCSS PATCH277          next = css.indexOf('*/', pos + 2) + 1278          if (next === 0) {279            if (ignore || ignoreUnclosed) {280              next = css.length281            } else {282              unclosed('comment')283            }284          }285 286          currentToken = ['comment', css.slice(pos, next + 1), pos, next]287          pos = next288 289          // SCSS PATCH {290        } else if (code === SLASH && n === SLASH) {291          RE_NEW_LINE.lastIndex = pos + 1292          RE_NEW_LINE.test(css)293          if (RE_NEW_LINE.lastIndex === 0) {294            next = css.length - 1295          } else {296            next = RE_NEW_LINE.lastIndex - 2297          }298 299          content = css.slice(pos, next + 1)300          currentToken = ['comment', content, pos, next, 'inline']301 302          pos = next303          // } SCSS PATCH304        } else {305          RE_WORD_END.lastIndex = pos + 1306          RE_WORD_END.test(css)307          if (RE_WORD_END.lastIndex === 0) {308            next = css.length - 1309          } else {310            next = RE_WORD_END.lastIndex - 2311          }312 313          currentToken = ['word', css.slice(pos, next + 1), pos, next]314          buffer.push(currentToken)315          pos = next316        }317 318        break319    }320 321    pos++322    return currentToken323  }324 325  function back(token) {326    returned.push(token)327  }328 329  return {330    back,331    endOfFile,332    nextToken,333    position334  }335}336 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai