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
readme.md227 linesDownload Raw Back to zwitch
1# zwitch2 3[![Build][build-badge]][build]4[![Coverage][coverage-badge]][coverage]5[![Downloads][downloads-badge]][downloads]6[![Size][size-badge]][size]7 8Handle values based on a field.9 10## Contents11 12*   [What is this?](#what-is-this)13*   [When should I use this?](#when-should-i-use-this)14*   [Install](#install)15*   [Use](#use)16*   [API](#api)17    *   [`zwitch(key[, options])`](#zwitchkey-options)18    *   [`one(value[, rest…])`](#onevalue-rest)19    *   [`function handler(value[, rest…])`](#function-handlervalue-rest)20*   [Types](#types)21*   [Compatibility](#compatibility)22*   [Related](#related)23*   [Contribute](#contribute)24*   [Security](#security)25*   [License](#license)26 27## What is this?28 29This is a tiny package that lets you `switch` between some field on objects.30 31## When should I use this?32 33This package is very useful when mapping one AST to another.34It’s a lot like a `switch` statement on one field, but it’s extensible.35 36## Install37 38This package is [ESM only][esm].39In Node.js (version 14.14+, 16.0+), install with [npm][]:40 41```sh42npm install zwitch43```44 45In Deno with [`esm.sh`][esmsh]:46 47```js48import {zwitch} from 'https://esm.sh/zwitch@2'49```50 51In browsers with [`esm.sh`][esmsh]:52 53```html54<script type="module">55  import {zwitch} from 'https://esm.sh/zwitch@2?bundle'56</script>57```58 59## Use60 61```js62import {zwitch} from 'zwitch'63 64const handle = zwitch('type', {invalid, unknown, handlers: {alpha: handleAlpha}})65 66handle({type: 'alpha'})67 68function handleAlpha() { /* … */ }69```70 71Or, with a `switch` statement:72 73```js74const field = 'type'75 76function handle(value) {77  let fn = invalid78 79  if (value && typeof value === 'object' && field in value) {80    switch (value[field]) {81      case 'alpha':82        fn = handleAlpha83        break84      default:85        fn = unknown86        break87    }88  }89 90  return fn.apply(this, arguments)91}92 93handle({type: 'alpha'})94 95function handleAlpha() { /* … */ }96function unknown() { /* … */ }97function invalid() { /* … */ }98```99 100## API101 102This package exports the identifier `zwitch`.103There is no default export.104 105### `zwitch(key[, options])`106 107Create a switch, based on a `key` (`string`).108 109##### `options`110 111Options can be omitted and added later to `one`.112 113###### `options.handlers`114 115Handlers to use, stored on `one.handlers` (`Record<string, Function>`,116optional).117 118###### `options.unknown`119 120Handler to use for unknown values, stored on `one.unknown` (`Function`,121optional).122 123###### `options.invalid`124 125Handler to use for invalid values, stored on `one.invalid` (`Function`,126optional).127 128###### Returns129 130See [`one`][one] (`Function`).131 132### `one(value[, rest…])`133 134Handle one value.135Based on the bound `key`, a respective handler will be called.136If `value` is not an object, or doesn’t have a `key` property, the special137“invalid” handler will be called.138If `value` has an unknown `key`, the special “unknown” handler will be called.139 140All arguments, and the context object (`this`), are passed through to the141[handler][], and it’s result is returned.142 143###### `one.handlers`144 145Map of [handler][]s (`Record<string, Function>`).146 147###### `one.invalid`148 149Special [`handler`][handler] called if a value doesn’t have a `key` property.150If not set, `undefined` is returned for invalid values.151 152###### `one.unknown`153 154Special [`handler`][handler] called if a value does not have a matching155handler.156If not set, `undefined` is returned for unknown values.157 158### `function handler(value[, rest…])`159 160Handle one value.161 162## Types163 164This package is fully typed with [TypeScript][].165It exports the types `Handler`, `UnknownHandler`, `InvalidHandler`, and166`Options`.167 168## Compatibility169 170This package is at least compatible with all maintained versions of Node.js.171As of now, that is Node.js 14.14+ and 16.0+.172It also works in Deno and modern browsers.173 174## Related175 176*   [`mapz`](https://github.com/wooorm/mapz)177    — functional map178 179## Contribute180 181Yes please!182See [How to Contribute to Open Source][contribute].183 184## Security185 186This package is safe.187 188## License189 190[MIT][license] © [Titus Wormer][author]191 192<!-- Definitions -->193 194[build-badge]: https://github.com/wooorm/zwitch/workflows/main/badge.svg195 196[build]: https://github.com/wooorm/zwitch/actions197 198[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/zwitch.svg199 200[coverage]: https://codecov.io/github/wooorm/zwitch201 202[downloads-badge]: https://img.shields.io/npm/dm/zwitch.svg203 204[downloads]: https://www.npmjs.com/package/zwitch205 206[size-badge]: https://img.shields.io/bundlephobia/minzip/zwitch.svg207 208[size]: https://bundlephobia.com/result?p=zwitch209 210[npm]: https://docs.npmjs.com/cli/install211 212[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c213 214[esmsh]: https://esm.sh215 216[typescript]: https://www.typescriptlang.org217 218[contribute]: https://opensource.guide/how-to-contribute/219 220[license]: license221 222[author]: https://wooorm.com223 224[one]: #onevalue-rest225 226[handler]: #function-handlervalue-rest227 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai