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
README.md114 linesDownload Raw Back to basic-auth
1# basic-auth2 3[![NPM Version][npm-image]][npm-url]4[![NPM Downloads][downloads-image]][downloads-url]5[![Node.js Version][node-version-image]][node-version-url]6[![Build Status][travis-image]][travis-url]7[![Test Coverage][coveralls-image]][coveralls-url]8 9Generic basic auth Authorization header field parser for whatever.10 11## Installation12 13This is a [Node.js](https://nodejs.org/en/) module available through the14[npm registry](https://www.npmjs.com/). Installation is done using the15[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):16 17```18$ npm install basic-auth19```20 21## API22 23<!-- eslint-disable no-unused-vars -->24 25```js26var auth = require('basic-auth')27```28 29### auth(req)30 31Get the basic auth credentials from the given request. The `Authorization`32header is parsed and if the header is invalid, `undefined` is returned,33otherwise an object with `name` and `pass` properties.34 35### auth.parse(string)36 37Parse a basic auth authorization header string. This will return an object38with `name` and `pass` properties, or `undefined` if the string is invalid.39 40## Example41 42Pass a Node.js request object to the module export. If parsing fails43`undefined` is returned, otherwise an object with `.name` and `.pass`.44 45<!-- eslint-disable no-unused-vars, no-undef -->46 47```js48var auth = require('basic-auth')49var user = auth(req)50// => { name: 'something', pass: 'whatever' }51```52 53A header string from any other location can also be parsed with54`auth.parse`, for example a `Proxy-Authorization` header:55 56<!-- eslint-disable no-unused-vars, no-undef -->57 58```js59var auth = require('basic-auth')60var user = auth.parse(req.getHeader('Proxy-Authorization'))61```62 63### With vanilla node.js http server64 65```js66var http = require('http')67var auth = require('basic-auth')68var compare = require('tsscmp')69 70// Create server71var server = http.createServer(function (req, res) {72  var credentials = auth(req)73 74  // Check credentials75  // The "check" function will typically be against your user store76  if (!credentials || !check(credentials.name, credentials.pass)) {77    res.statusCode = 40178    res.setHeader('WWW-Authenticate', 'Basic realm="example"')79    res.end('Access denied')80  } else {81    res.end('Access granted')82  }83})84 85// Basic function to validate credentials for example86function check (name, pass) {87  var valid = true88 89  // Simple method to prevent short-circut and use timing-safe compare90  valid = compare(name, 'john') && valid91  valid = compare(pass, 'secret') && valid92 93  return valid94}95 96// Listen97server.listen(3000)98```99 100# License101 102[MIT](LICENSE)103 104[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/basic-auth/master105[coveralls-url]: https://coveralls.io/r/jshttp/basic-auth?branch=master106[downloads-image]: https://badgen.net/npm/dm/basic-auth107[downloads-url]: https://npmjs.org/package/basic-auth108[node-version-image]: https://badgen.net/npm/node/basic-auth109[node-version-url]: https://nodejs.org/en/download110[npm-image]: https://badgen.net/npm/v/basic-auth111[npm-url]: https://npmjs.org/package/basic-auth112[travis-image]: https://badgen.net/travis/jshttp/basic-auth/master113[travis-url]: https://travis-ci.org/jshttp/basic-auth114 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai