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
0likes3kdownloads
index.js134 linesDownload Raw Back to basic-auth
1/*!2 * basic-auth3 * Copyright(c) 2013 TJ Holowaychuk4 * Copyright(c) 2014 Jonathan Ong5 * Copyright(c) 2015-2016 Douglas Christopher Wilson6 * MIT Licensed7 */8 9'use strict'10 11/**12 * Module dependencies.13 * @private14 */15 16var Buffer = require('safe-buffer').Buffer17 18/**19 * Module exports.20 * @public21 */22 23module.exports = auth24module.exports.parse = parse25 26/**27 * RegExp for basic auth credentials28 *29 * credentials = auth-scheme 1*SP token6830 * auth-scheme = "Basic" ; case insensitive31 * token68     = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="32 * @private33 */34 35var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/36 37/**38 * RegExp for basic auth user/pass39 *40 * user-pass   = userid ":" password41 * userid      = *<TEXT excluding ":">42 * password    = *TEXT43 * @private44 */45 46var USER_PASS_REGEXP = /^([^:]*):(.*)$/47 48/**49 * Parse the Authorization header field of a request.50 *51 * @param {object} req52 * @return {object} with .name and .pass53 * @public54 */55 56function auth (req) {57  if (!req) {58    throw new TypeError('argument req is required')59  }60 61  if (typeof req !== 'object') {62    throw new TypeError('argument req is required to be an object')63  }64 65  // get header66  var header = getAuthorization(req)67 68  // parse header69  return parse(header)70}71 72/**73 * Decode base64 string.74 * @private75 */76 77function decodeBase64 (str) {78  return Buffer.from(str, 'base64').toString()79}80 81/**82 * Get the Authorization header from request object.83 * @private84 */85 86function getAuthorization (req) {87  if (!req.headers || typeof req.headers !== 'object') {88    throw new TypeError('argument req is required to have headers property')89  }90 91  return req.headers.authorization92}93 94/**95 * Parse basic auth to object.96 *97 * @param {string} string98 * @return {object}99 * @public100 */101 102function parse (string) {103  if (typeof string !== 'string') {104    return undefined105  }106 107  // parse header108  var match = CREDENTIALS_REGEXP.exec(string)109 110  if (!match) {111    return undefined112  }113 114  // decode user pass115  var userPass = USER_PASS_REGEXP.exec(decodeBase64(match[1]))116 117  if (!userPass) {118    return undefined119  }120 121  // return credentials object122  return new Credentials(userPass[1], userPass[2])123}124 125/**126 * Object to represent user credentials.127 * @private128 */129 130function Credentials (name, pass) {131  this.name = name132  this.pass = pass133}134 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai