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.md522 linesDownload Raw Back to highlight.js
1# Highlight.js2 3[![latest version](https://badgen.net/npm/v/highlight.js?label=latest)](https://www.npmjs.com/package/highlight.js)4[![license](https://badgen.net/github/license/highlightjs/highlight.js?color=cyan)](https://github.com/highlightjs/highlight.js/blob/main/LICENSE)5[![install size](https://badgen.net/packagephobia/install/highlight.js?label=npm+install)](https://packagephobia.now.sh/result?p=highlight.js)6![minified](https://img.shields.io/github/size/highlightjs/cdn-release/build/highlight.min.js?label=minified)7[![NPM downloads weekly](https://badgen.net/npm/dw/highlight.js?label=npm+downloads&color=purple)](https://www.npmjs.com/package/highlight.js)8[![jsDelivr CDN downloads](https://badgen.net/jsdelivr/hits/gh/highlightjs/cdn-release?label=jsDelivr+CDN&color=purple)](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release)9 10[![ci status](https://badgen.net/github/checks/highlightjs/highlight.js/main?label=build)](https://github.com/highlightjs/highlight.js/actions/workflows/tests.js.yml)11[![CodeQL](https://github.com/highlightjs/highlight.js/workflows/CodeQL/badge.svg)](https://github.com/highlightjs/highlight.js/actions/workflows/github-code-scanning/codeql)12[![vulnerabilities](https://badgen.net/snyk/highlightjs/highlight.js)](https://snyk.io/test/github/highlightjs/highlight.js?targetFile=package.json)13 14[![discord](https://badgen.net/badge/icon/discord?icon=discord&label&color=pink)](https://discord.gg/M24EbU7ja9)15[![open issues](https://badgen.net/github/open-issues/highlightjs/highlight.js?label=issues)](https://github.com/highlightjs/highlight.js/issues)16[![help welcome issues](https://badgen.net/github/label-issues/highlightjs/highlight.js/help%20welcome/open)](https://github.com/highlightjs/highlight.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+welcome%22)17[![good first issue](https://badgen.net/github/label-issues/highlightjs/highlight.js/good%20first%20issue/open)](https://github.com/highlightjs/highlight.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)18 19<!-- [![Build CI](https://img.shields.io/github/workflow/status/highlightjs/highlight.js/Node.js%20CI)](https://github.com/highlightjs/highlight.js/actions?query=workflow%3A%22Node.js+CI%22) -->20<!-- [![commits since release](https://img.shields.io/github/commits-since/highlightjs/highlight.js/latest?label=commits+since)](https://github.com/highlightjs/highlight.js/commits/main) -->21<!-- [![](https://data.jsdelivr.com/v1/package/gh/highlightjs/cdn-release/badge?style=rounded)](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release) -->22<!-- [![Total Lines](https://img.shields.io/tokei/lines/github/highlightjs/highlight.js)]() -->23<!-- [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/highlight.js.svg)](https://bundlephobia.com/result?p=highlight.js) -->24 25 26Highlight.js is a syntax highlighter written in JavaScript. It works in27the browser as well as on the server. It can work with pretty much any28markup, doesn’t depend on any other frameworks, and has automatic language29detection.30 31**Contents**32 33- [Basic Usage](#basic-usage)34  - [In the Browser](#in-the-browser)35    - [Plaintext Code Blocks](#plaintext-code-blocks)36    - [Ignoring a Code Block](#ignoring-a-code-block)37  - [Node.js on the Server](#nodejs-on-the-server)38- [Supported Languages](#supported-languages)39- [Custom Usage](#custom-usage)40  - [Using custom HTML](#using-custom-html)41  - [Using with Vue.js](#using-with-vuejs)42  - [Using Web Workers](#using-web-workers)43- [Importing the Library](#importing-the-library)44  - [Node.js CommonJS Modules / `require`](#nodejs-commonjs-modules--require)45  - [Node.js ES6 Modules / `import`](#nodejs-es6-modules--import)46  - [Browser ES6 Modules](#browser-es6-modules)47- [Getting the Library](#getting-the-library)48  - [Fetch via CDN](#fetch-via-cdn)49    - [cdnjs (link)](#cdnjs-link)50    - [jsdelivr (link)](#jsdelivr-link)51    - [unpkg (link)](#unpkg-link)52  - [Download prebuilt CDN assets](#download-prebuilt-cdn-assets)53  - [Download from our website](#download-from-our-website)54  - [Install via NPM package](#install-via-npm-package)55  - [Build from Source](#build-from-source)56- [Requirements](#requirements)57- [License](#license)58- [Links](#links)59 60---61 62#### Upgrading to Version 1163 64As always, major releases do contain breaking changes which may require action from users.  Please read [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_11_UPGRADE.md) for a detailed summary of breaking changes and any actions you may need to take.65 66 67#### Support for older versions <!-- omit in toc -->68 69Please see [SECURITY.md](https://github.com/highlightjs/highlight.js/blob/main/SECURITY.md) for long-term support information.70 71---72 73## Basic Usage74### In the Browser75 76The bare minimum for using highlight.js on a web page is linking to the77library along with one of the themes and calling [`highlightAll`][1]:78 79```html80<link rel="stylesheet" href="/path/to/styles/default.min.css">81<script src="/path/to/highlight.min.js"></script>82<script>hljs.highlightAll();</script>83```84 85This will find and highlight code inside of `<pre><code>` tags; it tries86to detect the language automatically. If automatic detection doesn’t87work for you, or you simply prefer to be explicit, you can specify the language manually by using the `class` attribute:88 89 90```html91<pre><code class="language-html">...</code></pre>92```93 94#### Plaintext Code Blocks95 96To apply the Highlight.js styling to plaintext without actually highlighting it, use the `plaintext` language:97 98```html99<pre><code class="language-plaintext">...</code></pre>100```101 102#### Ignoring a Code Block103 104To skip highlighting of a code block completely, use the `nohighlight` class:105 106```html107<pre><code class="nohighlight">...</code></pre>108```109 110### Node.js on the Server111 112The bare minimum to auto-detect the language and highlight some code.113 114```js115// load the library and ALL languages116hljs = require('highlight.js');117html = hljs.highlightAuto('<h1>Hello World!</h1>').value118```119 120To load only a "common" subset of popular languages:121 122```js123hljs = require('highlight.js/lib/common');124```125 126To highlight code with a specific language, use `highlight`:127 128```js129html = hljs.highlight('<h1>Hello World!</h1>', {language: 'xml'}).value130```131 132See [Importing the Library](#importing-the-library) for more examples of `require` vs `import` usage, etc.  For more information about the result object returned by `highlight` or `highlightAuto` refer to the [api docs](https://highlightjs.readthedocs.io/en/latest/api.html).133 134 135 136## Supported Languages137 138Highlight.js supports over 180 languages in the core library.  There are also 3rd party139language definitions available to support even more languages. You can find the full list of supported languages in [SUPPORTED_LANGUAGES.md][9].140 141## Custom Usage142 143If you need a bit more control over the initialization of144Highlight.js, you can use the [`highlightElement`][3] and [`configure`][4]145functions. This allows you to better control *what* to highlight and *when*.146 147For example, here’s the rough equivalent of calling [`highlightAll`][1] but doing the work manually instead:148 149```js150document.addEventListener('DOMContentLoaded', (event) => {151  document.querySelectorAll('pre code').forEach((el) => {152    hljs.highlightElement(el);153  });154});155```156 157Please refer to the documentation for [`configure`][4] options.158 159 160### Using custom HTML161 162We strongly recommend `<pre><code>` wrapping for code blocks. It's quite163semantic and "just works" out of the box with zero fiddling. It is possible to164use other HTML elements (or combos), but you may need to pay special attention to165preserving linebreaks.166 167Let's say your markup for code blocks uses divs:168 169```html170<div class='code'>...</div>171```172 173To highlight such blocks manually:174 175```js176// first, find all the div.code blocks177document.querySelectorAll('div.code').forEach(el => {178  // then highlight each179  hljs.highlightElement(el);180});181```182 183Without using a tag that preserves linebreaks (like `pre`) you'll need some184additional CSS to help preserve them.  You could also [pre and post-process line185breaks with a plug-in][brPlugin], but *we recommend using CSS*.186 187[brPlugin]: https://github.com/highlightjs/highlight.js/issues/2559188 189To preserve linebreaks inside a `div` using CSS:190 191```css192div.code {193  white-space: pre;194}195```196 197 198### Using with Vue.js199 200See [highlightjs/vue-plugin](https://github.com/highlightjs/vue-plugin) for a simple Vue plugin that works great with Highlight.js.201 202An example of `vue-plugin` in action:203 204```html205  <div id="app">206    <!-- bind to a data property named `code` -->207    <highlightjs autodetect :code="code" />208    <!-- or literal code works as well -->209    <highlightjs language='javascript' code="var x = 5;" />210  </div>211```212 213### Using Web Workers214 215You can run highlighting inside a web worker to avoid freezing the browser216window while dealing with very big chunks of code.217 218In your main script:219 220```js221addEventListener('load', () => {222  const code = document.querySelector('#code');223  const worker = new Worker('worker.js');224  worker.onmessage = (event) => { code.innerHTML = event.data; }225  worker.postMessage(code.textContent);226});227```228 229In worker.js:230 231```js232onmessage = (event) => {233  importScripts('<path>/highlight.min.js');234  const result = self.hljs.highlightAuto(event.data);235  postMessage(result.value);236};237```238 239## Importing the Library240 241First, you'll likely be installing the library via `npm` or `yarn` -- see [Getting the Library](#getting-the-library).242 243 244### Node.js CommonJS Modules / `require`245 246Requiring the top-level library will load all languages:247 248```js249// require the highlight.js library, including all languages250const hljs = require('./highlight.js');251const highlightedCode = hljs.highlightAuto('<span>Hello World!</span>').value252```253 254For a smaller footprint, load our common subset of languages (the same set used for our default web build).255 256```js257const hljs = require('highlight.js/lib/common');258```259 260For the smallest footprint, load only the languages you need:261 262```js263const hljs = require('highlight.js/lib/core');264hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));265 266const highlightedCode = hljs.highlight('<span>Hello World!</span>', {language: 'xml'}).value267```268 269 270### Node.js ES6 Modules / `import`271 272The default import will register all languages:273 274```js275import hljs from 'highlight.js';276```277 278It is more efficient to import only the library and register the languages you need:279 280```js281import hljs from 'highlight.js/lib/core';282import javascript from 'highlight.js/lib/languages/javascript';283hljs.registerLanguage('javascript', javascript);284```285 286If your build tool processes CSS imports, you can also import the theme directly as a module:287 288```js289import hljs from 'highlight.js';290import 'highlight.js/styles/github.css';291```292 293### Browser ES6 Modules294 295*Note: For now you'll want to install `@highlightjs/cdn-assets` package instead of `highlight.js`.296See [Download prebuilt CDN assets](#download-prebuilt-cdn-assets)*297 298To import the library and register only those languages that you need:299 300```js301import hljs from './assets/js/@highlightjs/cdn-assets/es/core.js';302import javascript from './assets/js/@highlightjs/cdn-assets/es/languages/javascript.min.js';303 304hljs.registerLanguage('javascript', javascript);305```306 307To import the library and register all languages:308 309```js310import hljs from './assets/js/@highlightjs/cdn-assets/es/highlight.js';311```312 313*Note: The path to these files will vary depending on where you have installed/copied them314within your project or site. The above path is only an example.*315 316You can also use [`importmap`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) to import in similar way as Node:317 318```html319<script type="importmap">320{321	"imports": {322		"@highlightjs": "./assets/js/@highlightjs/cdn-assets/es/"323	}324}325</script>326```327 328Use the above code in your HTML. After that, your JavaScript can import using the named key from329your `importmap`, for example `@highlightjs` in this case:330 331```js332import hljs from '@highlightjs/core.js';333import javascript from '@highlightjs/languages/javascript.min.js';334 335hljs.registerLanguage('javascript', javascript);336```337 338*Note: You can also import directly from fully static URLs, such as our very own pre-built ES6 Module CDN resources. See [Fetch via CDN](#fetch-via-cdn) for specific examples.*339 340 341## Getting the Library342 343You can get highlight.js as a hosted, or custom-build, browser script or344as a server module. Right out of the box the browser script supports345both AMD and CommonJS, so if you wish you can use RequireJS or346Browserify without having to build from source. The server module also347works perfectly fine with Browserify, but there is the option to use a348build specific to browsers rather than something meant for a server.349 350 351**Do not link to GitHub directly.** The library is not supposed to work straight352from the source, it requires building. If none of the pre-packaged options353work for you refer to the [building documentation][6].354 355**On Almond.** You need to use the optimizer to give the module a name. For356example:357 358```bash359r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js360```361 362### Fetch via CDN363 364A prebuilt version of Highlight.js bundled with many common languages is hosted by several popular CDNs.365When using Highlight.js via CDN you can use Subresource Integrity for additional security.  For details366see [DIGESTS.md](https://github.com/highlightjs/cdn-release/blob/main/DIGESTS.md).367 368#### cdnjs ([link](https://cdnjs.com/libraries/highlight.js))369 370##### Common JS <!-- omit in toc -->371 372```html373<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css">374<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>375<!-- and it's easy to individually load additional languages -->376<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/go.min.js"></script>377```378 379##### ES6 Modules <!-- omit in toc -->380 381````html382<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/dark.min.css">383<script type="module">384import hljs from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/highlight.min.js';385//  and it's easy to individually load additional languages386import go from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/languages/go.min.js';387hljs.registerLanguage('go', go);388</script>389 390````391 392 393#### jsdelivr ([link](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release))394 395##### Common JS <!-- omit in toc -->396 397```html398<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/styles/default.min.css">399<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/highlight.min.js"></script>400<!-- and it's easy to individually load additional languages -->401<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/languages/go.min.js"></script>402```403 404##### ES6 Modules <!-- omit in toc -->405 406```html407<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/styles/default.min.css">408<script type="module">409import hljs from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/es/highlight.min.js';410//  and it's easy to individually load additional languages411import go from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/es/languages/go.min.js';412hljs.registerLanguage('go', go);413</script>414```415 416#### unpkg ([link](https://unpkg.com/browse/@highlightjs/cdn-assets/))417 418##### Common JS <!-- omit in toc -->419 420```html421<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/default.min.css">422<script src="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/highlight.min.js"></script>423<!-- and it's easy to individually load additional languages -->424<script src="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/languages/go.min.js"></script>425```426 427##### ES6 Modules <!-- omit in toc -->428 429```html430<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/default.min.css">431<script type="module">432import hljs from 'https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/highlight.min.js';433//  and it's easy to individually load & register additional languages434import go from 'https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/languages/go.min.js';435hljs.registerLanguage('go', go);436</script>437```438 439 440**Note:** *The CDN-hosted `highlight.min.js` package doesn't bundle every language.* It would be441very large. You can find our list of "common" languages that we bundle by default on our [download page][5].442 443### Download prebuilt CDN assets444 445You can also download and self-host the same assets we serve up via our own CDNs.  We publish those builds to the [cdn-release](https://github.com/highlightjs/cdn-release) GitHub repository.  You can easily pull individual files off the CDN endpoints with `curl`, etc; if say you only needed `highlight.min.js` and a single CSS file.446 447There is also an npm package [@highlightjs/cdn-assets](https://www.npmjs.com/package/@highlightjs/cdn-assets) if pulling the assets in via `npm` or `yarn` would be easier for your build process.448 449### Download from our website450 451The [download page][5] can quickly generate a custom single-file minified bundle including only the languages you desire.452 453**Note:** [Building from source](#build-from-source) can produce slightly smaller builds than the website download.454 455 456### Install via NPM package457 458Our NPM package including all supported languages can be installed with NPM or Yarn:459 460```bash461npm install highlight.js462# or463yarn add highlight.js464```465 466There is also another npm package [@highlightjs/cdn-assets](https://www.npmjs.com/package/@highlightjs/cdn-assets) that contains prebuilt CDN assets including [ES6 Modules that can be imported in browser](#browser-es6-modules):467 468```bash469npm install @highlightjs/cdn-assets470# or471yarn add @highlightjs/cdn-assets472```473 474Alternatively, you can build the NPM package from source.475 476 477### Build from Source478 479The [current source code][10] is always available on GitHub.480 481```bash482node tools/build.js -t node483node tools/build.js -t browser :common484node tools/build.js -t cdn :common485```486 487See our [building documentation][6] for more information.488 489 490## Requirements491 492Highlight.js works on all modern browsers and currently supported Node.js versions.  You'll need the following software to contribute to the core library:493 494- Node.js >= 12.x495- npm >= 6.x496 497## License498 499Highlight.js is released under the BSD License. See our [LICENSE][7] file500for details.501 502 503## Links504 505The official website for the library is <https://highlightjs.org/>.506 507Further in-depth documentation for the API and other topics is at508<http://highlightjs.readthedocs.io/>.509 510A list of the Core Team and contributors can be found in the [CONTRIBUTORS.md][8] file.511 512[1]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightall513[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html514[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightelement515[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure516[5]: https://highlightjs.org/download/517[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html518[7]: https://github.com/highlightjs/highlight.js/blob/main/LICENSE519[8]: https://github.com/highlightjs/highlight.js/blob/main/CONTRIBUTORS.md520[9]: https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md521[10]: https://github.com/highlightjs/522 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai