Implement functionality for direct use of composite signature algorithms

The following API groups are extended with a new init function, as well
as an update and final function, to allow the use of explicitly fetched
signature implementations for any composite signature algorithm, like
"sha1WithRSAEncryption":

EVP_PKEY_sign
EVP_PKEY_verify
EVP_PKEY_verify_recover

To support this, providers are required to add a few new functions, not
the least one that declares what key types an signature implementation
supports.

This is based on the design in #22672.

Pending: modifications of our providers to support known composite algorithms, along with tests

The algorithm lifecycle documentation will also need adjusting in doc/life-cycles/ and doc/man7/img/.

For proof of concept, RSA+hash support for EVP_PKEY_{sign,verify}_for_digest() and EVP_PKEY_{sign,verify}_for_message() is now nicluded, but remains untested and most probably buggy.  EdDSA has already been extended to support at least EVP_PKEY_{sign,verify}, and can be extended further...  and is equally untested.
Other algorithms will get the same kind of additions, but in a subsequent PR, so as not to make this one larger.
There is example code in the doc/man3/EVP_PKEY_sign.pod and doc/man3/EVP_PKEY_verify.pod that at least shows the intended use.  If someone feels adventurous, feel free to try things out.
I will try to extend test/evp_test.c to accomodate this new functionality.

Haha!  I've got a simple test working.
#include <unistd.h>
#include <string.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>

int main()
{
    EVP_PKEY *pk;
    size_t keysize_bits = 4096;
    size_t keysize_bytes = keysize_bits / 8;

    pk = EVP_PKEY_Q_keygen(NULL, NULL, "rsa", keysize_bits);
    if (pk == NULL) {
        fprintf(stderr, "No key created\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    const unsigned char message[] = "\
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse \
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non \
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\
";

    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, NULL);

    /* ---------------------------------------------------------------------- */
    /* Signature, attempt 1, with RSA-SHA256 */

    EVP_SIGNATURE *sig1alg = EVP_SIGNATURE_fetch(NULL, "RSA-SHA256", NULL);

    if (!ctx) {
        fprintf(stderr, "No EVP_PKEY context created\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (!sig1alg) {
        fprintf(stderr, "No EVP_SIGNATURE fetched\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (EVP_PKEY_sign_init_for_message(ctx, sig1alg, NULL) <= 0) {
        fprintf(stderr, "Error trying to initialize sign with RSA-SHA256\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    unsigned char sig1[keysize_bytes];
    size_t sig1len = sizeof(sig1);
    if (EVP_PKEY_sign(ctx, sig1, &sig1len, message, sizeof(message) - 1) <= 0) {
        fprintf(stderr, "Error trying to sign with RSA-SHA256 oneshot\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    /* ---------------------------------------------------------------------- */
    /* Signature, attempt 2, with implicit RSA (through pk) + explicit SHA256 */

    char *md2name = "sha256";
    unsigned char md2[256 / 8];  /* SHA256 => 256 bits of output */
    size_t md2len = sizeof(md2);
    if (EVP_Q_digest(NULL, md2name, NULL, message, sizeof(message) - 1,
                     md2, &md2len) <= 0) {
        fprintf(stderr, "Error trying hash the message with SHA256\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (EVP_PKEY_sign_init(ctx) <= 0) {
        fprintf(stderr, "Error trying to initialize sign with pk\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0) {
        fprintf(stderr, "Error trying to set RSA_PKCS1_PADDING\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0) {
        fprintf(stderr, "Error trying to set signature MD\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    unsigned char sig2[keysize_bytes];
    size_t sig2len = sizeof(sig2);
    if (EVP_PKEY_sign(ctx, sig2, &sig2len, md2, md2len) <= 0) {
        fprintf(stderr, "Error trying to sign with oneshot\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    printf("SIG1[%zu]: ", sig1len);
    for (size_t i = 0; i < sig1len; i++) printf("%02x", sig1[i]);
    printf("\n");
    printf("SIG2[%zu]: ", sig2len);
    for (size_t i = 0; i < sig2len; i++) printf("%02x", sig2[i]);
    printf("\n");
    if (sig1len != sig2len)
        printf("Different lengths!\n");
    else if (memcmp(sig1, sig2, sig1len) != 0)
        printf("Different signatures!\n");
    exit(0);
}

The latest changes are a direct result of API discussions in
yesterday's OTC meeting.
My li'le test program got updated accordingly:
#include <unistd.h>
#include <string.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>

int main()
{
    const unsigned char message[] = "\
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse \
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non \
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\
";
    size_t messagelen = sizeof(message) - 1;

    char *hashname = "sha256";
    unsigned char digest[256 / 8];  /* SHA256 => 256 bits of output */
    size_t digestlen = sizeof(digest);
    if (EVP_Q_digest(NULL, hashname, NULL, message, messagelen,
                     digest, &digestlen) <= 0) {
        fprintf(stderr, "Error trying hash the message with SHA256\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    EVP_PKEY *pk;
    size_t keysize_bits = 4096;
    size_t keysize_bytes = keysize_bits / 8;
    pk = EVP_PKEY_Q_keygen(NULL, NULL, "rsa", keysize_bits);
    if (pk == NULL) {
        fprintf(stderr, "No key created\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, NULL);
    EVP_SIGNATURE *sigalg = EVP_SIGNATURE_fetch(NULL, "RSA-SHA256", NULL);

    if (!ctx) {
        fprintf(stderr, "No EVP_PKEY context created\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (!sigalg) {
        fprintf(stderr, "No EVP_SIGNATURE fetched\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    /* ---------------------------------------------------------------------- */
    /* Signature, attempt 1, of the message directly with RSA-SHA256 */
    if (EVP_PKEY_sign_message_init(ctx, sigalg, NULL) <= 0) {
        fprintf(stderr, "Error trying to initialize sign of message with RSA-SHA256\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    unsigned char sig1[keysize_bytes];
    size_t sig1len = sizeof(sig1);
    if (EVP_PKEY_sign(ctx, sig1, &sig1len, message, messagelen) <= 0) {
        fprintf(stderr, "Error trying to sign message with RSA-SHA256 oneshot\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    /* ---------------------------------------------------------------------- */
    /* Signature, attempt 2, of the pre-hashed message digest with RSA-SHA256 */
    if (EVP_PKEY_sign_init_ex2(ctx, sigalg, NULL) <= 0) {
        fprintf(stderr, "Error trying to initialize sign of message digest with RSA-SHA256\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    unsigned char sig2[keysize_bytes];
    size_t sig2len = sizeof(sig2);
    if (EVP_PKEY_sign(ctx, sig2, &sig2len, digest, digestlen) <= 0) {
        fprintf(stderr, "Error trying to sign message digest with RSA-SHA256 oneshot\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    /* ---------------------------------------------------------------------- */
    /* Signature, attempt 3, with implicit RSA (through pk) + explicit SHA256 */
    if (EVP_PKEY_sign_init(ctx) <= 0) {
        fprintf(stderr, "Error trying to initialize sign with pk\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0) {
        fprintf(stderr, "Error trying to set RSA_PKCS1_PADDING\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0) {
        fprintf(stderr, "Error trying to set signature hash\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    unsigned char sig3[keysize_bytes];
    size_t sig3len = sizeof(sig3);
    if (EVP_PKEY_sign(ctx, sig3, &sig3len, digest, digestlen) <= 0) {
        fprintf(stderr, "Error trying to sign message digest with pk\n");
        ERR_print_errors_fp(stderr);
        exit(1);
    }

    printf("SIG1[%zu]: ", sig1len);
    for (size_t i = 0; i < sig1len; i++) printf("%02x", sig1[i]);
    printf("\n");
    printf("SIG2[%zu]: ", sig2len);
    for (size_t i = 0; i < sig2len; i++) printf("%02x", sig2[i]);
    printf("\n");
    printf("SIG3[%zu]: ", sig3len);
    for (size_t i = 0; i < sig3len; i++) printf("%02x", sig3[i]);
    printf("\n");
    if (sig1len != sig2len || sig2len != sig3len)
        printf("Different lengths!\n");
    else if (memcmp(sig1, sig2, sig1len) != 0
             || memcmp(sig2, sig3, sig2len) != 0)
        printf("Different signatures!\n");
    exit(0);
}

Still doesn't complain (I've built OpenSSL in the subdirectory _build):
$ cc -o evp-sign -g -O0 -I _build/include/ -I include/ -L _build/ evp-sign.c -l:libcrypto.a
$ ./evp-sign
SIG1[512]: 17e2deedb4573185fac84753e4fbcf218c0823504939209336ead865b75a175536f344932d87cfd5705e2235d7216384de105bbb512721b9a5bc63ae82e2fdf001a1b8faaa05786829ec39cfc60a4f60d1fe831852b649d1a68ad222b4576f55657081effc927234dfbe639e06fa8c8e4961b2bca3fc9a95db44961fef58158d553c191851d534d5beca77dd76f9b9b5380af96be19060299bb8ee46277c32431219c33073aefa7cc9ab2d67a08c11ae4de9ee6ef271f4d33e4c497b9cf4cca5f2e251ae813dd83430e2f5fd37acf4fa050c30a7524cb32e169301780855a71f63b37fe5dbe2800ad41e8a0c816a358a7a249ef97a5caac51e6558ab23861176d2d08900e51d55fd7808948f53f465cf54956bd54e58b5b9f3e27bd2d3eec6b9d98cccfcdf101e4843e252199b50d20f87e14355243670b2fbc47306c39fb6615ca752c7f6a2b96478922f8e235cba99c31eda10bba36da1ed668e87e234a08ef881f8e98deda52b019e88d66ed91327790d12877c6e2cce922ea12ba3c67a0a0943cd7c5b751d1e2effce6a9689b0ba476c9d90eac1e4b6a6481a6a379c2698084f48bdc52ea4ee4f9e60902376f7f2bb6caad7152d3d7a70d9f3fe5ec6f1eacc4e31c5f530b69667d8892bbfb8c42d928ce645684c4bebd3bae46f8f8505e04582f985df30433eb6932e5f6b477f11c0347b3666f75bd5976d71268f28f1e0
SIG2[512]: 17e2deedb4573185fac84753e4fbcf218c0823504939209336ead865b75a175536f344932d87cfd5705e2235d7216384de105bbb512721b9a5bc63ae82e2fdf001a1b8faaa05786829ec39cfc60a4f60d1fe831852b649d1a68ad222b4576f55657081effc927234dfbe639e06fa8c8e4961b2bca3fc9a95db44961fef58158d553c191851d534d5beca77dd76f9b9b5380af96be19060299bb8ee46277c32431219c33073aefa7cc9ab2d67a08c11ae4de9ee6ef271f4d33e4c497b9cf4cca5f2e251ae813dd83430e2f5fd37acf4fa050c30a7524cb32e169301780855a71f63b37fe5dbe2800ad41e8a0c816a358a7a249ef97a5caac51e6558ab23861176d2d08900e51d55fd7808948f53f465cf54956bd54e58b5b9f3e27bd2d3eec6b9d98cccfcdf101e4843e252199b50d20f87e14355243670b2fbc47306c39fb6615ca752c7f6a2b96478922f8e235cba99c31eda10bba36da1ed668e87e234a08ef881f8e98deda52b019e88d66ed91327790d12877c6e2cce922ea12ba3c67a0a0943cd7c5b751d1e2effce6a9689b0ba476c9d90eac1e4b6a6481a6a379c2698084f48bdc52ea4ee4f9e60902376f7f2bb6caad7152d3d7a70d9f3fe5ec6f1eacc4e31c5f530b69667d8892bbfb8c42d928ce645684c4bebd3bae46f8f8505e04582f985df30433eb6932e5f6b477f11c0347b3666f75bd5976d71268f28f1e0
SIG3[512]: 17e2deedb4573185fac84753e4fbcf218c0823504939209336ead865b75a175536f344932d87cfd5705e2235d7216384de105bbb512721b9a5bc63ae82e2fdf001a1b8faaa05786829ec39cfc60a4f60d1fe831852b649d1a68ad222b4576f55657081effc927234dfbe639e06fa8c8e4961b2bca3fc9a95db44961fef58158d553c191851d534d5beca77dd76f9b9b5380af96be19060299bb8ee46277c32431219c33073aefa7cc9ab2d67a08c11ae4de9ee6ef271f4d33e4c497b9cf4cca5f2e251ae813dd83430e2f5fd37acf4fa050c30a7524cb32e169301780855a71f63b37fe5dbe2800ad41e8a0c816a358a7a249ef97a5caac51e6558ab23861176d2d08900e51d55fd7808948f53f465cf54956bd54e58b5b9f3e27bd2d3eec6b9d98cccfcdf101e4843e252199b50d20f87e14355243670b2fbc47306c39fb6615ca752c7f6a2b96478922f8e235cba99c31eda10bba36da1ed668e87e234a08ef881f8e98deda52b019e88d66ed91327790d12877c6e2cce922ea12ba3c67a0a0943cd7c5b751d1e2effce6a9689b0ba476c9d90eac1e4b6a6481a6a379c2698084f48bdc52ea4ee4f9e60902376f7f2bb6caad7152d3d7a70d9f3fe5ec6f1eacc4e31c5f530b69667d8892bbfb8c42d928ce645684c4bebd3bae46f8f8505e04582f985df30433eb6932e5f6b477f11c0347b3666f75bd5976d71268f28f1e0

I've decided to pull out the ED25519 implementation changes from this
PR.  The RSA-{hash} implementations are good enough proofs of concept.
The ED25519 changes will reappear in the next PR of this series.

This is finally ready for review.

I did a manual run util/check-format-commit.sh master.., and oh boy.  Some of what I found is collected in #24901, and one of its outputs lead to the fix in #24902.
Suffice to say, I have enough cause to keep the style: waived label.

What do you think about RSA-MD5? Should it really be in the default provider?

I think it should not

Okie, I'll remove RSA-MD5

Gah.  Regard evp_test stanzas, it seems that FIPSversion = ... implies that the stanza is only used if the FIPS provider is available, i.e. that for setups where the FIPS provider isn't included, those stanzas will not be considered.  Doesn't that mean that I must essentially duplicate all stanzas if I want to be sure they get tested in all setups?

I rebased to squash all the fixups done so far.

I've remade rsa_setup_md() a little bit...  it didn't check properly
if sha1 was improperly used.

Found a very small bug, see https://github.com/openssl/openssl/compare/18062f5c100f8d1571229b536af18e6900fff119..8a49fabee9c932a023dc485e9c6ef9f353e09338
Re-approve?

ack, approval holds

Hehe, I'm noticing that DigestSign and DigestVerify isn't present in life-cycles either...

I'm looking at doc/life-cycles in a separate PR.

Rebased on top of a fresher master.

What will happen to DigestSign / DigestVerify? Will it remain a supported API or will it be deprecated in favor of this?

What will happen to DigestSign / DigestVerify? Will it remain a supported API or will it be deprecated in favor of this?

There is currently no intent to deprecate these. I can imagine that for new algorithms added in future (such as the PQC) these APIs might not be supported.

  To be looked at tomorrow

What is the motivation for avoiding the digest fetch and going directly to the digest dispatch tables?

If an application (or code in libcrypto, for that matter) receives a name like RSA-SHA256, or an OID like 1.2.840.1135<IP_ADDRESS>, they shouldn't have to go find out what it's composed of and fetch each part separately, just to recompose that algorithm before using it.
For algorithms that aren't known to OpenSSL, this is further exacerbated by the extra churn of adding OIDs from the provider (i.e. run another table alongside the OSSL_ALGORITHM tables).
Finally, it makes for better discoverability as well:
$ openssl list -signature-algorithms
...
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA-1, RSA-SHA1, sha1WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-224, RSA-SHA224, sha224WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-256, RSA-SHA256, sha256WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-384, RSA-SHA384, sha384WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-512, RSA-SHA512, sha512WithRSAEncryption } @ default
...

Haven't you asked before, and gotten this same answer?

I believe I've answered all open review comments made so far.  There are fixup commits that I'd like @mattcaswell to have a look at, since they are direct responses to your review comments.

Now, to fix my latest messes.

What is the motivation for avoiding the digest fetch and going directly to the digest dispatch tables?

If an application (or code in libcrypto, for that matter) receives a name like RSA-SHA256, or an OID like 1.2.840.1135<IP_ADDRESS>, they shouldn't have to go find out what it's composed of and fetch each part separately, just to recompose that algorithm before using it.
For algorithms that aren't known to OpenSSL, this is further exacerbated by the extra churn of adding OIDs from the provider (i.e. run another table alongside the OSSL_ALGORITHM tables).
Finally, it makes for better discoverability as well:
$ openssl list -signature-algorithms
...
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA-1, RSA-SHA1, sha1WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-224, RSA-SHA224, sha224WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-256, RSA-SHA256, sha256WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-384, RSA-SHA384, sha384WithRSAEncryption } @ default
  { 1.2.840.1135<IP_ADDRESS>, RSA-SHA2-512, RSA-SHA512, sha512WithRSAEncryption } @ default
...

Haven't you asked before, and gotten this same answer?

Err no you have assumed it is the same question.
I think you should NOT be directly accessing the dispatch tables for the digests.

Putting a hold on this, until it is addressed.
i.e. Is the code bloat (e.g. rsa_setup_md()) really what we want to do here?

I think you should NOT be directly accessing the dispatch tables for the digests.

Er...  why not?

Because we have a fetch that does that already without needing hundreds of lines of code to handle it.

Your question was 'why not', my question was 'why' :)

Your question was 'why not', my question was 'why' :)

Quite frankly, 'cause I'm afraid of the case where a composite signature "promises" that a certain digest implementation is available, but it can't be fetched in run-time.  For example, that might very well happen the day sha1 is moved to the legacy provider...  The reason I constructed it this way is that build-time will tell me immediately if a certain composition is impossible.
For example, PKCS#1 specifies md2WithRSAEncryption (our name for it would be RSA-MD2).  In my first attempts, I did try to include it, just to realise that MD2 isn't available in the default repository (no ossl_md2_functions).  Had I used the run-time approach you propose, this would have gone undetected, 'cause we don't have any RSA-MD2 tests.
Yeah, of course it's easy to think that someone would see that and just tell me not to implement it, like @t8m did regarding RSA-MD5.  But, suppose that RMD160 is removed from the default repo, and no one thinks of removing RSA-RIPEMD160.  Same scenario, different name...

But this could be easily overcome with having evp_test testcase for every composite algo that you've added. We would immediately see in CI if the hash algo wasn't available anymore.

I dont think the added complexity warrants it being done this way.  Especially since you would then be doing this for every signature algorithm.

available

Unless someone forgets to add such a test (that has never happened before, right?).
Also, what test vectors to you propose, for example for RSA-RIMPEMD160?

I dont think the added complexity warrants it being done this way. Especially since you would then be doing this for every signature algorithm.

If you look at #24992, you'll see that I moved the md wrapper to a separate file, shared by all the RSA, DSA and ECDSA implementations.  It's actually not very hard.
Re complexity, I see this as trading one for another.  You see complexity in what I do, I see complexity in what you propose.

What is the complexity in using EVP_MD_fetch()? There is no need for wrapper code then. As @t8m said, the issue you raised needs to be tested anyway.

I put a hold on this so it can be discussed by OTC..

I added a fixup that implements the fetch proposal.

Do you want to discuss this in the OTC meeting?, if not it is fine to lift the hold.

If the digest e.g. is going legacy, wouldn't the associated signature algorithms also go to the legacy provider?
I'm not seeing an issue that justifies not using fetch.

Do you want to discuss this in the OTC meeting?, if not it is fine to lift the hold.

Nah, no need, I give in.

As for testing, grab all of the algorithms and do an end to end test for each?

That sounds like a lot of effort that I'd frankly better spend on other things.  However, I figured that it's not too hard too produce stanzas with openssl dgst -sign, so...

I was thinking openssl list … followed by a loop in Perl.

Did a rebase to squash the fetch approach.  Tests stanza for the RSA-{hash} that don't have it yet are coming up next

Is there a reason why we don't allow RSA-SM3, even in the default provider?

Finally got the evp test in good shape.  The pkey tests will now simply skip sigalgs where the hash component is known to be disabled, just like the digest tests do.

@nhorman please reconfirm

Ack, approval holds

This pull request is ready to merge

Merged into master
523187df47cf6082004e872c6c47b202fce5d574 Enable RSA-SM3 in the default provider
8736de5e77fe1ccb52efd84e1d93372f57420495 fix coding style
b02cf2fc8fc5ae2cef8313bac26b9a8fdbb98b2d Add new test types in test/evp_test.c, and a test for RSA sigalgs
572a8371ab600cfcf89284b692625dbfb7627f2d Refactor OpenSSL 'RSA' EVP_SIGNATURE to also include RSA+hash composites
e675aabb8747d0f2da5691945f1a429558ebc34d Implement functionality for direct use of composite signature algorithms

I should probably write a CHANGES entry for this, yeah?


Finish readme

The readme has the most essential chapters now. Only the usage chapter needs some work done.


'UIViewController' does not conform to protocol 'ValidationDelegate'

Unable to delegate Protocol "ValidationDelegate" required UIViewControlled. I am getting this error, it would be great help if any one known how to over come this error.
Thanks

Do you solved this already?

Did anybody solve this problem? I am getting this in Swift 3
This is pod :
pod 'SwiftValidator', :git => 'https://github.com/jpotts18/SwiftValidator.git', :branch => 'master'

in swift 4. i have this.

any body solved This ??

I am using Xcode 12.5, swift 5 faced the same error, but instead of using the
validator.validate(self) and implementing the protocol i used the callback function
validator.validate { [weak self] errors in
    guard let self = self else { return }
    if errors.count > 0 {
        for (field, error) in errors {
            if let field = field as? UITextField {
              field.layer.borderColor = UIColor.red.cgColor
              field.layer.borderWidth = 1.0
            }
            error.errorLabel?.text = error.errorMessage // works if you added labels
            error.errorLabel?.isHidden = false
        }
    } else {
        // success in validation
    }
}


wordy: Immediately return in operand

The previous code just added a : isize type, but this is already
inferrable from the function signature, so it can just be returned
immediately.

ok. Someone pointed that out to me in a nitpick as well.


Get rid of pin-depends field in .opam file

We can remove the pins once

the new version of reason-react for melange 3 is released
melange-fest is published to opam package rep

Fixed in https://github.com/melange-re/melange-for-react-devs/pull/28


Unkonw exception in imread(path) from neural_artistic_style.py

I got this fault:
/usr/lib/python2.7/dist-packages/pkg_resources/init.py:1224: UserWarning: /home/anonym/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
CUDArray: CUDA back-end not available, using NumPy.
Traceback (most recent call last):
File "neural_artistic_style.py", line 120, in
run()
File "neural_artistic_style.py", line 89, in run
style_img = imread(args.style)
File "neural_artistic_style.py", line 40, in imread
return scipy.misc.imread(path).astype(dp.float_)
TypeError: float() argument must be a string or a number
Have any ideas?

Hm, it seems to me that scipy.misc.imread() is returning a PIL object. If this is the case, you need fix your scipy installation such that it can read your images. Try to look it up on the web.

I saw this same error, and was able to fix it by doing the following (not sure which are responsible, since I did them all at once):

install scikit-image and matplotlib; the latter may have unmet dependencies
-uninstall any scipy version, and install again with sudo pip install pip install git+https://github.com/scipy/scipy.git
uninstall pillow
install all of the external libraries listed here required by Pillow: http://pillow.readthedocs.org/en/latest/installation.html#external-libraries (my guess is that installing one/some of these is what made the difference)
reinstall Pillow

@rmurray2: Thank you for the insight! Another possibility is to use the Anaconda Python distribution. It usually provides working versions of Pillow/Scipy. :)


Skip content comparison in create_log_entries where revision cannot be restored

Fixes #6368

Merged in 0ea2c577f22190bb52acfaa96c39379c209946c4 (2.10.x) and 510e52923a3daf0506644ba93d1720a03a25be93 (master).


Add profile field to slack user and lita user objects

Added a way to get profile information into the lita user object.  More values can also follow the same convention to add more items.

@jimmycuadra  any chance this will get merged?

Related to the following issue: https://github.com/litaio/lita-slack/issues/136


Merge pull request #88 from CogitoNTNU/86-fix-type-mismatch-tango-scr…

take last commit with

GIthub being wird


Need more info to create TensorShape in each kernel

Hi @GeorgeARM ,
I have few questions regarding these kind of scenarios mentioned in this issue.
You mentioned  "ACL would expect the shape of the input to be the same with the shape of the output for the ActivationLayer"  in above comments.

But i have observed that in non-activation layers(layers which does not use NEActivationLayer) such as Norm(Cross channel/Batch norm), softmax layers has the similar restriction and we are creating the Tensor shape for these specific layers as previous layer tensor shape and worked fine for me. Does it mean along with activation kernels norm, softmax kernels also has this restriction?

Also my understanding is that FC and LSTM layers always expects output ARM Tensor shape as the 2D and Convolution, Pooling layers always expects output ARM Tensor shape as the 4D. Could you clarify on my understanding?

Could please point me the any documentation saying this restriction so that it would helpful for me to create bug free kernels with correct output tensor shape.
Thanks,
Hari
Originally posted by @nhkrishna in https://github.com/ARM-software/ComputeLibrary/issues/47#issuecomment-543220596

Hi @morgolock ,
I have raised this issue to get more understanding creating TensorShape for a particular kernal with out any issues. I have referred this issue, where it will talk about output tensor shape of the ActivationLayers,  saying "ACL would expect the shape of the input to be the same with the shape of the output for the ActivationLayer".
But i have observed similar restriction in other kernels(mentioned in first comment) and few kernels always expect  fixed tensor shape(second point in first comment). I just wanted to find  this restrictions in any documentation or header  file but unfortunately i couldn't find.  Could please let us know where i can find documentation/test data sets to create TensorShape for a particular kernel without any issue.
Thanks,
Hari

Hi @nhkrishna
It depends on the particular function you are dealing with. In general the first place to look for this kind of information would be the header file of the function/kernel in ACL:
https://github.com/ARM-software/ComputeLibrary/blob/master/arm_compute/runtime/NEON/functions/NEActivationLayer.h
https://github.com/ARM-software/ComputeLibrary/blob/master/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h
If the header does not contain the infromation you are looking for, the second place to look for this is in the kernel's validate() method:
https://github.com/ARM-software/ComputeLibrary/blob/master/src/core/NEON/kernels/NEActivationLayerKernel.cpp#L84
In this particular case you could see  ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input, output);
Hope this helps.

Hello @nhkrishna,
As @morgolock mentioned you can either check the kernels' validation code or the actual documentation where we might specify the expected size and data type of the outputs. We don't have strong restrictions thus ACL should comply with the operator specifications that other frameworks like TFLite and AnrdoidNN have.
Hope this helps.
Closing the issue. Reopen if needed


Standarise deprecations in CMS4 for framework

We need to review and normalise our deprecation notice in CMS4 to facilitate upgrades
Acceptance criteria

[x] Code with a @deprecated annotation throw a Deprecation::notice()
[x] Code throwing a Deprecation::notice() is annotated with a @deprecated
[ ] Unit test for deprecated code is not run when deprecation notices are enabled.
[ ] Our CI is updated to have a build that runs with deprecation warning enabled.
[x] Normalise the @deprecated annotation ... within reason.

Note

This card is only for the core modules See update below
We will most likely ended up deprecating more code after this card is merged.
A decision needs to be made about how to handle deprecating whole classes - possibly a constructor will need to be added, and the deprecation notice added via that constructor. -> update - handle via Deprecation::SCOPE_CLASS in __construct().

Update

I've split this issue so that this one is for framework only - other core modules will handled on this issue https://github.com/silverstripe/silverstripe-framework/issues/10531

PRs

https://github.com/silverstripe/silverstripe-framework/pull/10530
https://github.com/silverstripe/silverstripe-framework/pull/10525

@emteknetnz The acceptance criteria in this card imply changes will need to be made to the CI - do those changes still need to be made?

PRs are merged and ACs have all been met or spun off into separate cards. Closing.


Make markdown spell-checking a Pester test

PR Summary
fixes #8078
todo:
update contributing md

PR Context

PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Change is not breaking
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

User-facing changes

[ ] Not Applicable
OR
[X] Documentation needed

[X] Issue filed:  #8078

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[X] Make sure you've added a new test if existing tests do not effectively test the code changed

[x] Add [feature] to your commit messages if the change is significant or affects feature tests

@iSazonov @vexx32 can you two please take a look?  Need a second eye as I can't find my mistake.

First we need confirmation from @TravisEz13 - I am not sure that it is right direction for spelling.

@iSazonov see issue #8078

I love pester 🤣
Context Verify spelling in /home/vsts/work/1/s/tools/performance/README.md
      [-] >> 8 spelling errors found in 1 file should work 2ms
        RuntimeException: Tool reported spelling as wrong.

Does mdspell allow us to see each spelling error @RDIL?
Might need to rethink how you're categorising and parsing the output 😉

Yeah it does but I sadly don't have that level of expertise in powershell :(

Thank you for all your help @vexx32!

@rdil can you show me some example output from mdspell? I can probably figure out a regex to get the misspelled words.

@vexx32 here:
https://cirrus-ci.com/task/5949319808024576
make sure to click on main to open the logs
also its at the very bottom of logs

Ah, I see. So currently you're checking your final output line, the summary. OK... OK... hm. Can you mock up an example where there's spelling errors in at least two files for me? I can definitely regex that, just don't wanna miss anything. ❤

sure one min

@vexx32 here is with 2 files:
https://cirrus-ci.com/task/5078643473645568

@RDIL this is what I have so far

The code, cleaned and refactored:
if (@($Output).Count -gt 1) {
    # Trim last line containing only success/failure message and split into one block per file
    $ErrorList = $Output[0..($Output.Length - 2)] -split '(\n[^|]+\n)'

    foreach ($Entry in ($ErrorList )) {
        $Lines = $Entry -split '\r?\n'
        $File = $Lines[0].Trim()
        $MistakeList = $Lines | Select-Object -Skip 1
        foreach ($Mistake in $MistakeList) {
            if ($Mistake -match '(?<Line>[0-9]+) \| (?<Mistake>[\w ]+)') {
                $Matches.Remove(0)
                $Matches.Add('Filename', $File)

                # Output the object from the regex match with filename
                [PSCustomObject]$Matches
            }
        }
    }
}

If you run this on the mdspell output sequence you should get usable PSCustomObjects listing file, line number, and the text that it detects containing a misspelling. These you can put into your pester test and output how you wish to show exactly which files and where the problems are. 😄

@vexx32 nice.  I'll try to add it whenever I have time.

i give up these spelling errors cannot be fixed

@RDIL if you work in the code to parse the output more granularly it should point you right to each error, instead of you having to scan through each file to figure out what's going wrong 😄

@vexx32 I'm aware of which sentence the errors are in, but I don't know which word.

List the remaining lines here, then, I guess?

This looks like a good start.  It would be nice if we could use this version of the tool (https://github.com/lukeapage/node-markdown-spellcheck/pull/114) so that pester could parse the results and report the actual line and word that failed.

Sorry, I didn't read @vexx32 	's comments. Before posting that, just consider it as one idea.

I'm going to close this until I am in a better mental state and can work on this.

@web-flow, your last commit had 3 failures in PowerShell-CI-static-analysis
Verify Markdown Spelling.Verify spelling in /home/vsts/work/1/s/tools/performance/README.md.>> 8 spelling errors found in 1 file!
Error: Tool reported spelling as wrong.
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-spell.tests.ps1: line 64
64:                         throw "Tool reported spelling as wrong."

Verify Markdown Spelling.Verify spelling in /home/vsts/work/1/s/docs/cmdlet-example/command-line-simple-example.md.>> 5 spelling errors found in 1 file!
Error: Tool reported spelling as wrong.
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-spell.tests.ps1: line 64
64:                         throw "Tool reported spelling as wrong."

Verify Markdown Spelling.Verify spelling in /home/vsts/work/1/s/CHANGELOG.md.>> 32 spelling errors found in 1 file!
Error: Tool reported spelling as wrong.
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-spell.tests.ps1: line 64
64:                         throw "Tool reported spelling as wrong."

thanks poshchan I had absolutely no idea the check I wrote is failing

This makes me so mad because this code works but this one file has a spelling mistake and I don't know what word it is :[

@RDIL which file and line number?

It says it somewhere in the static analysis results

3 files with a total of 57 errors.. but nothing jumps out at me either. I'll take a closer look.
    Context Verify spelling in /home/vsts/work/1/s/docs/cmdlet-example/command-line-simple-example.md
WARNING: >> 5 spelling errors found in 1 file
      [-] >> 5 spelling errors found in 1 file! 81ms
        RuntimeException: Tool reported spelling as wrong.
        at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-spell.tests.ps1: line 65

    Context Verify spelling in /home/vsts/work/1/s/CHANGELOG.md
WARNING: >> 44 spelling errors found in 1 file
      [-] >> 44 spelling errors found in 1 file! 25ms
        RuntimeException: Tool reported spelling as wrong.
        at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-spell.tests.ps1: line 65

    Context Verify spelling in /home/vsts/work/1/s/tools/performance/README.md
WARNING: >> 8 spelling errors found in 1 file
      [-] >> 8 spelling errors found in 1 file! 2ms
        RuntimeException: Tool reported spelling as wrong.
        at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-spell.tests.ps1: line 65

It looks like the file overrides in .spelling don't work like they're supposed to. If I remove the file override lines and just put everything in the global dictionary, it works fine.

Interesting, I’ll give it a look.

Umm it didn’t work 😢

Next to the line number there should be a clickable space which gives you the ability to type in a message

Holy cow it worked

@iSazonov are you sure removing the throw is the right thing? That would make the tests pass...

@RDIL My request is not remove throw but replace with Should - I'd expect more friendly output. I can wrong but you could make tests and compare the output.

I'm sorry, but I don't really understand what you mean by that.

@RDIL I haven't experience to review this in depth. And MSFT team is busy in the days :-( So waiting...


Couldn't sign in to xbox live

Hi
I not able to sign into xbox live, I am getting following error

Thanks

I have followed all the steps mentioned the document
https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-creators/configure-xbox-live-in-unity
Once game is published for test environment as mentioned in the following link https://imgur.com/a/J7Czd I am no more getting the signing dialogue also.
Can anyone help me on this ?

Hi @devauk are you still seeing this issue?
If you are, could you see if maybe you can get us a fiddler trace of what you're seeing? If you haven't used Fiddler before, this tutorial might help: https://www.telerik.com/videos/fiddler/getting-started-with-fiddler-web-debugging-proxy


Feature request: Circular List

It would be nice to see an option to enable a circular picker.
As an example, if I use numbers 0 to 59, presently, the scroll picker will start at 0 and end at 59. Instead, can it have the last element(59) before the first element(0), such that the picker will be able to scroll infinitely?

@rheng001 is this issue solved?


running a command at startup

Is there a way to run a command at startup for the Qonsole only?

Whoops! Just saw this. Yes, you can set that in the options just like in the screenshot with /k cd [...].


taskjuggler: fix security issues

Motivation for this change
Update dependencies to fix security issue in mail dependency and using HTTPS.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Thank you. If this needs backporting, please open a cherry-pick PR against release. (Feel free to ping me).


[Docs] Added ES Instructions to Docs

[ ] PR has tests / docs demo, and is linted.
[x] Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
[x] Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Added ES instructions to the Docs site. This explains that the examples use stage 1of ES and how to install that plugin. Resolves #4862 confusion

@mpontikes That looks good to me 👍 .


Make service-worker / page connection reliable

Review in order of #222 #223 #224
The worker pings the page every 10 seconds to refresh the connection, in case there is no pending fetch request. This allows the connection to be active all the time.
However, if the connection is broken from the page side, this will still fail. I will add the message polling on the page side in a follow up PR.
@rpaquay

lgtm


Language-sensitive Homoglyph removal

Is it possible to have homoglyph removal that does not remove language-specific characters?
For example Germanic ÄÖÜßÆØÅ (and icelandic ÐÞÁÉÍÓÚÝ) or Romance language's ÁÉÍÓÚÝÂÊÎÔÛÀÈÙËÏÜŸÃÑÕÇ (and Romanian ĂÂÎȘȚ)
Ideas:

Some diacritics do look similar (e.g. Circumflex vs Inverted Breve, Caron vs Breve, Diaeresis vs Double acute/grave, Tilde vs Macron, Overdot vs Overring)
It is very hard to remove homoglyphs of diacritics-based characters as some characters won't be combined in the NFC formalization process, which require conversion before NFC

For more language references https://github.com/Ousret/charset_normalizer/issues/26

Just specify alphabet, category, or language, and strategy. That's the main feature of the lib, you have full control of the alphabet, do what you want.


Update PhotoSaverTask.kt

Use coroutines instead of deprecated AsynTask.
Use callback functions directly instead of SaveResultClass.
Fix "Software rendering does not support hardware bitmaps" exception.

I am not sure, but having a coroutine dependency in the library for just one task does not seem a good trade-off. Maybe we can have a separate suspend function inside the library and the client will decide on how to consume it.
To be honest, I am not well versed in coroutine so I may be completely wrong. cc @lucianocheng

@burhanrashid52 using coroutines is probably fine in this case. AsyncTask is deprecated and the only other way to run this not on the UI thread would be Thread, which wouldn't make sense.
Give me a week to compare how this works to our internal implementation then I'll review it.

Use callback functions directly instead of SaveResultClass.

This is probably the bigger change if it changes the API. @isandoqa do you know if this means Java users can't use the callback structure?

@lucianocheng
PhotoSaverTask is an internal class, it is not accessible from other modules, so no need to concern about java users, unless you plan to write any java components inside the library module itself.


Fix bug with command line arg validation

Dataflow worker nodes do not receive command line args. Instead, they receive an options arg with the pipeline state they need to use. Our validation logic for the commandline args did not account for this. Changed validation logic to just return an empty Config struct if the options command-line arg was set.

Wouldn't it be a bug if options are passed then?

Wouldn't it be a bug if options are passed then?

It would be would if say you wanted to run the pipeline locally via manual execution. However, when executing the pipeline via Dataflow in GCP, the Dataflow runner will use the options flag when starting up a worker node to pass in the pipeline state, e.g. it will do something like:
./review --options=<pipeline-state>

I don't know if there is a good way to tell if the binary is being invoked by a Dataflow worker node or not, so I don't think we can do something like fail if the options flag is set as that would prevent the worker node from reading the pipeline state.

I don't know if there is a good way to tell if the binary is being invoked by a Dataflow worker node or not, so I don't think we can do something like fail if the options flag is set as that would prevent the worker node from reading the pipeline state.

We could look for any of these envvars.

I wonder how much we can bet on -options being a stable flag set by dataflow? Maybe having our own explicit flag like -on-dataflow-worker is safer.

@sethvargo @yolocs After reading the docs more thoroughly I discovered that it is required to call beam.Init() prior to doing any flag validation. The fix has been updated accordingly.


Fix spellNumber function

There is currently a method called spellNumber that lives in /lib/spellNumber.js.
It is incomplete and needs to be fixed!
It spells the number that has been passed to it.
In case of a decimal number, it rounds up the number if the precision is about .55 i.e.
123.56 becomes 124 and below it becomes 123, spelled, one hundred twenty four and one hundred twenty four respectively.
Acceptance Criteria:

Running yarn test spellNumber results in tests passing.
You have written a skeleton method for someone else to work on.
You have written tests surrounding your skeleton method.
Running yarn lint does not print any errors to the console!
Optional: write one or two more tests surrounding the method you are solving to account for potential edge cases.

Please include the skeleton of a new method + an accompanying test for someone else to work on at the time of creating a pull request! A pull request will most likely be denied if it does not contain a skeleton method for someone else to work on! For more information, please read the Contributing Guide.
Thank you so much for your contribution!

I'm gonna work on this. Please mark it as in progress.

you got it :)

Done :)


Playing music with UPNP sources causes vlc to not use meta data and only file name

Playing music with UPNP sources causes vlc to not use meta data and only file name. I had to apply this PR to get here tho instead of it not showing its playing anything. https://github.com/GreenDiscord/vlc-rpc/pull/13

It would also be nice if we had the option to cache the image from http://localhost:8080/art

It would also be nice if we had the option to cache the image from http://localhost:8080/art

That can't be done, as far as I know, not practically anyways. You need to be able to distribute the image to other Discord users, which would mean either hosting them in some form, which is illegal in most cases. However I think it theoretically could be possible to do something like an override, so that a specific image URL would be used in some instances.

It would also be nice if we had the option to cache the image from http://localhost:8080/art

That can't be done, as far as I know, not practically anyways. You need to be able to distribute the image to other Discord users, which would mean either hosting them in some form, which is illegal in most cases. However I think it theoretically could be possible to do something like an override, so that a specific image URL would be used in some instances.

Can you add  something like an override, so that a specific image URL would be used in some instances.?

Playing music with UPNP sources causes vlc to not use meta data and only file name

Could you provide some example so that I could try it out, by the way? I actually have no clue what that is 😅

Playing music with UPNP sources causes vlc to not use meta data and only file name

Could you provide some example so that I could try it out, by the way? I actually have no clue what that is 😅

I can screen record.

It would also be nice if we had the option to cache the image from http://localhost:8080/art

That can't be done, as far as I know, not practically anyways. You need to be able to distribute the image to other Discord users, which would mean either hosting them in some form, which is illegal in most cases. However I think it theoretically could be possible to do something like an override, so that a specific image URL would be used in some instances.

Bit confused on the last bit, in theory you could obviously use metadata to get it, but it wouldn't work very well due to multiple types of album art, only idea I have is what was said about uploading the album art to a server, but that is very illegal.

Playing music with UPNP sources causes vlc to not use meta data and only file name

Could you provide some example so that I could try it out, by the way? I actually have no clue what that is 😅

I can screen record.

Either that, or some explanation on how to replicate your setup would be fine.

Can we get VLC to show the name of the song using metadata in UPNP instead of the filename?
Can you add something like an override, so that a specific image URL would be used in some instances?

Playing music with UPNP sources causes vlc to not use meta data and only file name

Could you provide some example so that I could try it out, by the way? I actually have no clue what that is 😅

I can screen record.

Also this issue I already know off, i implanted a fix a while ago now which didn't fetch the meta data due to it being slightly different in some case. Also, its a fix for a wide amount of sources (capture cars streaming, cameras, live streams, etc). I will have a look at vlc.js and try to implement a fix

Can we get VLC to show the name of the song using metadata in UPNP instead of the filename?
Can you add something like an override, so that a specific image URL would be used in some instances?

Well should be able to, if the album art is already hosted publicly (like spotify n apple), maybe if the song had metadata for a filename url? Where are you listenting to the music from tho, because upnp is local host.

https://files.catbox.moe/qvn8lr.mkv

Thank you. I sent a video.

Can we get VLC to show the name of the song using metadata in UPNP instead of the filename?
Can you add something like an override, so that a specific image URL would be used in some instances?

Well should be able to, if the album art is already hosted publicly (like spotify n apple), maybe if the song had metadata for a filename url? Where are you listenting to the music from tho, because upnp is local host.

Second question isnt related to the first. I just want the option to set a url in the config file for what image should go to the RPC if you get the idea 😉

Could you send one of the files as example?

Could you send one of the files as example?

What do you mean. I sent a video. It's on my UPNP server on my phone.

If you put any MP3 file into a UPNP server and play it through VLC you're gonna get the same result. You just have to use sdasda7777 fork to get the result instead of nothing with this version on this repo here.

Playing music with UPNP sources causes vlc to not use meta data and only file name

Could you provide some example so that I could try it out, by the way? I actually have no clue what that is 😅

I can screen record.

Also this issue I already know off, i implanted a fix a while ago now which didn't fetch the meta data due to it being slightly different in some case. Also, its a fix for a wide amount of sources (capture cars streaming, cameras, live streams, etc). I will have a look at vlc.js and try to implement a fix

Please do so when you get the chance.

If you put any MP3 file into a UPNP server and play it through VLC you're gonna get the same result. You just have to use sdasda7777 fork to get the result instead of nothing with this version on this repo here.

I actually don't really know why that could be, the fork should be pretty much the same, afaik 😅

If you put any MP3 file into a UPNP server and play it through VLC you're gonna get the same result. You just have to use sdasda7777 fork to get the result instead of nothing with this version on this repo here.

I actually don't really know why that could be, the fork should be pretty much the same, afaik 😅

For me the fork shows the MP3 like this, but the application shows this. Without the fork it doesn't reconize anything playing over UPNP.

http://<IP_ADDRESS>:57645/b64/H4sIAAAAAAAAANMvLskvSkxP1U_NLc1JLElN0TfQ9y0tzkzWdyxNyUzN005LTSzR0w4qTarUDijKL8hILdHW1Q7JSC1O1XYsSgWxtF0SK4u1NYISUzLztV1TMks09XILjAFhh6KlWQAAAA==.mp3

Found a workaround that needs to be implemented. the
song name needs to be extracted from "name":"Bastille+-+Pompeii+(Audien+Remix).mp3", on the same part with
`"current":"current"`` from
http://localhost:8080/requests/playlist.json
oh yeah, http://localhost:8080/requests/status.json doesn't show it right btw.
Example;
{                       "ro":"ro",                       "type":"leaf",                       "name":"Bastille+-+Pompeii+(Audien+Remix).mp3",                       "id":"13411",                       "duration":352,                       "uri":"http://<IP_ADDRESS>:57645/b64/H4sIAAAAAAAAANMvLskvSkxP1U_NLc1JLElN0TfQ9y0tzkzWd0osLsnMyUnV1tUOyM8tSM3M1NZwLE3JTM3TDkrNzazQ1MstMAYAuxjD-T8AAAA=.mp3",                       "current":"current"                     },

@sdasda7777 @GreenDiscord

I'm going to pause this, as I think this is a due to the server encoding the file names like this.

We can close this issue. It was my UPNP server settings. I got it working now.


BUG: .BulkDeleteAsync() assigns deleted entities to statsinfo.Inserted isntead of deleted

Hiya,
Just like the title mentions:

I'd expect BulkConfig.StatsInfo.StatsNumberInserted to be 0 and BulkConfig.StatsInfo.StatsNumberDeleted to be set to some value.
Using v6.2.8 of the library.
EDIT:
Same with v6.2.9
Im closing this for now because it actually looks like its inserting data - so i fear i messed my compare properties up or something.

This was an error on my part - my setup actually inserted entities instead of deleting them... The output seems a bit weird though.


Interplation expressions are deprecated

Interpolation expressions, such as "${gridscale_storage.caching-storage.id}" are deprecated. These should be replaced by expressions like gridscale_storage.caching-storage.id.

Done with PR #4


Use Pants to publish docker images to dockerhub.

@tdyas changes this PR based on your feedback on https://github.com/toolchainlabs/remote-api-tools/pull/70


Add miniflare docs

Adds the contents of https://miniflare.dev/, with non-relevant sections removed/modified. There are two commits—one with a full import of the content, and one with sections removed.
I imagine this will be a process of keeping these up to date and making them more detailed, but this should be a good start to allow us to retire https://miniflare.dev/ and the Miniflare 2 repo.

@irvinebroque I've moved it to the testing folder. I'm a bit hesitant to link to it from Wrangler's API page though, since for most users it won't provide what they want from an API (especially for a Wrangler user, since it won't read their Wrangler config file). What do you think?

@penalosa I'm good with that


Setting oom_score_adj while launching applications

This spins off a more tightly-scoped version of #114.  The oom_score_adj is more of a host-side and/or multi-container-orchestration issue, and less of a bundle issue, which means it probably should be in runtime.json if/once #88 lands.  Possible approaches for setting this include:

The runtime writes to /proc/<pid>/oom_score_adj, which would need a config-side setting.
The host injects a pre-start hook to write to /proc/<pid>/oom_score_adj.  This would require a hook with sufficient permissions for the write.
The application has a startup phase where it handles this sort of thing before execing the main process.  This would require an application have sufficient permissions for the write, although it could drop them after writing and before execing the “real” application.

A number of attributes where you could use (2) currently have explicit, (1)-style configs for via hooks (e.g. setting up networking and creating cgroups and namespaces).  I'd guess the balance involves “how easy is it to handle without (1)?” and “how frequently will folks be tweaking this attribute?”, with high-cost or high-frequency attributes being handled via (1).  So which way do we think makes the most sense for this particular setting?
Is it easy to handle via (2) or (3)?  It seems like (2) would be easy assuming sufficient hook permissions, but (3) is probably too annoying to be worth the trouble.
How frequently do we expect folks will use this?  I can't weigh in here, since I haven't set this.  And I expect most runtime managers that set this will be doing it automatically, so in that case it's a wash between (1) and (2) for difficulty.
If those assumptions are correct, then I think we should go with (2), since that is the least work on the spec/runtime-implementation side.  If nobody chimes in with anti-(2) thoughts in the next few days, I'll merge opencontainers/runc#160 locally see whether I can get it working ;).

I merged opencontainers/runc#160 (at opencontainers/runc@4f7ff04) into runc's master (at opencontainers/runc@0f85e4e), reverted opencontainers/runc@cc232c47 (part of opencontainers/runc#232) to avoid clobbering my adjustment, wrote a host-side hook to handle the adjustment:
$ cat /tmp/oom-score-adj.sh
#!/bin/busybox sh
ADJ="$1"
#PID=$(jq -r .pid)
PID=$(jq -r .init_process_pid)
echo "${ADJ}" > "/proc/${PID}/oom_score_adj"

The init_process_pid vs. pid in the state JSON is a difference between runC's state as of opencontainers/runc#160 and the spec that landed in #87 (after the initial runC work).
Then I added the hook to my config.json:
$ cat config.json
{
  …
  "hooks": {
    "prestart": [
      {
        "path": "/tmp/oom-score-adj.sh",
        "args": ["oom-score-adj.sh", "+10"]
      }
    ],
    "poststop": null
  },
  …
}

Then launching the container gives the right score:
# runc
/ # cat /proc/1/oom_score
10

So the hook approach ((2) in my original post here) is valid, and not particularly difficult.  I propose we document that approach in this spec (for the reasons outlined in my original post here) and roll back opencontainers/runc#232 in runC.

The init process is a runC thing. In my mind, pre-start hooks are launched when the container environment has been established. Whether there is an init process involved or not is an implementation detail.
Do we have other use cases which demand the need for giving access to the init process from a hook?

On Mon, Oct 12, 2015 at 01:18:28PM -0700, Vish Kannan wrote:

The init process is a runC thing.

Regardless of implementation, a runtime will almost certainly need to
call setns(2), unshare(2), pivot_root(2) or some such activity before
execing the user-specified container process.  I don't know how you'd
do that without some runtime-specified code being run in the container
process before the user-specified code is executed.

In my mind, pre-start hooks are launched when the container
environment has been established.

Agreed.  And the container isn't established until there's a process
in there holding open PID namespaces, mount namespaces, etc., etc.

Do we have other use cases which demand the need for giving access
to the init process from a hook?

What do you mean “giving access”?  Just “listing the
container-process's PID in the pre-start state JSON”?

On Mon, Oct 12, 2015 at 01:33:20PM -0700, W. Trevor King wrote:

Mon, Oct 12, 2015 at 01:18:28PM -0700, Vish Kannan:

The init process is a runC thing.

Regardless of implementation, a runtime will almost certainly need
to call setns(2), unshare(2), pivot_root(2) or some such activity
before execing the user-specified container process.  I don't know
how you'd do that without some runtime-specified code being run in
the container process before the user-specified code is executed.

@vishh pointed out that the unshare and pivot_root calls can live in a
separate container-side process that exits before the process that
will become the user-specified container process starts 1.  You'll
still need runtime-specified setns calls in the process that will
become the user-specified container process, but if you allow for a
missing PID namespace at pre-start time those hooks may land in the
window between the two container processes:

Launch container-side setup process to unshare, pivot_root, etc.
Bind mount those new namespaces somewhere persistent.
Container-side setup process exits.
Run pre-start hooks
Launch container-side process to unshare a PID namespace (if the
user wanted a new one), configure uid/group mappings, setns,
setuid, setgid, setgroups, drop caps, and exec user-specified code.

You can get a fair ways toward handling its unshare/setns bits with
util-linux's unshare(1) and nsenter(1).  But by the time you add all
the rest of the logic I still think you're outside the realm of what's
easily possible with stock binaries, and we might as well just use the
same container process for (1) and (5).
So I don't think it's a particularly large win to support the “two
separate container process's” runtime implementation.  And once you've
got a single container process, your pre-start hooks can rely on
having a PID namespace and a useful PID in their state JSON.
Am I missing something?

with hooks being in the spec, the setting of this should be supported.
Closing this issue.

On Wed, Mar 16, 2016 at 10:24:02AM -0700, Vincent Batts wrote:

with hooks being in the spec, the setting of this should be supported.

This issue was “how do we want to support things like oom_score_adj”,
with me arguing for folks to handle it in a hook instead (option 2 in
the topic post) of adding a new config-side setting (option 1) or the
user-configured application (option 3).  The bigger picture issue is
which kernel APIs this spec wraps and how thin a wrapper it should be
(see also 1).  I think those are still important questions to sort
out, but in this case #222 chose in favor of a new config-side
setting.  @vishh had a few comments/links motivating that choice
[2,3,4], but I'm still not clear on why a config-side setting was
chosen over the hook-based approach 5.
Anyway, I'm happy to continue this discussion on the mailing list, or
as needed as new settings are proposed.
 Subject: removal of cgroups from the OCI Linux spec
 Date: Wed, 28 Oct 2015 17:01:59 +0000
 Message-ID<EMAIL_ADDRESS>


DatePicker: fix range-separator not working with more than one instances

Please makes sure these boxes are checked before submitting your PR, thank you!

[ ] Make sure you follow Element's contributing guide (中文 | English).
[ ] Make sure you are merging your commits to dev branch.
[ ] Add some descriptions and refer relative issues for you PR.

#3174

这个支票没问题

This merge seems to cause bugs: #3503, #3479

@OuYancey This doesn't cause #3479. Plus #3503 is not a bug.

@Leopoldthecoder sry, my mistake.


Fix tests badge

This PR fixes the test badge displayed by the README.
This was raised in #4.

Closing. DDuplicate of #7


rauc: 1.5.1 -> 1.6

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for rauc is: "Safe and secure software updates for embedded Linux"
meta.homepage for rauc is: "https://rauc.io"
meta.changelog for rauc is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
Warning: no invocation of /nix/store/9zb9dkijbvqgi5frshwjjlbyc4llv7mq-rauc-1.6/bin/rauc had a zero exit code or showed the expected version
0 of 1 passed binary check by having a zero exit code.
0 of 1 passed binary check by having the new version present in output.
found 1.6 with grep in /nix/store/9zb9dkijbvqgi5frshwjjlbyc4llv7mq-rauc-1.6
found 1.6 in filename of file in /nix/store/9zb9dkijbvqgi5frshwjjlbyc4llv7mq-rauc-1.6

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
0 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
rauc

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/9zb9dkijbvqgi5frshwjjlbyc4llv7mq-rauc-1.6 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A rauc https://github.com/r-ryantm/nixpkgs/archive/5ed3fa48800fbe017895793f886efe41415976f0.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/9zb9dkijbvqgi5frshwjjlbyc4llv7mq-rauc-1.6
ls -la /nix/store/9zb9dkijbvqgi5frshwjjlbyc4llv7mq-rauc-1.6/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

rauc

Maintainer pings
cc @emantor for testing.

Result of nixpkgs-review pr 159728 run on x86_64-linux 1

1 package built:

rauc


Samsung 2016 - Updated Power Off Command

From @Highpressure on August 19, 2017 21:24
New Samsung dont react with PowerOff or PowerOn Command
KEY_POWER is the new way to go
reference: https://github.com/Ape/samsungctl
tested and confirmed on UE65KS9080
Copied from original issue: soef/ioBroker.samsung#8

From @Highpressure on September 4, 2017 9:41
I can do both, turn off and on with KEY_POWER while I cant do it with KEY_POWEROFF
if its in deep standby I have to use wake on lan magic packet, otherwise it wont wake up
I´ve used a modified version based on this: https://github.com/Stefan0875/iobroker.samsung2016 (to wake up). In Stefans Version is somewhere a bug that does not trigger the state to change, so his version always tries to fire up the tv with a magic packet, even when its up and running.

From @soef on August 24, 2017 14:40
In Version 0.2.5 I have chaged the power key and some smal other changes. In your reference link also KEY_POWEROFF is used. I don't have a 2016 TV. Can you turn on your TV (if it is in standby) via KEY_POWER command?

From @soef on September 4, 2017 13:34
Thank you for the info. Does the current version of this adapter work with your TV?

From @Highpressure on December 28, 2017 23:55
yes, but not the power up - you need wake on lan for this
refer to https://github.com/Stefan0875/iobroker.samsung2016

power off is in newest version


Add unit tests

Unit tests needs to be written for known reasons.

I can contribute to this but I am still not confident with the algorithm. If someone else can lead the effort  I think that would be better.


DCOS-6128: Fix dashboard panel graphs

Explicitly set height on dashboard panels for IE to render the graphs.

Reviewer: @rcorral

Seems legit 👍


How to use matlab to run this project?

Hello, I am currently using tensor to do some EEG signal processing, and some of the methods in this project are very helpful to me. But I don't how to run this project by matlab. Maybe I need some help from you! Thank you very much!

Hi,
Can you try to explain which steps you have already taken, and where the issue arises? E.g. have you tried to run the tests and simulations? You can decrease the simulated data size to speed up the simulations.

Hi,
Thanks for your reply! maybe I make a big mistake, my matlab is 2017a, and I haven't install all dependencies, and I was upgrading and installing them yesterday, now it runs. Thanks for your project,  It helped me a lot. If I have any other question, could I ask you?

Great, I'm glad to hear it worked for you.
Yes, please do, I'm glad you can use the code.


It would be useful to not run as root

I had a build which ran up mysqld but would fail as master is running as root so it has to run on a slave there is no reason I can think of to run as root ?
adding
USER jenkins
to the Dockerfile would be useful to me.... I dont know what others might thing ?

root user in a container is not really a root user from a conventional point of view. User name spaces are coming into next docker release.

Indeed in this case mysqld would fail to start in a test as it would see it self as running as root.  I wonder if there are other scenarios ?


Histogram blocks refactored

Histogram Block Refactoring
Motivation
When using histogram loss, loss calculation can take up a significant portion of the training process.
This PR tries to improve on that by refactoring the original implementation of the losses while staying
consistent with the output of the original implementations.
Content
This PR contains refactored histogram losses. It adds a common base class to make future additions simpler as well as to
reduce code duplication. Common functionality, such as the kernel methods for resizing (sampling), pixel counting, and intensity scaling have been extracted into functions found in the new base class module.
Results
The refactored histogram blocks are now significantly smaller and easier to understand (at least in my opinion🤔).
The public interface and default parameters have been kept as-is, so no changes should be required on the caller side.
Performance tests showed an improvement of >5x for each RGB-uv, rg-chroma, and Lab blocks using their respective default parameters.
This performance improvement only increases on non-datacentre class hardware, such as consumer and professional GPUs.
The performance uplift on consumer grade hardware has been observed to be up to 20x due to hardware limitations of these devices (primarily due to the very limited double precision support).
Accuracy w.r.t. to the original implementation is acceptable. In all but some synthetic tests, mean deviation between original and refactored versions are well within the machine epsilon of 32-bit floating point maths.
Limitations
The refactored version drops support for input images bigger than about 2.1 gigapixels (i.e. roughly 45,000 by 45,000 pixels).
I personally don't think this limitation will pose an issue in the foreseeable future, but I think it's worth mentioning nonetheless😉.
And finally: thank you for your great work and for publishing your code!

Hi @patlevin,
Thank you so much for your contribution and all the effort in testing and explaination. I am quite busy those two weeks and I will do my best to check the PR soon.
Thanks again!


Ciara

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: cmhawkins sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@cmhawkins Can you provide some context in the pull request description and name for what this PR is to accomplish?

Hi Connie, I’m an explore intern working on the Portability Analyzer and I
meant send it to our local repo.  Sorry again for the confusion
On Fri, Jul 5, 2019 at 1:57 PM Connie Yau<EMAIL_ADDRESS>wrote:

@cmhawkins https://github.com/cmhawkins Can you provide some context in
the pull request description and name for what this PR is to accomplish?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/dotnet-apiport/pull/777?email_source=notifications&email_token=AH6IUQAEOD7A4H3GB6KATLLP56YTPA5CNFSM4H5JMUJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKJS6Q#issuecomment-508860794,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH6IUQAXF5GJEKFQ3HIIVLLP56YTPANCNFSM4H5JMUJA
.

--
Ciara Hawkins
North Carolina Agriculture and Technical State University
B.S Computer Science, B.S Applied Mathematics
Class of 2021


Legend Customization

Most of the answer I found uses append or the ctx things. I know there is legendCallback and generateLabels in the doc but I can't seem to figure out how to use them.
Is there nothing like just getting the legend values then just return them like return label[0] + '<br>' + label[1]; kind of thing? Just like in the tootltips in which you can just get the data then return them how you would like them to look like.
You can refer here for more info.

The legendCallback is used with chartInstance.generateLegend to generate an HTML string that can be inserted into the page to form a legend for the chart.
generateLabels is used with the on canvas legend to figure out which items will display and returns an array of objects containing this information.

Closing as answered


"Error occurred while loading images" for no apparent reason #2413

"Error occurred while loading images" for no apparent reason
Fixes #2410
What changes did you make and why?
Checked in handler error.
Tests performed (required)
Tested on {Asus Zenfone Max M1 pro} with API level 27

Codecov Report

Merging #2417 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #2417      +/-   ##
=========================================
- Coverage    6.03%   6.03%   -0.01%
=========================================
  Files         242     242
  Lines       11872   11873       +1
  Branches     1072    1073       +1
=========================================
  Hits          716     716
- Misses      11100   11101       +1
  Partials       56      56

Impacted Files
Coverage Δ

...rw/commons/explore/images/SearchImageFragment.java
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd9e629...f443495. Read the comment docs.

@nicolas-raoul Please review this.

Sorry I don't have any time left for reviews until summer :-/

Okay

This has already been fixed


time termination criterion is limited to 24 hours maximum

First thank you for the amazing framework !
Just a small detail that can be corrected really quickly in the current stable version 0.6.0:
Time, as a termination criterion, is limited to 24 hours, which is limiting for big experiments.
Would it be possible to change it to accept any number of hours ?

Thank you! Can you elaborate on where you find that the time is limited? Are you referring to TimeBasedTermination?

Yes exactly, this is the link to the doc:
https://pymoo.org/interface/termination.html "Based on Time"

Good catch! The time formatting can only handle up to 24 hours. You can also directly provide the seconds in the current version.
For the next version, please see my commit which passes this test:
from pymoo.termination.max_time import TimeBasedTermination

def test_time_based_termination_more_than_one_day():
    termination = TimeBasedTermination("99:00:00")
    assert termination.max_time == 356400

    termination = TimeBasedTermination("105:10:00")
    assert termination.max_time == 378600

    termination = TimeBasedTermination("40")
    assert termination.max_time == 40

    termination = TimeBasedTermination("1:40")
    assert termination.max_time == 100

Does that work for you?


Add a dynamic infinite grid to the 3D editor (3.2)

Backport of #28289 to the 3.2 branch.

The grid is now infinite, it follows the camera.
The grid is now dynamic, if you zoom in and out, the grid subdivides, expands, and fades.
You can now enable grid planes for the XY and YZ planes. Only the flat XZ plane is enabled by default. Each plane is independently dynamic of the others.
The default grid size has been increased to 200, and the maximum has been increased to 2000. At 1000, the grid mostly looks edgeless.
If you set the division level max and min to the same value then the grid does not expand or subdivide, but instead stays the same size and just follows the camera. Also, if these values are the same, the bias value does nothing.
If you want to have Blender-like behavior, set max to 1, min to 0, and set the bias to a really low value. You may also wish to increase the grid size if you have a small bias.

I applied https://github.com/godotengine/godot/pull/43272 locally on top, but this PR causes constant redrawing when the grid is displayed.
@aaronfranke Do you know how this could be fixed?

If we are backporting this, it might also make sense to backport #39743. An infinite grid might tempt users to zoom out really far and break the editor (as I did...), so we should prevent users from zooming to unreasonable levels.

Rebased on the latest 3.2 branch. Constant redrawing is now fixed.

Thanks!


Add Crazy x Ultimate by Creo

Song Name
Crazy x Ultimate
Artist Name
Creo
Source
Youtube
Youtube Link
6WQSSTq0p2g
Direct File Link
No response
Song ID
905108
Start Offset [ms]
1190
Extra
Created from Auto Nong.
Created for level: 86018142
Downloaded: Yes

accept


VS Code extension folding with multiple lines of decorators is broken

Currently folding in VS Code hides too much of the folded item, so you can't identify it.
For example folding
  @open
  @complex model customSecurityAttributeValue {
  }

shows the following:

Whereas folding:
@open
  @complex model customSecurityAttributeValue {
    dooo: int32;
    hooo: int32;
    vooo: int32;
    gooo: int32;
    mooo: int32;
    zooo: int32;
    booo: int32;
  }

shows:

Expected:
In both cases, the content of the model should be folded
Actual:
Both cases are broken, albeit differently.

For comparison this is what TypeScript does: create 2 folding region (1 for the doc comment and one only for hte class content) Doesn't seem like the decorator can get folded

@garethj-msft is this still reproing for you? I works fine for me

Closing issue based on Timothee's comment. @garethj-msft if you continue to see this issue please reopen.

@mario-guerra @timotheeguerin  I don't have the rights to re-open, but yes it's still reproing for me today.

ok so actually repro it didn't when involving a comment above, not sure why I was trying with that.

to note however, if you format the file it gets converted to
@open
@complex model customSecurityAttributeValue {
  dooo: int32;
  hooo: int32;
}

which then has correct folding

so this is only when there is a single folding for decorator and model


padding not working for InfiniteListView.separated

Padding works fine in the cross axis. Its infinite in the other, so no padding on that.


I have same questions

Thanks you for you make this code, is very good for me understanding.
Here:
https://pennylane.ai/qml/demos/tutorial_quantum_transfer_learning.html
@qml.qnode(dev, interface="torch")
def quantum_net(q_input_features, q_weights_flat):

    # Reshape weights
    q_weights = q_weights_flat.reshape(q_depth, n_qubits)

    # Start from state |+> , unbiased w.r.t. |0> and |1>
    H_layer(n_qubits)

    # Embed features in the quantum node
    RY_layer(q_input_features)

    # Sequence of trainable variational layers
    for k in range(q_depth):
        entangling_layer(n_qubits)
        RY_layer(q_weights[k])

    # Expectation values in the Z basis
    exp_vals = [[qml.expval](https://docs.pennylane.ai/en/stable/code/api/pennylane.expval.html#pennylane.expval)([qml.PauliZ]

(https://docs.pennylane.ai/en/stable/code/api/pennylane.PauliZ.html#pennylane.PauliZ)(position)) for position in range(n_qubits)]
return tuple(exp_vals)
He make use of reshape weights, but your code no make use. Why? Whts is difference?
Also here:
https://github.com/christorange/QC-CNN/blob/6f498d25de4187b730f7b146ad691e95520ed2d9/models/single_encoding.py#LL36C4-L42C43
 x_lst = []
for i in range(0, x.shape[2]-1,2):
    for j in range(0, x.shape[3]-1,2):
        x_lst.append(self.ql1(torch.flatten(x[:, :, i:i + self.kernel_size, j:j + self.kernel_size], start_dim=1)))
x = torch.cat(x_lst,dim=1)  # .view(bs,n_qubits,14,14)

What is the prupose of x_lst and make loop after? I no understand.
If want make process 64x64 image, what change neem make?
Thanks you and sorry for bad english.

q_weights_flat is a flattened weight tensor and needs to be transformed to the desired shape with reshape. In our code, weights are already in shape: weight_shapes = {"weights": (n_layers, 2 * n_qubits)}
The loop implements convolution operation, since we're writing a customized layer here the convolution has to be implemented manually. x_lst is to store the output of convolution, then get concatenated to X to form the output feature map.
Firstly you need to change the boundary of convolution operation according to your selected kernel size and stride, then change the input of linear layer to fit the output size of QNN layer. Set image_x_y_dim to your image size.

Thanks you so much, very helpful.
More question,  here:
# Embed features in the quantum node
RY_layer(q_input_features)

They make embedd features before quantum circuit, you not make this?
Thanks

The 'features' are equivalent to the 'inputs' in my code: def circuit(inputs, weights). Each of my model has encoding gates, embedding and encoding are equivalent too.


Unable to pre-download imagery from Settings anymore

It used to work (mostly - see e.g. https://github.com/Zverik/every_door/issues/589) in the past.
Now I'm trying in 4.1 and pre-download of satellite/aerial imagery doesn't seem to work at all. EveryDoor 4.1.0 from F-droid.
Loading it on-demand while panning the map while internet is present work just fine, though!
Here is video:
https://github.com/Zverik/every_door/assets/156656/3c74f359-4d88-4132-a506-ff2d7369f9a7
Some important timestamps:

0:24 try to click download arrow to download satellite "Esri World Imagery" imagery. Nothing happens (before, IIRC it turned to pie-chart icon showing how much download has progressed).
0:35 disable WiFi
1:00 see there is blank  grey screen instead of satellite background map when trying to switch to it
1:18 choose different ("dgu.hr: Croatia 2019-2020") aerial map imagery (after re-enabling WiFi first)
1:26, 01:33, 01:40 try to download that different aerial. Still no indication that download is happening.
1:43 disable WiFi again
1:52 see there is blank  grey screen instead of aerial background map when trying to switch to it
2:19 show system log which seems to have some errors
2:31 enable WiFi
2:41 when trying to switch to aerial background map, it works and loads it without an issue.
2:47 disable WiFi again
2:50 switch to aerial background map. It shows the aerial map tiles cached at 2:41 normally.

Yes, that's likely. I honestly haven't used the downloading feature since I made it. I will tackle this with #576.

Mine has the same response too (that pressing the Download button in satellite images does nothing), but I'm surprised that it was even possible in the first place, as none of the editors I have encountered so far has an offline satellite image feature.
That said, I'd like to have that feature returned as well, as satellite imagery can be useful both for navigation and for counterchecking (mismatch between OSM and satellite imagery can quickly reveal outdated features).


Players/npcs should be included in unified initiative blocks.

The initiative tracker should treat all PCs adjacent to each other as a single block, and all NPCs adjacent to each other as a single block. It would draw a box around the topmost entry and below the bottom-most entry in each block.
The mod should retain the ability to mark characters as "hidden" or defeated" in initiative order.
as well as the ability to right click on any character to open a menu with the options "Update Participant", "Clear Initiative", "Re-roll Initiative", and "Remove Participant".
Also look into how the "current actor" functionality would be affected by this.

This can be accomplished via the Combat Tracker Groups module.


Add to_dataframe to TTree

Add to_dataframe to TTree for converting TTree to a pandas.DataFrame.

Hi! Thanks for your first pull request, but did you know that library="pd" can be passed to any array-fetching function (e.g. uproot.TTree.arrays)? That does what this to_dataframe would do. (It's here in the documentation.)

Hi! Thanks for your first pull request, but did you know that library="pd" can be passed to any array-fetching function (e.g. uproot.TTree.arrays)? That does what this to_dataframe would do. (It's here in the documentation.)

Thank you very much. There are few challenges for using library="pd". It does not play nice with "vector" leaf type, it creates subentry for an events, instead we want 1 event per row in the df. Also tree.arrays(library="pd") takes way too long to run when "vector" leaf type variables are present in the tree.

By "vector" leaf type, do you mean jagged arrays? A function that puts a list of numbers into a Pandas cell (as opposed to expanding that list into one number per cell, tracked by a MultiIndex) would have to have a name that clearly specifies that that's what it does.
I don't know of any Pandas functions that can deal adequately with non-numeric values in cells. It represents them as Python lists or NumPy arrays, and then you're forced to manipulate them with Python iteration, using one of the various map functions in Pandas. That doesn't scale to large datasets.

Thank you so much for your help!


fix: resolve linting

:tada: This PR is included in version 1.0.7 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


kube2iam needs to run before all other pods

Setup

kube2iam enabled
Run any pod that needs to assume a role with some access privilege that the default controller/worker role does not have
Perform any action which will cause instances to be created - create/update stack, autoscaling up

Expected Outcome
Newly created nodes work transparently with kube2iam and pod startup on new nodes is deterministic.
Actual Outcome
What happens in this situation is currently a bit non-deterministic:

If the kube2iam pod comes up first, it will start to intercept the AWS metadata calls and the other pods should get the correct permissions.
If the other pods come up first, they will receive the standard controller/worker role and if that doesn't have the correct access they tend to restart. Depending on how the pod/app works, even on restart they may attempt to use the same controller/worker role that won't work. That in turn means they will go into the CrashLoopBackoff state. This can also happen if the node has many pods scheduled to begin with and kube2iam comes up last (I know as I've seen this happen as well).

Workaround
Detect any pods in the crash loop backoff state, i.e. the ones that started prior to kube2iam. Delete them meaning fresh pods are started using the appropriate role links via kube2iam.
I'm not sure if there is any better workaround or how others are dealing with the same situation.

@c-knowles Good point 👍
How about dealing it by adding a freshly started node an "Unschedulable" or "EC2MetadataServiceNotReady" taint to prevent pods other than kube2iam from scheduling?
After the kube2iam pod becomes ready, we can automatically untaint the node to start scheduling other pods. This way, no workaround would be required on user-side. WDYT?

No intervention from the user is the ideal state yes so if that's easy then we could try it. Another idea I was considering is to use a k8s Initializer to pause initialization of a pod until kube2iam is ready on the same node. That could also provide the ability for pods to not get initialized on nodes where kube2iam is down outside of node creation. Having written that I'm considering if this should be part of kube2iam rather than kube-aws.

I've contacted the creator of kube2iam in the hope they can shed some light on this problem.

@mumoshu what do you think about doing this as a Kubernetes Initializer?  I'm wondering when running kube2iam whether it failing should contribute to node health.

@c-knowles Thanks for your continuous efforts in this area!
Just curious but how would the initializer work when kube2iam was failing?
My guess was that it just pends the pod to start up until kube2iam becomes up and running - but the outcome would be as same as done with taints?
Probably I'm missing something 🤔

If kube2iam goes down not during node cycling, the initializer would ensure subsequent pods do not initialize until it's back online.
Overall I wanted this change to help clean up node start up. If we used an initializer maybe it is less clear we are targeting only that aspect. Perhaps apps would start to rely on it when they do not restart correctly if they have the wrong permissions. This problem makes me think your taint way is better as it specifically only covers node startup and not the extra use cases which would be bad for resiliency.

@mumoshu yes I agree with your assessment and also wondering if the kiam you mentioned would work better for us.


svix-bridge: Variable substitution failed: envsubst error: variable value '{cmd}' contains forbidden character '{'

Bug Report
hello,
just wanted to report that the configs in the repo are not working for me currently.
c:\working\rust\svix-webhooks\bridge>cargo run --no-default-features --features gcp-pubsub,rabbitmq,redis,sqs -- --cfg-file svix-bridge.example.senders.yaml
    Finished dev [unoptimized + debuginfo] target(s) in 2.13s
     Running `target\debug\svix-bridge.exe --cfg-file svix-bridge.example.senders.yaml`
Error: Custom { kind: Other, error: "Variable substitution failed: envsubst error: variable value '{cmd}' contains forbidden character '{'" }
error: process didn't exit successfully: `target\debug\svix-bridge.exe --cfg-file svix-bridge.example.senders.yaml` (exit code: 1)

c:\working\rust\svix-webhooks\bridge>cargo run --no-default-features --features gcp-pubsub,rabbitmq,redis,sqs -- --cfg-file svix-bridge.example.receivers.yaml
    Finished dev [unoptimized + debuginfo] target(s) in 1.97s
     Running `target\debug\svix-bridge.exe --cfg-file svix-bridge.example.receivers.yaml`
Error: Custom { kind: Other, error: "Variable substitution failed: envsubst error: variable value '{cmd}' contains forbidden character '{'" }
error: process didn't exit successfully: `target\debug\svix-bridge.exe --cfg-file svix-bridge.example.receivers.yaml` (exit code: 1)

Description
git clone https://github.com/svix/svix-webhooks
cd svix-webhooks\bridge
cargo run --no-default-features --features gcp-pubsub,rabbitmq,redis,sqs -- --cfg-file X

Versions
svix-bridge v1.12.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge)
├── svix-bridge-plugin-queue v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-plugin-queue)
│   ├── omniqueue v0.1.0 (https://github.com/svix/omniqueue-rs?rev=247904053bcf90cf693df4429092923bf97770eb#24790405)
│   ├── svix-bridge-types v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-types)
│   │   ├── svix v0.85.1
├── svix-bridge-types v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-types) (*)
├── svix-ksuid v0.7.0
svix-bridge-plugin-queue v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-plugin-queue) (*)
svix-bridge-types v0.1.0 (C:\working\rust\svix-webhooks\bridge\svix-bridge-types) (*)

Platform
windows 10 64bit

This one is puzzling. Putting this on the sprint plan for next week. Thanks for the report.

Note to self: it'll be interesting to see if the windows build can run with an "empty" config or if it gives the same error.
Running with --cfg "{}" should let the process startup, complaining about the fact it doesn't have any senders or receivers configured but it should still run 🤔
Will need to lay hands on a Windows system to see what's going on.

@davehorner could you try running with --cfg "{}" to see if you get the same error, or if it happens to bypass the envsubst error?

C:/working/rust/svix-webhooks/bridge> cargo run --no-default-features --features gcp-pubsub,rabbitmq,redis,sqs -- --cfg "{}"
    Finished dev [unoptimized + debuginfo] target(s) in 30.50s
     Running `target\debug\svix-bridge.exe --cfg {}`
Error: Custom { kind: Other, error: "Variable substitution failed: envsubst error: variable value '{cmd}' contains forbidden character '{'" }
error: process didn't exit successfully: `target\debug\svix-bridge.exe --cfg {}` (exit code: 1)

happening in envsubst substitute.
pub fn substitute<T>(template: T, variables: &HashMap<String, String>) -> Result<String, Error>
where
    T: Into<String>,
{
    let mut output = template.into();
    if variables.is_empty() {
        return Ok(output);
    }

    for (k, v) in variables {
        validate(k, "key")?;
        validate(v, "value")?;

        let from = format!("${{{}}}", k);
        output = output.replace(&from, &v)
    }

    Ok(output)
}

The value that is causing it to go mad when under debug in vscode is:
"VSCODE_NLS_CONFIG"
"{"locale":"en-us","osLocale":"en-us","availableLanguages":{},"_languagePackSupport":true}"

I'm not sure what to think.  I'm not sure why value substitution would be checking the contents of the value being substituted for invalid replacement characters.

@svix-onelson could you set an environment variable = "{}" and see if that fails in a similar way?

@davehorner yep, you nailed it. 🙏🏻
$ BAD_VALUE="{repro}" cargo run -- --cfg "{}"
    Finished dev [unoptimized + debuginfo] target(s) in 0.22s
     Running `target/debug/svix-bridge --cfg '{}'`
Error: Custom { kind: Other, error: "Variable substitution failed: envsubst error: variable value '{repro}' contains forbidden character '{'" }

This is solvable a couple of ways - either by forking and trying to upstream a fix to envsubst, but it almost seems like this might be working as intended 😅
Still, if that's the case the lib is not fit for purpose in our case. The next best option is probably to roll our own version and keep it here in the source tree, but loosen the restriction on values.
Glad to have a solid repro! Will add this to the test suite so we don't catch a regression later, and will work towards a fix.

We might take a look at https://github.com/fizyr/subst?

@davehorner a fix for this just landed in main. We've switched over to a different lib to do the variable substitution, and my testing indicates we should be good to go now. Please let us know if you still see an error on your end and we'll dig to see what's missing 🙏🏻


"learning rate" vs "lr"

tf.keras still uses lr, and F. Chollet noted Keras' development onward will orient around tf.keras - this said, why was lr renamed to learning_rate in Keras 2.3.0? I personally prefer lr, and doubt much clarity is lost as lr is a universal parameter in machine learning. More importantly, I'm making a custom optimizer, and this difference complicates compatibility with keras and tf.keras.

Now ReduceLROnPlateau callback doesn't work, since it expects "lr" attribute from the optimizer.

Updated; still interested in rationale to switching to learning_rate.

Hello.
I change my keras version to 2.2.5,but the ReduceLROnPlateau callback still doesn't work.
How should I solve this problem?


Debugger: Add Grpc connection

Similar to #1027 - will need to wait until the next gax version for the improved ApiCore\Serializer

@dwsupplee @jdpedrie @michaelbausor With the new gax version available with the improved Serializer, this is ready for review.

I think this should take an explicit dependency on google/gax rather than delegating the requirement to google/cloud-logging. If an old version of logging is installed, debugger could fail due to an old version of gax.

I agree with @jdpedrie. It seems fair to require those, or at the very least make sure we are on top of being stricter with the version of Logging.

@dwsupplee Added the unit test.
@jdpedrie Added the explicit dependencies on gax and proto-client


How do I know if two FermionOperator terms are identical?

Hi all,
given two FermionOperators, e.g. term1 = 1 [0^ 0 1^ 1] and term2 = 1 [1^ 1 0^ 0], can OpenFermion tell me if they are identical? If I use the SymbolicOpertor eq-method  term1 == term2, I get "False" as an output, probably because it does not first write term1 and term2 in an ordering of for instance normal-ordering+lowest-to-highest indices, where both operators would read term1 = -1 [0^ 1^ 0 1] = term2.
So: How do I check if two FermionOperators are identical (without using get_sparse_operator() and comparing the matrices, I want to avoid that if possible)?
I hope this is not too dumb a question, cheers
Michael

As a convention we never automatically normal order and always require that the user does that explicitly, because its very costly. So just use
normal_ordered(term_1) == normal_ordered(term_2).
But be warned that equality testing is never completely safe when we're dealing with floats. So a more robust thing to do would be
difference_operator = normal_ordered(term_1 - term_2)
bool(difference_operator.induced_norm() < 1e-8)
or something like that.


Tie SCC lifecycle with KataConfig

Fixes: KATA-156

- Description of the problem which is fixed/What is the use case
The custom SCC created by the operator doesn't get deleted on the removal of KataConfig
@gkurz attempted to fix the issue in the following PR https://github.com/openshift/sandboxed-containers-operator/pull/191.
However, triggered by the suggestion from @littlejawa, we felt its logical to align the SCC lifecycle with the KataConfig lifecycle in further discussions. There is no reason to keep the SCC handling separated since kata-monitor pods use the custom SCC, and kata-monitor pods get created only after KataConfig creation. Thanks to @littlejawa and @gkurz for forcing us to relook at the issue which resulted in this PR. With this PR, the SCC gets created on KataConfig creation and cleaned up on deletion of the KataConfig.
- What I did
Changed how SCC gets created and deleted
- How to verify it
Check whether the customer SCC gets deleted after KataConfig deletion
- Description for the changelog

Tie SCC lifecycle with KataConfig

/assign @gkurz

I'm skipping the test case commit as I don't really have the knowledge to review. Rest looks good.

/retest

@bpradipt: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
Test name 	Commit 	Details 	Required 	Rerun command
ci/prow/4.9-sandboxed-containers-operator-e2e 	7ef52bc link 	false 	/test 4.9-sandboxed-containers-operator-e2e
ci/prow/sandboxed-containers-operator-e2e 	7ef52bc link 	false 	/test sandboxed-containers-operator-e2e
Full PR test history. Your PR dashboard.

The tests seems to be failing because of infra problems, not related to the changes in this PR.

/retest

/retest

/retest

/retest

last try
/retest