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
fs.js54 linesDownload Raw Back to loader
1import { tryInstallPkg } from "./install-pkg.js";2import { resolvePathAsync } from "./resolve.js";3import { promises } from "fs";4import { pathToFileURL } from "node:url";5const _collections = Object.create(null);6/** Check if full package exists, per cwd value */7const isLegacyExists = Object.create(null);8/**9* Asynchronously loads a collection from the file system.10*11* @param name {string} the name of the collection, e.g. 'mdi'12* @param autoInstall {AutoInstall} [autoInstall=false] - whether to automatically install13* @param scope {string} [scope='@iconify-json'] - the scope of the collection, e.g. '@my-company-json'14* @param cwd {string} [cwd=process.cwd()] - current working directory for caching15* @return {Promise<IconifyJSON | undefined>} the loaded IconifyJSON or undefined16*/17async function loadCollectionFromFS(name, autoInstall = false, scope = "@iconify-json", cwd = process.cwd()) {18	const cache = _collections[cwd] || (_collections[cwd] = Object.create(null));19	if (!await cache[name]) cache[name] = task();20	return cache[name];21	async function task() {22		const packageName = scope.length === 0 ? name : `${scope}/${name}`;23		let jsonPath = await resolvePathAsync(`${packageName}/icons.json`, cwd);24		if (scope === "@iconify-json") {25			if (isLegacyExists[cwd] === void 0) isLegacyExists[cwd] = !!await resolvePathAsync(`@iconify/json/collections.json`, cwd);26			const checkLegacy = isLegacyExists[cwd];27			if (!jsonPath && checkLegacy) jsonPath = await resolvePathAsync(`@iconify/json/json/${name}.json`, cwd);28			if (!jsonPath && !checkLegacy && autoInstall) {29				await tryInstallPkg(packageName, autoInstall);30				jsonPath = await resolvePathAsync(`${packageName}/icons.json`, cwd);31			}32		} else if (!jsonPath && autoInstall) {33			await tryInstallPkg(packageName, autoInstall);34			jsonPath = await resolvePathAsync(`${packageName}/icons.json`, cwd);35		}36		if (!jsonPath) {37			const packagePath = await resolvePathAsync(packageName, cwd);38			if (packagePath) {39				const { icons } = await import(pathToFileURL(packagePath).href);40				if (icons) return icons;41			}42		}43		let stat;44		try {45			stat = jsonPath ? await promises.lstat(jsonPath) : void 0;46		} catch (err) {47			return;48		}49		if (stat?.isFile()) return JSON.parse(await promises.readFile(jsonPath, "utf8"));50		else return;51	}52}53export { loadCollectionFromFS };54 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai