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
homedir.js113 linesDownload Raw Back to test
1'use strict';2 3var os = require('os');4var test = require('tape');5var mockProperty = require('mock-property');6 7var envKeys = ['HOME', 'USERPROFILE', 'HOMEDRIVE', 'HOMEPATH', 'LOGNAME', 'USER', 'LNAME', 'USERNAME'];8 9function mockEnv(t, key, value) {10    var has = key in process.env;11    var orig = process.env[key];12    if (arguments.length > 2) {13        process.env[key] = value;14    } else {15        delete process.env[key];16    }17    t.teardown(function () {18        if (has) {19            process.env[key] = orig;20        } else {21            delete process.env[key];22        }23    });24}25 26function clearEnv(t) {27    for (var i = 0; i < envKeys.length; i++) {28        mockEnv(t, envKeys[i]);29    }30}31 32function getFallback(t) {33    t.teardown(mockProperty(os, 'homedir', { value: undefined }));34 35    var homedirPath = require.resolve('../lib/homedir');36    t.teardown(mockProperty(require.cache, homedirPath, { 'delete': true }));37 38    return require('../lib/homedir');39}40 41test('homedir fallback', function (t) {42    t.test('win32: HOMEDRIVE without HOMEPATH does not produce a false concatenation', function (st) {43        clearEnv(st);44        st.teardown(mockProperty(process, 'platform', { value: 'win32' }));45 46        var homedir = getFallback(st);47 48        mockEnv(st, 'HOMEDRIVE', 'C:');49 50        st.equal(homedir(), null, 'returns null when only HOMEDRIVE is set');51 52        st.end();53    });54 55    t.test('win32: HOMEPATH without HOMEDRIVE does not produce a false concatenation', function (st) {56        clearEnv(st);57        st.teardown(mockProperty(process, 'platform', { value: 'win32' }));58 59        var homedir = getFallback(st);60 61        mockEnv(st, 'HOMEPATH', '\\Users\\foo');62 63        st.equal(homedir(), null, 'returns null when only HOMEPATH is set');64 65        st.end();66    });67 68    t.test('win32: HOMEDRIVE + HOMEPATH both set returns concatenation', function (st) {69        clearEnv(st);70        st.teardown(mockProperty(process, 'platform', { value: 'win32' }));71 72        var homedir = getFallback(st);73 74        mockEnv(st, 'HOMEDRIVE', 'C:');75        mockEnv(st, 'HOMEPATH', '\\Users\\foo');76 77        st.equal(homedir(), 'C:\\Users\\foo', 'returns concatenated drive and path');78 79        st.end();80    });81 82    t.test('win32: USERPROFILE takes precedence over HOMEDRIVE+HOMEPATH', function (st) {83        clearEnv(st);84        st.teardown(mockProperty(process, 'platform', { value: 'win32' }));85 86        var homedir = getFallback(st);87 88        mockEnv(st, 'USERPROFILE', 'C:\\Users\\bar');89        mockEnv(st, 'HOMEDRIVE', 'C:');90        mockEnv(st, 'HOMEPATH', '\\Users\\foo');91 92        st.equal(homedir(), 'C:\\Users\\bar', 'returns USERPROFILE');93 94        st.end();95    });96 97    t.test('win32: falls back to HOME when HOMEDRIVE/HOMEPATH are partial', function (st) {98        clearEnv(st);99        st.teardown(mockProperty(process, 'platform', { value: 'win32' }));100 101        var homedir = getFallback(st);102 103        mockEnv(st, 'HOME', 'C:\\Users\\baz');104        mockEnv(st, 'HOMEDRIVE', 'C:');105 106        st.equal(homedir(), 'C:\\Users\\baz', 'falls back to HOME');107 108        st.end();109    });110 111    t.end();112});113 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai