[Improvement] String array function improvement

Currently there is only one function, using which we get string from string array. With manged identifiers enabled it usually has name b.
Here is the simplest example:
var a = [
    'log',
    'foo',
    'bar',
    'baz'
];
var b = function (c, d) {
    c = c - 0x0;
    var e = a[c];
    return e;
};
console[b('0x0')](b('0x1'), b('0x2'), b('0x3'));

I think it will be more interesting if you add more same functions and use random of them:
var a = [
    'log',
    'foo',
    'bar',
    'baz'
];
var b = function (c, d) {
    c = c - 0x0;
    var e = a[c];
    return e;
};
var c = function (c, d) { // Just define same function
    c = c - 0x0;
    var e = a[c];
    return e;
};
var d = b; // Make link to function
var e = function (c, d) { // Just define same function
    return b(c, d);
};
console[c('0x0')](b('0x1'), e('0x2'), d('0x3')); // And use random of them

Then you even can encode different strings with different algorithms - some of them just base64, some - rc4.

Good idea about mixed encoding

Hmm. The prototype seems works fine.
If everything goes ok, it will a major release, because i changed stringArrayEncoding option from single value to the array of available encodings.
Available values:
none, base64, rc4.

With en empty array or with single none value it won't encode values.
With ['base64'] value if will encode only with base64 encoding.
With ['base64', 'rc4'] values, for each string it will randomly encode value with base64 or rc4 encoding.
With ['none', 'base64', 'rc4'] values, for each string it will randomly skip encoding or randomly encode value with base64 or rc4 encoding.

The PR here:
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/727
May you test it?

For code:
var string1 = 'foo';
var string2 = 'bar';
var string3 = 'baz';
var string4 = 'bark';

console.log(string1, string2, string3, string4);

and options:
stringArrayEncoding: [
    StringArrayEncoding.Rc4,
    StringArrayEncoding.Base64,
    StringArrayEncoding.None
]

it produces the following code:
var _0xe304 = [
    'zM9V',
    'yMfY',
    'WQNdPHG=',
    'bark',
    'Bg9N'
];
var _0x41ee = function (_0x20b6b6, _0x2299a3) {
    _0x20b6b6 = _0x20b6b6 - 0x0;
    var _0x4cbd96 = _0xe304[_0x20b6b6];
    return _0x4cbd96;
};
var _0xf2ea = function (_0x20b6b6, _0x2299a3) {
    _0x20b6b6 = _0x20b6b6 - 0x0;
    var _0x4cbd96 = _0xe304[_0x20b6b6];
    if (_0xf2ea['aPFuaD'] === undefined) {
        var _0x119463 = function (_0x1880e1) {
            var _0x1e7325 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
            var _0xf2eaa4 = String(_0x1880e1)['replace'](/=+$/, '');
            var _0x41eeef = '';
            for (var _0x3036be = 0x0, _0x23ede1, _0x547b53, _0x39b1ec = 0x0; _0x547b53 = _0xf2eaa4['charAt'](_0x39b1ec++); ~_0x547b53 && (_0x23ede1 = _0x3036be % 0x4 ? _0x23ede1 * 0x40 + _0x547b53 : _0x547b53, _0x3036be++ % 0x4) ? _0x41eeef += String['fromCharCode'](0xff & _0x23ede1 >> (-0x2 * _0x3036be & 0x6)) : 0x0) {
                _0x547b53 = _0x1e7325['indexOf'](_0x547b53);
            }
            return _0x41eeef;
        };
        _0xf2ea['OKvmNa'] = function (_0x4823b3) {
            var _0x1e4dae = _0x119463(_0x4823b3);
            var _0x2b61a5 = [];
            for (var _0x154bb1 = 0x0, _0x472ac3 = _0x1e4dae['length']; _0x154bb1 < _0x472ac3; _0x154bb1++) {
                _0x2b61a5 += '%' + ('00' + _0x1e4dae['charCodeAt'](_0x154bb1)['toString'](0x10))['slice'](-0x2);
            }
            return decodeURIComponent(_0x2b61a5);
        };
        _0xf2ea['qMyxSk'] = {};
        _0xf2ea['aPFuaD'] = !![];
    }
    var _0x46ac1f = _0xf2ea['qMyxSk'][_0x20b6b6];
    if (_0x46ac1f === undefined) {
        _0x4cbd96 = _0xf2ea['OKvmNa'](_0x4cbd96);
        _0xf2ea['qMyxSk'][_0x20b6b6] = _0x4cbd96;
    } else {
        _0x4cbd96 = _0x46ac1f;
    }
    return _0x4cbd96;
};
var _0x1e73 = function (_0x20b6b6, _0x2299a3) {
    _0x20b6b6 = _0x20b6b6 - 0x0;
    var _0x4cbd96 = _0xe304[_0x20b6b6];
    if (_0x1e73['RnhIMw'] === undefined) {
        var _0x119463 = function (_0x1e7325) {
            var _0xf2eaa4 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
            var _0x41eeef = String(_0x1e7325)['replace'](/=+$/, '');
            var _0x3036be = '';
            for (var _0x23ede1 = 0x0, _0x547b53, _0x39b1ec, _0x4823b3 = 0x0; _0x39b1ec = _0x41eeef['charAt'](_0x4823b3++); ~_0x39b1ec && (_0x547b53 = _0x23ede1 % 0x4 ? _0x547b53 * 0x40 + _0x39b1ec : _0x39b1ec, _0x23ede1++ % 0x4) ? _0x3036be += String['fromCharCode'](0xff & _0x547b53 >> (-0x2 * _0x23ede1 & 0x6)) : 0x0) {
                _0x39b1ec = _0xf2eaa4['indexOf'](_0x39b1ec);
            }
            return _0x3036be;
        };
        var _0x1880e1 = function (_0x1e4dae, _0x2b61a5) {
            var _0x154bb1 = [], _0x472ac3 = 0x0, _0x4bd0f7, _0x221fdb = '', _0x50b0d0 = '';
            _0x1e4dae = _0x119463(_0x1e4dae);
            for (var _0xd5e155 = 0x0, _0x3f880c = _0x1e4dae['length']; _0xd5e155 < _0x3f880c; _0xd5e155++) {
                _0x50b0d0 += '%' + ('00' + _0x1e4dae['charCodeAt'](_0xd5e155)['toString'](0x10))['slice'](-0x2);
            }
            _0x1e4dae = decodeURIComponent(_0x50b0d0);
            var _0x186b34;
            for (_0x186b34 = 0x0; _0x186b34 < 0x100; _0x186b34++) {
                _0x154bb1[_0x186b34] = _0x186b34;
            }
            for (_0x186b34 = 0x0; _0x186b34 < 0x100; _0x186b34++) {
                _0x472ac3 = (_0x472ac3 + _0x154bb1[_0x186b34] + _0x2b61a5['charCodeAt'](_0x186b34 % _0x2b61a5['length'])) % 0x100;
                _0x4bd0f7 = _0x154bb1[_0x186b34];
                _0x154bb1[_0x186b34] = _0x154bb1[_0x472ac3];
                _0x154bb1[_0x472ac3] = _0x4bd0f7;
            }
            _0x186b34 = 0x0;
            _0x472ac3 = 0x0;
            for (var _0x4659fa = 0x0; _0x4659fa < _0x1e4dae['length']; _0x4659fa++) {
                _0x186b34 = (_0x186b34 + 0x1) % 0x100;
                _0x472ac3 = (_0x472ac3 + _0x154bb1[_0x186b34]) % 0x100;
                _0x4bd0f7 = _0x154bb1[_0x186b34];
                _0x154bb1[_0x186b34] = _0x154bb1[_0x472ac3];
                _0x154bb1[_0x472ac3] = _0x4bd0f7;
                _0x221fdb += String['fromCharCode'](_0x1e4dae['charCodeAt'](_0x4659fa) ^ _0x154bb1[(_0x154bb1[_0x186b34] + _0x154bb1[_0x472ac3]) % 0x100]);
            }
            return _0x221fdb;
        };
        _0x1e73['VkCxXs'] = _0x1880e1;
        _0x1e73['UMOBjF'] = {};
        _0x1e73['RnhIMw'] = !![];
    }
    var _0x46ac1f = _0x1e73['UMOBjF'][_0x20b6b6];
    if (_0x46ac1f === undefined) {
        if (_0x1e73['iphHjT'] === undefined) {
            _0x1e73['iphHjT'] = !![];
        }
        _0x4cbd96 = _0x1e73['VkCxXs'](_0x4cbd96, _0x2299a3);
        _0x1e73['UMOBjF'][_0x20b6b6] = _0x4cbd96;
    } else {
        _0x4cbd96 = _0x46ac1f;
    }
    return _0x4cbd96;
};
var string1 = _0xf2ea('0x0');
var string2 = _0xf2ea('0x1');
var string3 = _0x1e73('0x2', 'ps57');
var string4 = _0x41ee('0x3');
console[_0xf2ea('0x4')](string1, string2, string3, string4);

Okay, will test later

Updated the PR. Now it feature complete. Still need to add more tests.

Thinking about the same mechanic for the identifierNamesGenerator

Merged into master. Have to think if I need to add more breaking changes and what it might be.

Just tested, looks fine but when i use mangled identifiers, i see that functions are defined in mixed order.
Just look: a, then d, c, b.
But don't know is it mixed order or just reversed
var a = [
    'yMfY',
    'B3NdR04Q',
    'WQVcKgi=',
    'Bg9N',
    'yMf6'
];
(function (a, b) {
    var c = function (d) {
        while (--d) {
            a['push'](a['shift']());
        }
    };
    c(++b);
}(a, -0x871 * -0x2 + -0x5e * -0x1f + 0x2f9 * -0x9));
var d = function (a, b) {
    a = a - (-0x871 * -0x2 + -0x5e * -0x1f + 0x6c * -0x43);
    var c = a[a];
    if (d['oNzFGA'] === undefined) {
        /* base64 code */
    }
    var e = d['MstVNJ'][a];
    return e === undefined ? (c = d['raBGMW'](c), d['MstVNJ'][a] = c) : c = e, c;
};
var c = function (a, b) {
    a = a - (-0x871 * -0x2 + -0x5e * -0x1f + 0x6c * -0x43);
    var c = a[a];
    if (c['pfpQmC'] === undefined) {
        /* rc4 code */
    }
    var e = c['dTEucZ'][a];
    return e === undefined ? (c['LyEpRj'] === undefined && (c['LyEpRj'] = !![]), c = c['piIzGx'](c, b), c['dTEucZ'][a] = c) : c = e, c;
};
var b = function (a, b) {
    a = a - (-0x871 * -0x2 + -0x5e * -0x1f + 0x6c * -0x43);
    var c = a[a];
    return c;
};
console[d('0x1')](c('0x0', 'W6]X'), d('0x3'), d('0x2'), c('0x4', 'hwY5'));

Expected behavour: functions are defined in random order but identifiers are in usual order.

Each helper inserts at index 1 in the root scope, so the result order is reversed. This is not a critical issue imo, but i'll look tomorrow at this.

Yeah i understand that reversed identifiers order is not critical but just noticed and now cannot unnotice😅

Just tested - moved "none" from config from first posinion to last and function also moved. So you can just shuffle order from config and result definitions will be also shuffled.
When functions are in mixed order that may be better for obfuscation, right?

Right now yes, but i'll add sorting to prevent this. The order should be the always the same

Updated master with a fixed order of helpers names

Yes, looks fine

Released as 2.0.0

Will add a new option: stringArrayIntermediateCalls, enabled by default.
const _0x513c = [
    'foo',
    'bar',
    'baz',
    'log'
];
const _0x19a1 = function (_0x513ce6, _0x135380) {
    _0x513ce6 = _0x513ce6 - 0x0;
    let _0x19a103 = _0x513c[_0x513ce6];
    return _0x19a103;
};
const _0x3745 = _0x19a1;
const _0x38eb = _0x19a1;
const _0x261a = _0x19a1;
const _0x2f15 = _0x19a1;
const _0x4a63 = _0x19a1;
const _0x2e9d = _0x19a1;
const foo = _0x4a63('0x0');
const bar = _0x3745('0x1');
const baz = _0x2e9d('0x2');

The number of intermediate variables is between 5 and 10. Currently, it's hard to limit the number of intermediate variables by the number of string array items, so event for single string array element - between 5 and 10 intermediate variables will be added, and one of them will be used.

Changed option slightly. It will accept not a boolean value, but a number value.
This value will set the passed amount of intermediate variables for the string array.

The PR:
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/736

Merged as stringArrayIntermediateVariablesCount option.
Right now it adds intermediate variables with a simple assignment.
In the future I'll add stringArrayIntermediateVariables option that will control the view of these variables:

assignment
function

What if add here arguments reversing for intermediate functions?
const _0x1cc7 = [
    'WQBdICot',
    'stlcPq==',
    'W43dVd4='
];
const _0x3b02 = function (_0x1cc770, _0x3b0275) {
  // Usual rc4 template
};

const _0x2f15 = _0x3b02;
const _0x4a63 = function (_0x1de233, _0x52abb1) {
  return _0x3b02(_0x1de233, _0x52abb1); // Not reversing here
};
const _0x1cc7 = function (_0x5f3278, _0x1a680c) {
  return _0x3b02(_0x1a680c, _0x5f3278); // Reversing here
};

// As option, sometimes can use intermediate variables in intermediate functions
const _0x5d79 = _0x3b02;
const _0x1e1a = function (_0x5f3278, _0x1a680c) {
  return _0x5d79(_0x1a680c, _0x5f3278); // Reversing here
};

// Or even prevoius intermediate function 🤔🤔
const _0x3aa6 = _0x1e1a;
const _0x5396 = function (_0x5f3278, _0x1a680c) {
  return _0x3aa6(_0x1a680c, _0x5f3278); // ! Reversing reversed
};

const foo = _0x2f15('0x0', 'sCKC');
const bar = _0x4a63('0x1', '6MUu');
const baz = _0x1cc7('!Rxd', '0x2');

Yeah, I thought about this

I think relations between different variables can be dislpayed like tree.
The original function is the root (as functions can be several - roots also can be several)
From example above can be buint next tree:
_0x3b02 (root)
 |- _0x2f15 (var)
 |- _0x4a63 (fn)
 |- _0x1cc7 (rev_fn)
 |- _0x5d79 (var)
     |- _0x1e1a (rev_fn)
         |- _0x3aa6 (var)
             |- _0x5396 (rev_fn)

There are 4 types of node - root, var, fn and rev_fn.
Honestly, i'm not expert in trees, i don't know good algorithms for building good random trees, but i think in this way can be generated good random structure between intermediate functions.
And also it will be flexible and easy to add one more perverted intermediate function=)

And also it will be flexible and easy to add one more perverted intermediate function=)

For example, intermediate function, that adds or subtracts number from index:
const _0x3b02 = function (_0x1cc770, _0x3b0275) {
  // Usual rc4 template
};

const _0x4a63 = function (_0x1de233, _0x52abb1) {
  _0x1de233 = _0x1de233 - 0x0 + 0x123;
  return _0x3b02(_0x1de233, _0x52abb1);
};

// Before:
_0x3b02('0x124', 'key');
// After:
_0x3b02('0x1', 'key');

Or javascript haters favourite "feature" - adding number to string🌚:
const _0x3b02 = function (_0x1cc770, _0x3b0275) {
  // Usual rc4 template
};

const _0x4a63 = function (_0x1de233, _0x52abb1) {
  _0x1de233 = _0x1de233 + 0x18;
  return _0x3b02(_0x1de233, _0x52abb1);
};

// Before:
_0x3b02('0x124', 'key');
// After:
_0x3b02('0x1', 'key');

But this is very narrow way because it fit only for indexes with similar last letters.

Made a rough prototype:
Options:
            stringArray: true,
            stringArrayThreshold: 1,
            stringArrayIntermediateVariablesCount: 5,
            stringArrayEncoding: [
                StringArrayEncoding.None,
                StringArrayEncoding.Rc4
            ]

const _0x3ceb = [
    'A8oylG==',
    'bar',
    'baz',
    'bark',
    'hawk',
    'bSoWW5K=',
    'log',
    'W5xcKwW=',
    's3ddOW==',
    'eagle',
    'drSi',
    'WPfWW6C=',
    'zmk8WOq='
];
const _0x2a66 = function (_0x3ceb1d, _0x2a660e) {
    _0x3ceb1d = _0x3ceb1d - 0x0;
    let _0x3228cd = _0x3ceb[_0x3ceb1d];
    return _0x3228cd;
};
const _0x1bd7 = function (_0x3ceb1d, _0x2a660e) {
    _0x3ceb1d = _0x3ceb1d - 0x0;
    let _0x3228cd = _0x3ceb[_0x3ceb1d];
    if (_0x1bd7['KLqHdA'] === undefined) {
        var _0x433b6a = function (_0x138e44) {
            const _0x1bd7f1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
            const _0x940d4a = String(_0x138e44)['replace'](/=+$/, '');
            let _0x5507a7 = '';
            for (let _0x299ab3 = 0x0, _0x3dd94d, _0x7e30d3, _0x996149 = 0x0; _0x7e30d3 = _0x940d4a['charAt'](_0x996149++); ~_0x7e30d3 && (_0x3dd94d = _0x299ab3 % 0x4 ? _0x3dd94d * 0x40 + _0x7e30d3 : _0x7e30d3, _0x299ab3++ % 0x4) ? _0x5507a7 += String['fromCharCode'](0xff & _0x3dd94d >> (-0x2 * _0x299ab3 & 0x6)) : 0x0) {
                _0x7e30d3 = _0x1bd7f1['indexOf'](_0x7e30d3);
            }
            return _0x5507a7;
        };
        const _0x2ac6d2 = function (_0x4af05e, _0x33df35) {
            let _0x5c5625 = [], _0x2e537c = 0x0, _0x4e7d4e, _0x5caafc = '', _0x106e81 = '';
            _0x4af05e = _0x433b6a(_0x4af05e);
            for (let _0x49e640 = 0x0, _0x3542f7 = _0x4af05e['length']; _0x49e640 < _0x3542f7; _0x49e640++) {
                _0x106e81 += '%' + ('00' + _0x4af05e['charCodeAt'](_0x49e640)['toString'](0x10))['slice'](-0x2);
            }
            _0x4af05e = decodeURIComponent(_0x106e81);
            let _0x31933d;
            for (_0x31933d = 0x0; _0x31933d < 0x100; _0x31933d++) {
                _0x5c5625[_0x31933d] = _0x31933d;
            }
            for (_0x31933d = 0x0; _0x31933d < 0x100; _0x31933d++) {
                _0x2e537c = (_0x2e537c + _0x5c5625[_0x31933d] + _0x33df35['charCodeAt'](_0x31933d % _0x33df35['length'])) % 0x100;
                _0x4e7d4e = _0x5c5625[_0x31933d];
                _0x5c5625[_0x31933d] = _0x5c5625[_0x2e537c];
                _0x5c5625[_0x2e537c] = _0x4e7d4e;
            }
            _0x31933d = 0x0;
            _0x2e537c = 0x0;
            for (let _0x79fa71 = 0x0; _0x79fa71 < _0x4af05e['length']; _0x79fa71++) {
                _0x31933d = (_0x31933d + 0x1) % 0x100;
                _0x2e537c = (_0x2e537c + _0x5c5625[_0x31933d]) % 0x100;
                _0x4e7d4e = _0x5c5625[_0x31933d];
                _0x5c5625[_0x31933d] = _0x5c5625[_0x2e537c];
                _0x5c5625[_0x2e537c] = _0x4e7d4e;
                _0x5caafc += String['fromCharCode'](_0x4af05e['charCodeAt'](_0x79fa71) ^ _0x5c5625[(_0x5c5625[_0x31933d] + _0x5c5625[_0x2e537c]) % 0x100]);
            }
            return _0x5caafc;
        };
        _0x1bd7['BJUxjt'] = _0x2ac6d2;
        _0x1bd7['pOYecH'] = {};
        _0x1bd7['KLqHdA'] = !![];
    }
    const _0x4edb5e = _0x1bd7['pOYecH'][_0x3ceb1d];
    if (_0x4edb5e === undefined) {
        if (_0x1bd7['Tckegd'] === undefined) {
            _0x1bd7['Tckegd'] = !![];
        }
        _0x3228cd = _0x1bd7['BJUxjt'](_0x3228cd, _0x2a660e);
        _0x1bd7['pOYecH'][_0x3ceb1d] = _0x3228cd;
    } else {
        _0x3228cd = _0x4edb5e;
    }
    return _0x3228cd;
};
const _0x940d = _0x1bd7;
const _0x5507 = _0x1bd7;
const _0x299a = _0x1bd7;
const _0x3dd9 = _0x1bd7;
const _0x7e30 = _0x1bd7;
const _0x3228 = _0x2a66;
const _0x433b = _0x2a66;
const _0x4edb = _0x2a66;
const _0x2ac6 = _0x2a66;
const _0x138e = _0x2a66;
function test() {
    var _0x40d4f2 = _0x433b;
    var _0x2de63c = _0x940d;
    const _0x996149 = _0x2de63c('0x0', 'fej#');
    const _0x4af05e = _0x40d4f2('0x1');
    const _0x33df35 = _0x40d4f2('0x2');
    function _0x5c5625() {
        var _0x55e7d7 = _0x299a;
        var _0x4bb9f0 = _0x433b;
        const _0x4e7d4e = _0x4bb9f0('0x3');
        const _0x5caafc = _0x4bb9f0('0x4');
        const _0x106e81 = _0x55e7d7('0x5', '7J7o');
        console[_0x4bb9f0('0x6')](_0x4af05e, _0x5caafc, _0x106e81);
    }
    function _0x2e537c() {
        var _0x5f88f2 = _0x433b;
        var _0x35f11b = _0x7e30;
        const _0x31933d = _0x35f11b('0x7', '[jWb');
        const _0x49e640 = _0x35f11b('0x8', '#sKy');
        const _0x3542f7 = _0x5f88f2('0x9');
        console[_0x35f11b('0xa', 'Ywj[')](_0x31933d, _0x49e640, _0x3542f7);
    }
    console[_0x2de63c('0xb', 'AYr&')](_0x996149, _0x4af05e, _0x33df35);
    _0x5c5625();
    _0x2e537c();
}
function test3() {
    var _0x4ccc68 = _0x433b;
    var _0x49298d = _0x3dd9;
    const _0x79fa71 = _0x49298d('0xc', 'pXck');
    console[_0x4ccc68('0x6')](_0x79fa71);
}
test();
test3();

// foo bar baz
//bar hawk dog
//cat pig eagle
//xyz

Example without encodings:
const _0x3c2e = [
    'foo',
    'bar',
    'baz',
    'bark',
    'hawk',
    'dog',
    'log',
    'cat',
    'pig',
    'eagle',
    'xyz'
];
const _0x20dd = function (_0x3c2edf, _0x20dd55) {
    _0x3c2edf = _0x3c2edf - 0x0;
    let _0x170cb0 = _0x3c2e[_0x3c2edf];
    return _0x170cb0;
};
const _0x170c = _0x20dd;
const _0x8583 = _0x20dd;
const _0x3040 = _0x20dd;
const _0x2433 = _0x20dd;
const _0x4974 = _0x20dd;
function test() {
    var _0x3b63d8 = _0x4974;
    const _0x5c2823 = _0x3b63d8('0x0');
    const _0x59222b = _0x3b63d8('0x1');
    const _0x5296a3 = _0x3b63d8('0x2');
    function _0x46ca1e() {
        var _0x8b3746 = _0x4974;
        const _0x148d6b = _0x8b3746('0x3');
        const _0x53123e = _0x8b3746('0x4');
        const _0x573d2b = _0x8b3746('0x5');
        console[_0x8b3746('0x6')](_0x59222b, _0x53123e, _0x573d2b);
    }
    function _0x266d0a() {
        var _0xf1285a = _0x3040;
        const _0x25fd70 = _0xf1285a('0x7');
        const _0x18488f = _0xf1285a('0x8');
        const _0x282c14 = _0xf1285a('0x9');
        console[_0xf1285a('0x6')](_0x25fd70, _0x18488f, _0x282c14);
    }
    console[_0x3b63d8('0x6')](_0x5c2823, _0x59222b, _0x5296a3);
    _0x46ca1e();
    _0x266d0a();
}
function test3() {
    var _0x1314fc = _0x170c;
    const _0x3b4654 = _0x1314fc('0xa');
    console[_0x1314fc('0x6')](_0x3b4654);
}
test();
test3();

Okay. So it adds N intermediate variables in root scope and one variable in each function scope for each encoding

I can easily do the following chain, actually i did it at first, but then replace by non-chain assigns:
const _0x3228 = _0x2a66;
const _0x433b = _0x3228;
const _0x4edb = _0x2a66;
const _0x2ac6 = _0x4edb;
const _0x138e = _0x3228;

But the question is about performance. It adds 1+ more elements in the calls chain for each string so I'm not sure if I want to do it right now.
About the second thought - the same thing - performance.
So right now I thinking about the multiple root intermediate variables instead of the same variables as inside the function scope.

Hmm, I thought functions work like objects, when you assign function to other variable, you assign just pointer to function in memory heap. So re-assigning 100500 times shouldn't impact the performance. (Maybe i'm not right, let me know.)
In other hand, if we'll use not only intermediate variables, but also different intermediate functions, then i agree, it will impact the performance.

Completely reworked previous stringArrayIntermediateCallsCount option implementation with a new one that I partially showed above.
const _0x2123 = [
    'foo',
    'bar',
    'baz',
    'log',
    'ddd',
    'eee',
    'yyy'
];
const _0x3b3a = function (_0x2123cf, _0x3b3a14) {
    _0x2123cf = _0x2123cf - 0x0;
    let _0x39a98a = _0x2123[_0x2123cf];
    return _0x39a98a;
};
var _0x5184e8 = _0x3b3a;
var _0xddade2 = _0x3b3a;
var _0x497d0c = _0x3b3a;
var _0x3aef08 = _0x3b3a;
var _0x2bb500 = _0x3b3a;
var _0x782303 = _0x3b3a;
function test() {
    var _0x764983 = _0x3b3a;
    var _0x2f5f0d = _0x3b3a;
    var _0x1c3a12 = _0x3b3a;
    const _0x39a98a = _0x1c3a12('0x0');
    const _0x58ca42 = _0x2f5f0d('0x1');
    const _0x3594e0 = _0x2f5f0d('0x2');
}
console[_0x782303('0x3')](_0x2bb500('0x4'));
console[_0x2bb500('0x3')](_0x497d0c('0x5'));
console[_0xddade2('0x3')](_0x3aef08('0x6'));

It still uses stringArrayIntermediateCallsCount value to check if we need to add a new calls wrapper variable.
But now it works for root and function scopes and the actual amount of added wrappers is the following:
min(literalNodesCount, stringArrayIntermediateCallsCount)
stringArrayIntermediateCallsCount affects maximum amount of variables for each encoding type.
So for 3 literal nodes in the scope, stringArrayIntermediateCallsCount: 2  and rc4 and base64 encodings - 2 or 3 wrapper variables will be added.
It depends on the following:

if all 3 literal nodes will be encoded with the same encoding - 2 wrapper variables will be added
if one of literal nodes will be encoded with a different encoding - 2 wrapper variables will be added for a one encoding type and 1 wrapper will be added for a second encoding type.

The WIP PR here:
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/738
It still needs many things to do.

Also, i looking for a better option name

Updated the PR.
Renamed option stringArrayIntermediateVariablesCount -> stringArrayWrappersCount.
Added a new option: stringArrayWrappersChainedCalls for chained calls between string array wrappers.
Did many refactorings.

The best thing is that all main logic is described inside StringArrayTransformer class.
https://github.com/javascript-obfuscator/javascript-obfuscator/blob/string-array-intermediate-calls-wrapper/src/node-transformers/string-array-transformers/StringArrayTransformer.ts

Example of the chained calls:
const _0x4714 = [
    'foo',
    'bar',
    'baz',
    'bark',
    'hawk',
    'eagle'
];
const _0x2bdb = function (_0x471439, _0x2bdb71) {
    _0x471439 = _0x471439 - 0x0;
    let _0x6e47e6 = _0x4714[_0x471439];
    return _0x6e47e6;
};
const _0x1c3d52 = _0x2bdb;
const _0xd81c2a = _0x2bdb;
const foo = _0xd81c2a('0x0');
const bar = _0x1c3d52('0x1');
function test() {
    const _0x21a0b4 = _0x1c3d52;
    const _0x12842d = _0xd81c2a;
    const _0x6e47e6 = _0x12842d('0x2');
    const _0x4f3aef = _0x12842d('0x3');
    function _0x40f1dc() {
        const _0x468540 = _0x12842d;
        const _0x1f4b05 = _0x21a0b4;
        const _0x40a980 = _0x1f4b05('0x4');
        const _0x4d1285 = _0x468540('0x5');
    }
}

The question is - should I enable stringArrayWrappersCount by default? Need to compare performance with/without this option. If the runtime performance is the same - maybe I'll enable stringArrayWrappersCount by default with a value 1 or 2

So, the next step is to make it harder to detect the index argument of calls to the string array.

Ok, i enabled both options by default. These options add some runtime performance loss, but it about 10% in my tests.
Default values:
stringArrayWrappersCount: 1,
stringArrayWrappersChainedCalls: true

So, the next step is to make it harder to detect the index argument of calls to the string array.

Few variants:

Move indexes to another variable:

const _0xabc123 = '0x5';
_0xabc456(_0xabc123);

Maybe instead of a hexadecimal number string, make it just a raw number when stringArrayWrappersCount option is enabled.
Then it will look like that:

_0xabc123(17); // hard to say if it is a string array call or just some function call

Maybe instead of a hexadecimal number string, make it just a raw number
But if numbersToExpressions is enabled, it becomes _0xabc123(-0x1cf0+-0x1c80+0x3981) and it will be even worse then adding second argument for all functions

Yes, string array runs after numbers transformations.

I have one more random idea:
In this this comment i offered to makestrange intermediate function, but it will impact performance.
But what if make same root function. So there will be one encoding but there will several root functions with different arguments transformations.
The most simple example:
const _0x422c = [
    'foo',
    'bar',
    'baz',
    'bee'
];
const _0x3b16 = function (_0x422cb1, _0x3b167b) {
    _0x422cb1 = _0x422cb1 - 0x0;
    let _0x532fe4 = _0x422c[_0x422cb1];
    return _0x532fe4;
};
const _0x3f03 = function (_0x422cb1, _0x3b167b) {
    _0x422cb1 = _0x422cb1 - 0x0 + 0x2;
    let _0x532fe4 = _0x422c[_0x422cb1];
    return _0x532fe4;
};
const foo = _0x3b16('0x0');
const bar = _0x3b16('0x1');
const baz = _0x3f03('0x0');
const bee = _0x3f03('0x1');

In rc4 template you can reverse the key or add some constant to the key. Or here also just index can be distorted

I like this variant too, so will think

Anybody can test these options?

Anybody can test these options?

How can i help?
Just test on my project?

Yes. I just need to confirm that obfuscated code won't have any runtime error after obfuscation with the new options.

Currently there is a problem with variable names with mangled name generator. Need to think about how to fix it.

Oh, i use mangled:(
Will test later

Yes, really something strange with mangled names

Tried to fix it here:
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/740
The problem was that the name of the inserted scope calls wrapper might have conflicted with the other variable names within that or the children scopes.
Because these wrappers assigned AFTER the renaming stage (I cannot change this), I fixed it by generating names based on the global names set. So, the mangled names of these wrappers will always have the latest generated mangled names but this prevents conflicts with scope names.

Updated master. Would you mind testing it please, with mangled generator?

Hmmm, still troubles

With the latest master? May you reproduce it with a smaller source code?

Anybody can test it more?

Ok. I'll release 2.2.0 today. The next step is to add the option stringArrayWrappersType that controls a type of wrappers.
Looks like it should be an array that accepts types:
stringArrayWrappersType: [
    StringArrayWrappersType.Variable,
    StringArrayWrappersType.Function,
    StringArrayWrappersType.FunctionWithReversedArguments,
    StringArrayWrappersType.FunctionWithShiftedIndex
]

But here are a few problems.
Without stringArrayWrappersChain option it's a simple task to choose a wrapper type - just to pick a random type and append a call to this wrapper based on this type (with a shifted index or with reversed arguments).
But with stringArrayWrappersChain option enabled - the task is more complicated. If we append a wrapper with a reversed arguments on a parent scope, then we have to append at least a one wrapper with normal arguments order on a children scope.
So, need to think about how to handle all this logic.

I just published the new 2.2.0 version

Great!

What if swap key and string?
Before:
const a = [
    'WQRdQJq=',
    'aYZcIa=='
];
const b = function (c, d) {
  // rc4 decode
};
const foo = b('0x0', '(%[i');
console[b('0x1', 'B*iU')](foo);

After:
const a = [
    '(%[i',
    'B*iU'
];
const b = function (c, d) {
  // rc4 decode
};
const foo = b('0x0', 'WQRdQJq=');
console[b('0x1', 'aYZcIa==')](foo);

It shouldn't impact a size of code or performance, right?
If you add it as separate type of encoding, maybe it will be bad for security maybe, but together with usual rc4 it will be interesting.

https://github.com/javascript-obfuscator/javascript-obfuscator/pull/742/files
Some refactoring

Ok. The next stage is stringArrayWrappersType option.
The WIP PR here:
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/744
Right now it allows selecting a type of string array wrappers.
The next step is to collect data when we're appending these wrappers: indexShift and parentWrapper.
This allows getting a parent wrapper for the current wrapper and its indexShift to calculate the indexShift for the current wrapper. Then during the stage of appending calls to these wrappers, we can use these indexes to calculate a correct index at the place of the call to the wrapper.

Right now the stringArrayWrappersType option controls the type of all wrappers. So it doesn't allow to select the multiple types.

Ok. The prototype works. Now i need to write tests and then to refactor all these things. I use only subtract operations to keep both indexes as strings because subtraction of the string numbers
const a = [
    'foo',
    'bar',
    'baz',
    'bark',
    'hawk',
    'eagle',
    'log'
];
const b = function (c, d) {
    c = c - 0x0;
    let e = a[c];
    return e;
};
const j = function (g, h) {
    return b(g - '0x49', h);
};
const k = function (g, h) {
    return b(g - '0x49', h);
};
const c = j('0x49');
const d = j('0x4a');
const e = k('0x4b');
function f(g = k('0x4c')) {
    const l = function (g, h) {
        return j(g - '0x27', h);
    };
    const m = function (g, h) {
        return k(g - '0x27', h);
    };
    const h = l('0x74');
    const i = m('0x75');
    console[l('0x76')](g, h, i);
}
console[j('0x4f')](c, d, e);
f();

How about negative substraction? It can fix this problem and it looks realy ugly.
It works event if both arguments are strings.
const a = "5";
const b = "13";
a - -b // 18

const a = [
    'foo',
    'bar',
    'baz',
    'bark',
    'hawk',
    'eagle',
    'log'
];
const b = function (c, d) {
    c = c - 0x0;
    let e = a[c];
    return e;
};
const j = function (g, h) {
    return b(g - '0x252', h);
};
const k = function (g, h) {
    return b(g - '0x252', h);
};
const c = j('0x252');
const d = j('0x253');
const e = k('0x254');
function f(g = j('0x255')) {
    const l = function (g, h) {
        return j(g - -'0x369', h);
    };
    const m = function (g, h) {
        return k(g - -'0x369', h);
    };
    const h = l(-'0x113');
    const i = m(-'0x112');
    console[l(-'0x111')](g, h, i);
}
console[j('0x258')](c, d, e);
f();

Merged into master. Please test it.

Released as 2.3.0.
Right now I finish with this PR. The reverted order of the arguments is a slightly complicated feature.

Updated obfuscator.io

Merged into master. Please test it.

Sory I am late😬 Yes, it works.

Released as 2.3.0.

Wow! You do great work!

A rare bug exists in 2.3.0 with mangled identifier names generator. I made a mistake in the algorithm that's detecting if a mangled name is an incremented new mangled name. I fixed it and will release a new version soon.

The PR:
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/752

Released as 2.3.1


crashing after a while

Change execa to spawn

Cross referencing https://github.com/evancohen/sonus/issues/22

Continuing the discussion from d655da9.
If it actually solves Windows issues then it sounds like cross-spawn would be the way to go 👍
Somewhat related question: Why do you need a PassThrough stream? It doesn't seem necessary. On super low-powered devices (Pi, CHIP, etc) it's additional overhead.

Upon investigating it seems that cross-spawn isn't really solving any problems that are applicable to us.

Somewhat related question: Why do you need a PassThrough stream? It doesn't seem necessary. On super low-powered devices (Pi, CHIP, etc) it's additional overhead.

I'll see if I can do something about that in the next release, will probably publish it as a minor version bump

Published as 0.1.7

Excellent! Thanks for the quick turn-around :)


Add qpdf

qpdf is useful for many operations on pdf for example decrypt a pdf: qpdf --decrypt

Thank you for your feedback! We've been working on major updates to FLARE VM over the last year.
The now revamped FLARE VM has just been released and will make the project more open and maintainable.
Please check out our blog post at https://www.mandiant.com/resources/blog/flarevm-open-to-public and give the new installation a try.
If this problem still persists with the new installation, please report:

new tools or tool-related issues at https://github.com/mandiant/VM-Packages/issues
ideas and issues related to the installer script and configuration at https://github.com/mandiant/flare-vm/issues

Please note that we use this message to close all legacy issues in this repository. We look forward to your feedback and support for the next generation of FLARE VM.


Add support for diffusion models

We are currently focus on support diffusion models with comparable performance.
dev branch is https://github.com/alibaba/BladeDISC/tree/stable_diffusion_for_unibuild.
Include work items:

[x] add support for rank 0 arith.const https://github.com/alibaba/BladeDISC/pull/868
[x] add shape inference for some op https://github.com/alibaba/BladeDISC/pull/871
[x] performance optimize for attention kernel https://github.com/alibaba/BladeDISC/pull/869
[x]   add support for group_norm op https://github.com/alibaba/BladeDISC/pull/874

[x] lowering group_norm to disc codegen
[x] with bladnn tuning support for better performance

All task done.


Types: Allow to use golang any type for generic objects

Description
Sometimes you need a generic approach for sending data of unknown schema e.g. some event object with any possible payload related to a given event, the event is just piped around through some systems so you don't really care about the schema of this data.
You can workaround by adding additional optional fields for each possible field but it's cumbersome and error-prone, as it's easy to omit it in implementation.
Proposal
Would be really great to allow generating object based on an additional format e.g. any which would result in the proper implementation of the generator.
Current solution
Currently, an empty object is generated as an empty struct which doesn't have any real use cases.
References

If you want exactly an object without fixed set of fields, you could use additionalProperties: true.
Schema
MyEvent:
  type: object
  required: [id, type]
  properties:
    id:
      type: string
    type:
      type: string
    data:
      $ref: "#/components/schemas/EventData"
EventData:
  # Now 'data' field requires an object, but it can have any fields and any values
  type: object
  additionalProperties: true

Generated type
type MyEvent struct {
    ID   string    `json:"id"`
    Type string    `json:"type"`
    Data EventData `json:"data"`
}

type EventData map[string]jx.Raw

Is there any reason to use third-party library instead of using native go types?

jx.Raw is just []byte


Shell escape gradle_path in GradleHelper

This Builds upon the fix by @icyleaf in #4063 and makes a couple small adjustments:

Moves the shell escaping of the gradle_path into the GradleHelper so that future users of that class get the right behavior by default
Simplifies the added test a bit using some method stubbing

Addresses #4018

LGTM :+1: with one possible suggestion!

:shell: :+1:

Thanks for the pretty new PR, i'll follow it next time :+1:

@icyleaf Thanks for the great contribution! :rocket:


Duplicate State: Allergic_Rhinitis_Symptom4_Ends

<snip>
    "Allergic_Rhinitis_Symptom4_Ends": {
      "type": "Symptom",
      "symptom": "Sneezing Fits",
      "exact": {
        "quantity": 0
      },
      "direct_transition": "Allergic_Rhinitis_Symptom4_Ends"
    },
    "Allergic_Rhinitis_Symptom4_Ends": {
      "type": "Symptom",
      "symptom": "Ear Pressure",
      "exact": {
        "quantity": 0
      },
      "direct_transition": "Terminal"
    },
    "Terminal": {
      "type": "Terminal"
    }
  }
}

Should probably be
<snip>
    "Allergic_Rhinitis_Symptom4_Ends": {
      "type": "Symptom",
      "symptom": "Sneezing Fits",
      "exact": {
        "quantity": 0
      },
      "direct_transition": "Allergic_Rhinitis_Symptom5_Ends"
    },
    "Allergic_Rhinitis_Symptom5_Ends": {
      "type": "Symptom",
      "symptom": "Ear Pressure",
      "exact": {
        "quantity": 0
      },
      "direct_transition": "Terminal"
    },
    "Terminal": {
      "type": "Terminal"
    }
  }
}

Patch was merged so closing


Supporting more algorithms?

More algorithms can be supported by switching hashlib.algorithms for  hashlib.algorithms_available. I tried this originally, but opted out.

I got too many algorithms (['sha3-512', 'shake128', 'sha3-384', 'sha3-256', 'sha512-224', 'blake2s256', 'shake256', 'blake2b512', 'md4', 'md5', 'sha1', 'sha224', 'sm3', 'sha512-256', 'mdc2', 'sha3-224', 'sha384', 'md5-sha1', 'sha256', 'sha512', 'ripemd160', 'whirlpool']). Ulauncher didn't handle this (no max-height or scrollbar) so the whole result list couldn't fit on my screen (1080p). Late addition:  ExtensionSmallResultItem could be used to fit more items on the screen
I'm confused about the dependency and platform-aspect. According to the documentation the extra algorithms require OpenSSL. Some people switched to alternatives like LibreSSL since the heartbleed exploit. Even with OpenSSL the feature support depends on how it was compiled. Overall this makes me uneasy about the support here. Ulauncher keywords are added in the static manifest, so they can't be handled conditionally unfortunately.

I would add the extra algorithms if there were no caveats or if there were ways around them, but this isn't currently the case.
Less than 24 hours after I published the extension it was forked though, so now people can choose :+1:  Fast work @xtrcode :laughing:

It seems @xtrcode's fork is no longer maintained, unfortunately :(
It also doesn't conform with Extension API v2 (e.g. the lack of versions.json file, causing installation to fail)


Quirks of methods with float parameters in interop

I have a method:
    public static void floatArg (float arg2){
        System.out.println("floatArg"+arg2);
    };

and I try to call it from graal.js via interop:
Util.floatArg(1); // OK
Util.floatArg(2.0); // OK
Util.floatArg(16777215.0); // OK
Util.floatArg(1.1); // UnsupportedTypeException, why?
Util.floatArg(16777216.0); // UnsupportedTypeException, why?
Util.floatArg(21474836); // UnsupportedTypeException, why?
Util.floatArg(9223372036854775800); // call succeeds, despite a lossy conversion!

I don't understand what is the logic behind throwing UnsupportedTypeException - why some values are accepted and others don't? I thought it might be something with IEEE754 spec and only calls for values that can be losslessly converted from double to float are allowed. But this hypothesis doesn't seem to hold, see last example.

Hi @tporeba
in general, we are very wary of (potential) lossy conversions. However, you uncover some cases where I need to take an additional look.
You have to take care what the parser actually makes from your code. Even though 16777215.0 is written as a double value, the engine converts it to a java.lang.Integer immediately. This is the reason why 2.0 and 16777215.0 work fine.
We have a problem with 16777216.0 and 21474836 though. There seems to be a bug in our implementation that fails to convert them properly to float - although it works fine if I force them into a double type!
9223372036854775800 is another problem: this loses some digits already when parsed, even without any Java involved. I still need to check why this can be converted to float, as there seems to be another lossy conversion.
Best,
Christian

Some confusion might come from the fact that we dynamically check the lossy-ness of a value.

For Integers, we compare whether they are larger than 2^24-1. Both 16777216.0 and 21474836 are, so not convertable to float.
For Doubles, we actually convert them to a float and check the result, basically d == (float)d. If that is true, we allow the conversion. That is the case for<PHONE_NUMBER>854775800, but not for 1.1 (try in Java: double d = 1.1; d==(float)d;). Also, if you force the above integer values into a double value, than they ARE convertable.

To me, this differentiation makes sense from a Java point of view, but is confusing for JavaScript, as we somewhat mix Doubles and Integers here.

The inconsistency between integer and double is fixed by
https://github.com/oracle/graal/commit/266418094c8f175da5fe5283905d5e9799ab6d84 - in the future, we allow the conversion to float is without loss according to Java's == operator.
This will result in your 5th and 6th test to pass as well. The 4th test (1.1) will still fail, and the 7th test will still pass (see my first comment).
This will only be part of GraalVM JavaScript as of version 20.2. unfortunately.


Fullscreen button is throwing errors

js error
_toggleFullScreen@http://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/3.7.31/javascripts/cdb.js 18:28814  Source
[native code]
dispatch@http://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/3.7.31/javascripts/cdb.js 2:9602  Source
h@http://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/3.7.31/javascripts/cdb.js 2:5517  Source
<EMAIL_ADDRESS>3:497
dispatchEvent@[native code]
_simulateEvent@http://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/3.7.31/javascripts/cdb.js 10:14476  Source
_onUp@http://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/3.7.31/javascripts/cdb.js 10:14054  Source
f@http://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/3.7.31/javascripts/cdb.js 8:29305

@alonsogarciapablo is you can check it with him or in your own, perfect too :).

Sorry guys, but I was ill yesterday and I couldn't check it.
@alonsogarciapablo did you check anything about it?
@xavijam , I've checked that those error is happening with iPhone (Safari Mobile / iOS 8.2).
Also, could be this fix related? I did it last week, but I couldn't test it with iPhone.

Hello Xatpy. I missed this yesterday too. Do you need some help?

I've been trying to replicate it, but I couldn't.
I've tried with Chrome 41.0.2272.101 / Safari 8.0.2 (10600.2.5) / Firefox (36.0.1) on OSX Yosemite 10.10.1; and Chrome/Android. Also, I did a quick test with iOS7/Safari, but it was quick because it was my girlfriends' phone and she has to go earlier.
@alonsogarciapablo Do you have an iOS 8? If so, could you test it?
@xavijam , The weird thing that I see here is: if it's a mobile, the fullscreen shouldn't be available. I tested it. So, I don't know how the user could click on fullscreen :confused:

I don't have iOS 8 :-(

Trying to test with this link (forcing mobile to false)

Closed with commit fc91c2bfc2762b71b394777efcb42a3b2075a419


[Python] Clean up ExtensionType.reduce

Describe the enhancement requested
Currently __reduce__ method is defined on the ExtensionType class so that each subclass can be pickled and doesn't need a separate __reduce__ method (see https://github.com/apache/arrow/pull/36170).
But this can be cleaned up. Instead of defining __reduce__ for ExtensionType we can define __reduce__ on BaseExtensionType and make use of the C++-level (de)serialization. See https://github.com/apache/arrow/pull/35933#issuecomment-1841014923.
Component(s)
Python

The way we would do it is like in IPC: serialize the extension name and the extension serialized form.
Then on deserialization (in C++):

first get the extension type from its name using GetExtensionType
then deserialize the actual instance using ExtensionType::Deserialize

Ah, yes of course, just serialize the name and get the instance from the registry based on the name

However, that then only works for registered extension types. I don't know if we are OK with that restriction. In a Python session you could also be working with an ExtensionType that hasn't been registered.

That's a good point, I'm not sure which is better here.


HDF5DataSet subset (formerly index)

renamed and fixed issues regarding this parameter

@gcroci2 , does it automatically update my pull request with the new stuff or do I need to do something?

@gcroci2 , does it automatically update my pull request with the new stuff or do I need to do something?

It does it automatically when you commit to the branch of the PR :)

You can also see your last commit above "added unit test for subset parameter" @DaniBodor

OK!
Was I supposed to have created a separate branch and PR from this one, so that you can quickly check what has changed?
I guess because it was only few small changes it's fine, but for bigger changes would that make sense?

OK! Was I supposed to have created a separate branch and PR from this one, so that you can quickly check what has changed? I guess because it was only few small changes it's fine, but for bigger changes would that make sense?

In general, if the changes are related to the same issue/PR it's fine to commit them in the same branch/PR, like you did.


Switch to agreed upon Valkyrie status and command channels

Switches command message type back to atlas_command_t until we finalize robot_command_t
Switches channel names to agreed upon in #7, and cuts out pronto types. Duplicates mav_ins_t into drc to help do this.

I'm not at a workstation where I can test this, though I have tested that it can build. The only part I'm a bit concerned about is the switch to parse atlas_command_ts into commands in the translator plugin. I can get this tested in the morning, but my mornings start later than yours...


parseJSDocCommentWorker: Don't need result

scanRange supports returning a result directly.

Test failure fixed by #25199


Property chain concretizes_at_some_time o specifically_depends_on_at_some_time

From<EMAIL_ADDRESS>on July 08, 2012 05:52:30
Suggestion:
concretizes_at_some_time o specifically_depends_on_at_some_time
-> generically_depends_on_at_some_time
Alternative:
Add axiom:
generically_dependent_continunant subclassOf
generically_depends_on_at_some_time some independent_continuant
Original issue: http://code.google.com/p/bfo/issues/detail?id=86

From<EMAIL_ADDRESS>on July 09, 2012 01:12:48
we don't have specifically_depends_on_at_some_time (only at all times)
also, I'm not sure that compositions like: at some time o at some time < at some time work as the times might not align.
I added
has-s-dep_st o concretizes_at < has-g-dep_st
has-s-dep_at o concretizes_at < has-g-dep_at
Please close if satisfactory
Status: Started
Labels: -Type-BFO2-Reference Type-BFO2-OWL

From<EMAIL_ADDRESS>on July 09, 2012 21:32:14
Status: Submitter-Review


Play, pause and shuffle are always enabled

Open media-sample
Observe "Nothing playing" at the top
Try pressing play
Observe that the button is enabled, but shouldn't be

This probably shouldn't happen: there's nothing to play, so the button should be disabled. This is also a PlayerUiState issue, not a compose issue and I suspect that ExoPlayer is advertising COMMAND_PLAY_PAUSE and COMMAND_SET_SHUFFLE_MODE even if there's nothing to play.
We should look into additional logic here, possibly checking if the player has any media items available.

@fstanis If we confirm it's ExoPlayer, we should ask about it. Raise a bug, before blindly fixing assuming it's our fault.
It could be a bug over MediaController, but not direct ExoPlayer.

I discussed this with the ExoPlayer team yesterday. The situation is a bit more complex.
COMMAND_PLAY_PAUSE and COMMAND_SET_SHUFFLE_MODE refer to the ability to change the value of playWhenReady and shuffleModeEnabled respectively. This is practically always possible, so these commands are always available.
What we (presumably) care about in the UI is whether "play" will eventually result in playing anything. This is only true if playbackState is in STATE_READY or STATE_BUFFERING. However, it's only possible to reach this state after calling prepare() and we currently do that when play is pressed, meaning our current implementation doesn't allow for knowing whether playing something is possible until we try.
The correct approach seems to be:

Call prepare() more eagerly, possibly any time media is added / removed from the Player
Disable play/pause unless the player is in STATE_BUFFERING or STATE_READY

After exploring this further, I think we need some clearer guidelines on when to call prepare().
Most notably, the play button in media apps often means "retry" when an error happens. However, errors will kick the player into STATE_IDLE, which would disable the play button if we implement the solution from my previous comment, making it impossible to retry playback (which requires another prepare()).
Perhaps a better option is to check player.currentTimeline.isEmpty to determine is play should be enabled and keep the current prepare() + play() behavior of the play button.


About doom-nord dark theme

This is query regarding this line, https://github.com/hlissner/emacs-doom-themes/blob/master/themes/doom-nord-theme.el#L54
Is there any specific reason using darkish color ("#2d2d2d") for Foreground when terminal is term-256 supported?
This setting give me all darkish color when I am using my emacs as terminal one.

Good catch. This appears to have been an oversight. As of d385615 this should be fixed. Let me know if that isn't the case and I'll reopen this.
Thanks for letting me know!


Dagger error

Got this error while running core unit tests locally
#8 [3/5] COPY /core /core
#8 ERROR: write /var/lib/buildkit/runc-overlayfs/metadata_v2.db: read-only file system
input:1: container.build.withMountedDirectory.withWorkdir.withExec.exitCode Unavailable: error reading from server: command [docker exec -i dagger-engine-41f71f0036167fcc buildctl dial-stdio] has exited with exit status 137, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=

are you still having this error? should we close this now?

no recent mention of this issue. closing.


Unsubscribe ApolloObservable subscriptions on ngOnDestroy

I think angular2-apollo is not automatically unsubscribing from queries on ngOnDestroy (React componentWillUnmount), there as react-apollo is doing this. I guess unsubscribing is an important feature to avoid fetching data which is not needed any more.
I run into problems with this, implementing an app logout. I tried to reset the apolloStore to avoid that one users should not see data from previous user.  (Right now I work around by reloading the page.) @helfer came up with the suggestion to use apolloclient.resetStore which currently is not exposed through angular2-apollo (which I expose through my service providing apollo). However resetStore refetches all previously fired queries. This results in the problems and errors and an hangup of ng2 since the user is unauthorized and therefore gets an 401 unauthorized message.
Or is there any other best practice to clear the store?
Discussion on apollo-client https://github.com/apollostack/apollo-client/issues/1075

@manuelfink

I think angular2-apollo is not automatically unsubscribing from queries on ngOnDestroy (React componentWillUnmount), there as react-apollo is doing this. I guess unsubscribing is an important feature to avoid fetching data which is not needed any more.

You're right, there's no unsubscribe on ngOnDestroy. Here's why. Since Angular2Apollo is a service it cannot interact with your component's lifecycle automatically. In react-apollo they manipulate the component to assign values to properties on each Apollo's QueryObservable emission. We did the same in the decorator, but we deprecated it some time ago. BTW, this decorator will be back very soon :)
About the service. The Angular2Apollo service works the same as Http from @angular/http.
I exposed instance of ApolloClient in #220. It will be available in 0.9.0-rc.1, today!

Okay, 0.9.0-rc.1 is now available


Failed to fetch https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages.gz  File has unexpected size

Description
Just like in https://github.com/dotnet/core/issues/9276 and https://github.com/orgs/community/discussions/121059, we have been experiencing this issue randomly since yesterday (24 April, 2024).

E: Failed to fetch https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages.gz  File has unexpected size (8078 != 8155). Mirror sync in progress? [IP: <IP_ADDRESS> 443]
Hashes of expected file:
- Filesize:8155 [weak]
- SHA512:c2a3e7edbc44eac190f8df014238d836992b1300d52ac5eed89dc9cc571c1e35623a281e9544649418ec167a854f707a407f3c252076282fe3ba61049f835cd3
- SHA256:41e205cfa4dc4dce04cc0ed0cae41245955ba6f49fcd331d55a712e97c4a8bf8
Release file created at: Thu, 18 Apr 2024 18:02:47 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

Regression?
Seems like faulty Mirror links.

This seems like dupe of https://github.com/microsoft/linux-package-repositories/issues/130
It should be resolved now, I'll close this.
If you still experience the issue, feel free to let us know.

@ManickaP It has been working fine for a while, but the error has returned in the past few days:

W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease  Error reading from server - read (104: Connection reset by peer) [IP: 151.101.50.xxx xx]
75 | E: Failed to fetch http://deb.debian.org/debian/dists/bullseye/main/binary-amd64/Packages  Connection timed out [IP: 151.101.50.xxx xx]

That's Debian server, not Microsoft though.


[Parsers] - error for not supportable Db dialect

Add exception if a given DB is not supported in processors.
For example if we provide postgress Syntax in .hdbview file the processor should noh have set version of the hana and an error should be thrown that we are not supporting this DB  dialect.
Check the XSKViewCreateProcessor.

Fixed with https://github.com/SAP/xsk/pull/242 and https://github.com/SAP/xsk/pull/228


Ordering not implemented for FixedSizeBinary types

As the subject says. This is mostly a placeholder for an associated PR.

label_issue.py automatically added labels {'arrow'} from #2905


Are the provided renderings from Shapenet v1 or v2?

Hi @chrischoy,
I was wondering if you rendered Shapenet v1 or v2 ?
Cheers and thanks,
Thibault

According to the PyTorch3D documentation, ShapeNetCore.v1 were rendered in this paper. Also, considering that V2 was released in Fall 2016, and this paper was published in ECCV'16 whose deadline was in March 2016, I would say it is V1.


Banlist docs

Adds docs under server settings of how banlist.txt works
Closes #99
Closes #141

GitHub was being annoying with allowing me to commit via suggestion, feel free to add yourself as a co author @GeckoEidechse


Broadcast v1 doesn't work with target_shape

Hi,
I found that broadcast v1 doesn't work for some cases when I use constructor with target_shapes.
I added a reproducer for this issue: #3880
Could you please take a look?

Fix is now in #3880

LGTM


update security workflow

Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Welcome to Codecov :tada:
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella:


Before & After: Should not throw an exception if the value is empty.

Hey, I have a validator rule like this:
$validator->make($_POST,     'dateOfBirth'=>'date:Y/m/d|before:today' );
As you can see, the date field is not required, it is optional, but if someone wants to enter it, it must be in the given format and before today. The problem is when the user leaves the field empty, we get an error that says:
... Argument #1 ($date) must be of type string, null given, called in ...
So you get the point. I am pretty sure we should leave checking the value for empty/null values for the "required" rule and return true if the field is empty, in "before and after" rules.

I think the logic is correct.
You doesn't require the field but you don't say it is optional. Use "nullable" if it is not required. Then the validation bails is the field is empty.


No module named 'dgl.contrib'

Hi,
I installed deepvelo but it gives me error when I import it in python:
============================================================
ModuleNotFoundError                       Traceback (most recent call last)
 in
----> 1 import deepvelo
/opt/conda/lib/python3.8/site-packages/deepvelo/init.py in
----> 1 from .train import *
/opt/conda/lib/python3.8/site-packages/deepvelo/train.py in
7 from scvelo import logging as logg
8
----> 9 import deepvelo.data_loader.data_loaders as module_data
10 import deepvelo.model.loss as module_loss
11 import deepvelo.model.metric as module_metric
/opt/conda/lib/python3.8/site-packages/deepvelo/data_loader/data_loaders.py in
7 import dgl
8 import hnswlib
----> 9 from dgl.contrib.sampling import NeighborSampler
10 from torch.utils.data import Dataset
11 from sklearn.metrics import pairwise_distances
ModuleNotFoundError: No module named 'dgl.contrib'
I think I installed dgl properly and I can import dgl in python without any issue.
I found the class NeighborSampler is under dgl.dataloading:
https://docs.dgl.ai/en/1.1.x/generated/dgl.dataloading.NeighborSampler.html
Which dgl version would you recommend for deepvelo? Or would deepvelo be compatible with the latest dgl soon?
Thank you very much,
Yun-Ching

Hi @Yun-Ching-Chen , thank you for the question!
I would suggest using dgl>=0.4.3,<0.8.0. We haven't tested the later dgl versions. Please let me know how it works

Hi @subercui , thank you for developing DeepVelo. I encountered some problems during installation. I tried to intall 'dgl>=0.4.3,<0.8.0', but it failed.
ERROR: Could not find a version that satisfies the requirement dgl<0.8.0,>=0.4.3 (from versions: 0.1.0, 0.1.2, 0.1.3, 0.8.0.post1, 0.9.0, 0.9.1, 1.0.0, 1.0.1, 1.0.4, 1.1.0, 1.1.1, 1.1.2, 1.1.3)
ERROR: No matching distribution found for dgl<0.8.0,>=0.4.3

Hi @WeipengMO, which version of python are you using? Could you please retry with python 3.7, 3.8, or 3.9?

Hi @WeipengMO, which version of python are you using? Could you please retry with python 3.7, 3.8, or 3.9?

Hi @hsmaan , I have tried to re-install deepvelo in python3.9 env, it worked. However, It does not support calling the GPU.
# initial velocity
velocity(adata, mask_zero=False)
trainer = train(adata, configs)

computing velocities
/home/mowp/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/utils/optimization.py:167: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  gamma[i] = np.linalg.pinv(A.T.dot(A)).dot(A.T.dot(y[:, i]))
    finished (0:00:00) --> added
    'velocity', velocity vectors for each individual cell (adata.layers)
