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.
03.1k
1// Copyright 2017 Lovell Fuller and others.2// SPDX-License-Identifier: Apache-2.03 4'use strict';5 6const fs = require('fs');7 8const LDD_PATH = '/usr/bin/ldd';9const SELF_PATH = '/proc/self/exe';10const MAX_LENGTH = 2048;11 12/**13 * Read the content of a file synchronous14 *15 * @param {string} path16 * @returns {Buffer}17 */18const readFileSync = (path) => {19 const fd = fs.openSync(path, 'r');20 const buffer = Buffer.alloc(MAX_LENGTH);21 const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);22 fs.close(fd, () => {});23 return buffer.subarray(0, bytesRead);24};25 26/**27 * Read the content of a file28 *29 * @param {string} path30 * @returns {Promise<Buffer>}31 */32const readFile = (path) => new Promise((resolve, reject) => {33 fs.open(path, 'r', (err, fd) => {34 if (err) {35 reject(err);36 } else {37 const buffer = Buffer.alloc(MAX_LENGTH);38 fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {39 resolve(buffer.subarray(0, bytesRead));40 fs.close(fd, () => {});41 });42 }43 });44});45 46module.exports = {47 LDD_PATH,48 SELF_PATH,49 readFileSync,50 readFile51};52 