Config Warning: Set to use GPU, but GPU version of DGL is not installed. Reset to use CPU instead.
Warning: logging configuration file is not found in logger/logger_config.json.
building graph
INFO:train:Beginning training of DeepVelo ...
WARNING:trainer:Warning: visualization (Tensorboard) is configured to use, but currently not installed on this machine. Please install TensorboardX with 'pip install tensorboardx', upgrade PyTorch to version >= 1.1 to use 'torch.utils.tensorboard' or turn off the option in the 'config.json' file.
velo data shape: torch.Size([2930, 2000])
confidence mse shape: (2930, 2000)
confidence mse stats: max 2751.32080078125, min 0.0, mean 0.1709362268447876, std 5.503781795501709
confidence corr shape: (2000,)
confidence corr stats: max 0.9785177111625671, min -0.4764111340045929, mean 0.5344014763832092, std 0.16993308067321777
velo_mat shape: (2930, 2000)
--> added 'velocity' (adata.layers)
--> added 'velocity_unspliced' (adata.layers)
--> added 'cell_specific_beta' (adata.layers)
--> added 'cell_specific_gamma' (adata.layers)

Then, I re-tried to  intall 'dgl>=0.4.3,<0.8.0', but it got the same error:
OSError                                   Traceback (most recent call last)
Cell In[3], [line 1](vscode-notebook-cell:?execution_count=3&line=1)
----> [1](vscode-notebook-cell:?execution_count=3&line=1) import deepvelo as dv
      [2](vscode-notebook-cell:?execution_count=3&line=2) import scvelo as scv
      [3](vscode-notebook-cell:?execution_count=3&line=3) import scanpy as sc

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/__init__.py:1](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/__init__.py:1)
----> [1](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/__init__.py:1) from .train import *
      [3](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/__init__.py:3) from . import tool as tl
      [4](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/__init__.py:4) from . import plot as pl

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:9](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:9)
      [6](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:6) from anndata import AnnData
      [7](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:7) from scvelo import logging as logg
----> [9](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:9) from deepvelo.trainer import Trainer
     [10](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:10) import deepvelo.data_loader.data_loaders as module_data
     [11](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/train.py:11) import deepvelo.model.loss as module_loss

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/__init__.py:1](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/__init__.py:1)
----> [1](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/__init__.py:1) from .trainer import *

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:5](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:5)
      [3](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:3) from numpy import inf
      [4](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:4) import torch
----> [5](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:5) import dgl
      [7](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:7) # from torchvision.utils import make_grid
      [8](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/deepvelo/trainer/trainer.py:8) from deepvelo.base import BaseTrainer

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:13](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:13)
     [10](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:10) import socket
     [12](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:12) # Should import backend before importing anything else
---> [13](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:13) from .backend import load_backend, backend_name
     [15](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:15) from . import function
     [16](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/__init__.py:16) from . import contrib

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:95](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:95)
     [91](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:91)         set_default_backend('pytorch')
     [92](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:92)         return 'pytorch'
---> [95](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:95) load_backend(get_preferred_backend())
     [98](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:98) def is_enabled(api):
     [99](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:99)     """Return true if the api is enabled by the current backend.
    [100](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:100)
    [101](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:101)     Parameters
   (...)
    [109](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:109)         True if the API is enabled by the current backend.
    [110](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:110)     """

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:41](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:41), in load_backend(mod_name)
     [38](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:38) else:
     [39](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:39)     raise NotImplementedError('Unsupported backend: %s' % mod_name)
---> [41](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:41) from .._ffi.base import load_tensor_adapter # imports DGL C library
     [42](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:42) version = mod.__version__
     [43](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/backend/__init__.py:43) load_tensor_adapter(mod_name, version)

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:44](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:44)
     [42](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:42) __version__ = libinfo.__version__
     [43](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:43) # library instance of nnvm
---> [44](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:44) _LIB, _LIB_NAME, _DIR_NAME = _load_lib()
     [46](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:46) # The FFI mode of DGL
     [47](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:47) _FFI_MODE = os.environ.get("DGL_FFI", "auto")

File [~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:34](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:34), in _load_lib()
     [32](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:32) """Load libary by searching possible path."""
     [33](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:33) lib_path = libinfo.find_lib_path()
---> [34](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:34) lib = ctypes.CDLL(lib_path[0])
     [35](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:35) dirname = os.path.dirname(lib_path[0])
     [36](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/site-packages/dgl/_ffi/base.py:36) basename = os.path.basename(lib_path[0])

File [~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:382](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:382), in CDLL.__init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    [379](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:379) self._FuncPtr = _FuncPtr
    [381](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:381) if handle is None:
--> [382](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:382)     self._handle = _dlopen(self._name, mode)
    [383](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:383) else:
    [384](https://untitled+.vscode-resource.vscode-cdn.net/~/mambaforge/envs/scrna/lib/python3.9/ctypes/__init__.py:384)     self._handle = handle

OSError: libcudart.so.10.1: cannot open shared object file: No such file or directory

Here is my session info:
Package            Version
------------------ ------------
adjustText         0.7.3
anndata            0.10.5.post1
array_api_compat   1.4.1
asttokens          2.0.5
backcall           0.2.0
certifi            2023.11.17
cffi               1.16.0
charset-normalizer 3.3.2
click              8.1.7
comm               0.1.2
cycler             0.12.1
debugpy            1.6.7
decorator          5.1.1
deepvelo           0.2.8
dgl-cu101          0.6.1
exceptiongroup     1.2.0
executing          0.8.3
fonttools          4.47.2
get-annotations    0.1.2
h5py               3.10.0
hnswlib            0.6.2
idna               3.6
igraph             0.9.11
importlib-metadata 7.0.1
ipykernel          6.28.0
ipython            8.15.0
jedi               0.18.1
Jinja2             3.1.3
joblib             1.3.2
jupyter_client     8.6.0
jupyter_core       5.5.0
kiwisolver         1.4.5
llvmlite           0.42.0
loompy             3.0.7
MarkupSafe         2.1.3
matplotlib         3.5.3
matplotlib-inline  0.1.6
natsort            8.4.0
nest-asyncio       1.5.6
networkx           3.2.1
numba              0.59.0
numpy              1.26.3
numpy-groupies     0.10.2
packaging          23.1
pandas             2.2.0
parso              0.8.3
patsy              0.5.6
pexpect            4.8.0
pickleshare        0.7.5
pillow             10.2.0
pip                23.3.1
platformdirs       3.10.0
prompt-toolkit     3.0.43
psutil             5.9.0
ptyprocess         0.7.0
pure-eval          0.2.2
pycparser          2.21
Pygments           2.15.1
pynndescent        0.5.11
pyparsing          3.1.1
python-dateutil    2.8.2
pytz               2023.3.post1
pyzmq              25.1.2
requests           2.31.0
rpy2               3.5.11
scanpy             1.9.6
scikit-learn       1.4.0
scipy              1.12.0
scvelo             0.2.5
seaborn            0.11.2
session-info       1.0.0
setuptools         68.2.2
simplegeneric      0.8.1
six                1.16.0
stack-data         0.2.0
statsmodels        0.14.1
stdlib-list        0.10.0
tbb                2021.11.0
texttable          1.7.0
threadpoolctl      3.2.0
torch              1.12.1
tornado            6.3.3
tqdm               4.66.1
traitlets          5.7.1
typing_extensions  4.9.0
tzdata             2023.4
tzlocal            2.1
umap-learn         0.5.4
urllib3            2.2.0
wcwidth            0.2.5
wheel              0.41.2
zipp               3.17.0

Hi @WeipengMO, apologies for the late response. This looks like a cuda toolkit mismatch to me, but could you please provide the following further info:

Which cuda version of dgl did you install?
Which cuda version is supported on your system?

Thanks for you reply. The cuda version of dgl I installed is dgl-cu101 (0.6.1), and the cuda version of my system is 12.0.

I see, can you try installing cudatoolkit 10.1 and trying again?
The easiest way would be to create a conda environment, install cudatoolkit 10.1 (https://anaconda.org/conda-forge/cudatoolkit/files - you can find the 10.1 file here), and then reinstalling DeepVelo after activating the conda env (ensuring that the python versioning is still restricted to that mentioned above in the conda env).
Could you please try this and let me know if it works? Thanks.


Specify custom machine type while Compute instance creation

We want to use custom machines type while creating new compute instances with a specific number of CPUs and size of memory: https://github.com/JetBrains/teamcity-google-agent/issues/9
But at the moment I could not figure out how to create custom machine type for that. Currently to configure instance we're using the following code fragment.
Could you please share the code fragment for that?

The custom machine type could be created like that:
MachineTypeId.of(zone, "custom-4-5120")

where will be allocated 4 vCPUs and 5 GB (5120 MB) of memory.


[DOC] Fix migration guide document

Description
Fix malformatted tables
Checklist
Essentials

[ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage
[ ] Code is well-documented

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

@mxnet-bot run ci [centos-cpu, unix-cpu, windows-gpu]

@mxnet-bot run ci [centos-cpu, unix-cpu, windows-gpu]

@mxnet-bot run ci [unix-cpu]

@mxnet-bot run ci [unix-cpu, windows-gpu]


Suppress HTTP/2 negotiation without SSL/TLS (h2c)

SSLsplit should suppress the Upgrade: request header (h2c, h2) in order to suppress upgrading a connection to HTTP/2. In theory this should only happen for HTTP, not HTTPS (NPN/ALPN are used for negotiation there), but in practice we may as well suppress the header in HTTPS too.
Note that websockets uses the Upgrade: header too; think about how to handle that.
See #89 for general HTTP/2 support.

Since the rudimentary HTTP parsing currently implemented does not support WebSockets anyway, completely remove Upgrade: and corresponding Connection: upgrade headers. The latter was already suppressed as a side-effect of suppressing Connection: keepalive.


Splitting channels with t frames

For example, I have  a 210 frames video and t = 20 then input is created such that each input is made of 58x58x20 but the last one will be of 58x58x10. Could you tell me how was this case considered?

You mean for training or testing? For training, we ensure to choose a random clip with enough frames to avoid this:
https://github.com/gulvarol/ltc/blob/master/donkey.lua#L42
For testing, according to your example, we take the last 20 frames (191-210) of the video, overlapping the first 10 with the previous clip, as this line does:
https://github.com/gulvarol/ltc/blob/master/donkey.lua#L51
As an extra note, if there is not enough frames in the entire video, we pad by copying the video.
"If the number of frames in a video is less than the clip size, we pad the input by repeating the last frames to fill the missing volume." (Section 3.3)
https://github.com/gulvarol/ltc/blob/master/donkey.lua#L78
I don't think these make a big difference in the final results.

I could get the testing part but in the training phase, if there are 200 frames and t = 20, only 20 frames of the 200 frames clip is considered? Correct me if I am wrong :)

No we sample a random starting frame between 1 and 191, so we use all frames.
math.ceil(torch.uniform(1e-2, N-loadSize[2]+1))
N = 210
loadSize[2] = 20
The interval becomes [1, 191]


Front-end refactor

Redoing front end to promote better coding practices

almost all components refactored with commit https://github.com/yashtibrewal/leechcode/commit/542516b737fed87974db47025766b77f704facbb


Webpack build breaks with latest release

We're getting an error after building our bundle with webpack:
Cannot set property 'of' of undefined
this function minified breaks:
function createOfPredicates (key) {
    predicates[key].of = createModifiedFunctions(
      [ ofModifier.bind(null, null), predicates[key], predicates, null ]
    );
  }

after logging we found it doesn't find the key 'array'
when not compiled, everything works fine.
rolling back to version 7.0.1 fixes it.

Mea culpa!
I updated the minifier dependency and failed to test the minified output, sorry. But I just published 7.1.1, which should fix it for you. Let me know how it goes!

Unfortunately it didn't solve our problem because we are compiling the library from the unminified version.
But it helped us to find out what was the issue.
We also had to change our webpack config to set mangle to false.
thanks for the quick help!

Hmmm, interesting. Going to see if I can mess with the code a bit to make the name mangling work sanely.

@bodymovin, I've reverted the change I made that broke name-mangling and published a new release. If you build with version 7.1.2, you should be able to revert your webpack config to what it was previously.

working, thanks.


Received malformed response from registry for env-cmd

Hi,
I'm getting the above issue while installing the packages using the Yarn. Please help me with this issue.
Thanks a lot in advance

Hey, this error is caused by network issues, it's not an issue with this library itself


Convert existing native histogram unit tests to the PromQL testing framework

Proposal
The PromQL testing framework has been upgraded to support native histograms, but we still have a lot of histogram tests written as code level unit tests that we can now convert into much simpler tests within the PromQL testing framework.
In other words: More tests need to be added to https://github.com/prometheus/prometheus/blob/main/promql/testdata/histograms.test that do exactly the same as the following unit tests (which we can then delete):

[x] TestNativeHistogramRate
[x] TestNativeFloatHistogramRate
[x] TestNativeHistogram_HistogramCountAndSum
[x] TestNativeHistogram_HistogramStdDevVar
[x] TestNativeHistogram_HistogramQuantile
[x] TestNativeHistogram_HistogramFraction
[ ] TestNativeHistogram_Sum_Count_Add_AvgOperator
[ ] TestNativeHistogram_SubOperator
[ ] TestNativeHistogram_MulDivOperator

@zedGGs might be interested in this.
I recommend to pick a single unit test first and convert it to get familiar with the procedure.

I would like to work on this one. Can you please assign it to me?

Thanks. I have assigned this to you. Let me know if you have any questions.

Thanks for assigning it to me!
I'll first try to convert TestNativeHistogramRate and after verification I'll move with other tests.

@beorn7 more precisely the test are to be added to https://github.com/prometheus/prometheus/blob/main/promql/testdata/native_histograms.test right?

Yes. And then delete the corresponding Go unit test code.

Three tests are left to convert, see TODO list at the top. @NeerajGartia21 are you planning to convert them, too?

Yes, @beorn7. I was busy because of my onboarding process but I'll convert it ASAP.

@NeerajGartia21 are you still planning to work on this?

@beorn7 I would like to take this issue, if @NeerajGartia21 do not have time now.

With no message from @NeerajGartia21 , assigning this to @fatsheep9146 .

When I tried to convert TestNativeHistogram_Sum_Count_Add_AvgOperator into framework, I came up with two problems

sum operator

when evaluating the expression sum(histogram_sum), the result we get just looks the same as expected, but the test are still failed with following error.

Error: Received unexpected error:
error in eval sum(histogram_sum) (line 9): expected {{count:107 sum:4691.2 z_bucket:14 z_bucket_w:0.001 buckets:[3 8 2 5 3 2 2] n_buckets:[2 6 8 4 15 9 0 0 0 10 10 4]}} for {} but got {{count:107 sum:4691.2 z_bucket:14 z_bucket_w:0.001 buckets:[3 8 2 5 3 2 2] n_buckets:[2 6 8 4 15 9 0 0 0 10 10 4]}}

After digging into this, I found the different between actual result and expected result happened on negative spans, the expected negative spans will be Compact here before comparing with actual result. So the expected negative spans is [{0 6} {3 3}], and the actual negative spans is [{0 12}].
So I think the actual results should also be compacted with Compact(0) before comparing.

avg, sum_over_time and avg_over_time operator

Those three operator sometimes will produces unexpected float number for native histogram's sum or buckets, for example,

error in eval avg(histogram_sum) (line 20): expected {{count:26.75 sum:1172.8 z_bucket:3.5 z_bucket_w:0.001 buckets:[0.75 2 0.5 1.25 0.75 0.5 0.5] n_buckets:[0.5 1.5 2 1 3.75 2.25 0 0 0 2.5 2.5 1]}} for {} but got {{count:26.75 sum:1172.7999999999997 z_bucket:3.5 z_bucket_w:0.001 buckets:[0.75 2 0.5 1.25 0.75 0.5 0.5] n_buckets:[0.5 1.5 2 1 3.7499999999999996 2.25 0 0 0 2.5 2.5 1]}}

The expected sum should be 1172.8, not 1172.7999999997, this situation does not necessarily occur; it only happens occasionally. I still do not know why. But I thinks we could enhance the by comparing the field of float type with Almost.Equal(), which could toleration some tiny diff between two floats.
I already make some test for these two ways of enhancing the comparing logic of two native histogram, it worked.
@beorn7

So I think the actual results should also be compacted with Compact(0) before comparing.

Sounds like it. Feel free to change the code of the testing framework accordingly.
About the floating point precision issues: We noted that behavior already. For float values, the testing framework already leverages Almost.Equal(). It's much more complicated to do the same for native histograms, so we postponed that enhancement until we would run into floating point precision problems. That has happened now. Much appreciated if you would like to work on it.

In different news: @NeerajGartia21 is also back in action, so maybe you could divide the work between the two of you or help each other with code reviews and such.

@NeerajGartia21 Welcome back! Right now I'm working on the [TestNativeHistogram_Sum_Count_Add_AvgOperator](https://github.com/prometheus/prometheus/blob/8655fe5401c79e1fc176ca8b4644db04462dc9f5/promql/engine_test.go#L4193C6-L4193C51) and [TestNativeHistogram_SubOperator](https://github.com/prometheus/prometheus/blob/8655fe5401c79e1fc176ca8b4644db04462dc9f5/promql/engine_test.go#L4388C6-L4388C37), and both meet some problems about testing framework. And already submit the pr for TestNativeHistogram_Sum_Count_Add_AvgOperator, feel free to pick anyone you are interested in, I will help review the code.

So I think the actual results should also be compacted with Compact(0) before comparing.

Sounds like it. Feel free to change the code of the testing framework accordingly.
About the floating point precision issues: We noted that behavior already. For float values, the testing framework already leverages Almost.Equal(). It's much more complicated to do the same for native histograms, so we postponed that enhancement until we would run into floating point precision problems. That has happened now. Much appreciated if you would like to work on it.

Alright! I will try to enhance the framework in the same pr. @beorn7

@NeerajGartia21 Welcome back! Right now I'm working on the TestNativeHistogram_Sum_Count_Add_AvgOperator and TestNativeHistogram_SubOperator, and both meet some problems about testing framework. And already submit the pr for TestNativeHistogram_Sum_Count_Add_AvgOperator, feel free to pick anyone you are interested in, I will help review the code.

Cool! Thanks @fatsheep9146 ! I'll look into the last one then.

@beorn7 @fatsheep9146 currently promql testing framework doesn't support Inf and NaN in histogram buckets. And in the tests for div we need this. Should I create a separate PR for this or do it in the same PR?

Wasn't the plan that all buckets get removed if you divide by 0?
 And then I could do the same to do -Inf. And then I could add the one histogram to the other to create NaN buckets.
So in short, yes, the testing framework should be able to create and test bucket populations that are ±Inf or NaN.

Wasn't the plan that all buckets get removed if you divide by 0?

Yes, that's the plan but since I'm replicating the current tests, and in the current one the bucket elements becomes Inf.
Also I've added Inf and NaN as numbers in histogram buckets in #14688 @beorn7 and @fatsheep9146 please review that.

Wasn't the plan that all buckets get removed if you divide by 0?

Yes, that's the plan but since I'm replicating the current tests, and in the current one the bucket elements becomes Inf.
Also I've added Inf and NaN as numbers in histogram buckets in https://github.com/prometheus/prometheus/pull/14688 @beorn7 and @fatsheep9146 please review that.

I think we are done here. I'll close it, but if anyone finds a test that should be converted but isn't yet, please follow up.
Thanks, everyone involved, for all your work.


Oops, your response got filtered. Vote down if you think this shouldn't have happened.

VS Code Version:
OS Version:
Logs:

Steps to Reproduce:

Ask any question on copilot

Have been having the same issue as well

Please include your logs via CMD / CTRL + SHIFT + U -> Copilot Chat

Extension version: v0.7.1
2024-03-18T16:22:06.382Z [INFO] [chat] copilot token chat_enabled: true
2024-03-18T16:22:06.384Z [INFO] [auth] Got Copilot token for MaxRev-Dev
2024-03-18T16:26:42.574Z [INFO] [chat fetch] engine https://copilot-proxy.githubusercontent.com/v1/chat
2024-03-18T16:26:42.574Z [INFO] [chat fetch] modelMaxTokenWindow 4096
2024-03-18T16:26:42.574Z [INFO] [chat fetch] chat model copilot-chat
2024-03-18T16:26:42.844Z [INFO] [chat fetch] request.response: [https://copilot-proxy.githubusercontent.com/v1/chat/completions], took 269 ms
2024-03-18T16:26:42.845Z [ERROR] [chat fetch] Unhandled status from server:,404,404 page not found

@lramos15

Closing due to lack of info