runtime: nacl/arm build is failing

The nacl/arm build has been failing for some time, this has been exacerbated by the irregularity of access to a nacl/arm builder (which cannot currently be run by our build farm on scaleway)
http://build.golang.org/log/01c873c2363df1c651e2f3ac0114b2a6bb46058e
The ./make.bash stage completes, but every binary produced fails to run under sel_ldr_arm.
Various attempts to debug this, or coax more information out of sel_ldr_arm have failed.
Here is some debugging output using pepper44 (previously tried with pepper41 with the same result)
[root@alarm src]# env GOOS=nacl GOARCH=arm go test -x -v bufio
WORK=/tmp/go-build079271012
mkdir -p $WORK/bufio/_test/
mkdir -p $WORK/bufio/_test/_obj_test/
cd /root/go/src/bufio
/root/go/pkg/tool/linux_arm/compile -o $WORK/bufio/_test/bufio.a -trimpath $WORK -p bufio -complete -buildid e9988b6efe45138d111b0061dcbb0afd2144d4d0 -D _/root/go/src/bufio -I $WORK -pack ./bufio.go ./scan.go ./export_test.go
mkdir -p $WORK/bufio/_test/_obj_xtest/
/root/go/pkg/tool/linux_arm/compile -o $WORK/bufio/_test/bufio_test.a -trimpath $WORK -p bufio_test -complete -D _/root/go/src/bufio -I $WORK/bufio/_test -I $WORK -pack ./bufio_test.go ./example_test.go ./scan_test.go
cd $WORK/bufio/_test
/root/go/pkg/tool/linux_arm/compile -o ./main.a -trimpath $WORK -p main -complete -D "" -I . -I $WORK -pack ./_testmain.go
cd .
/root/go/pkg/tool/linux_arm/link -o $WORK/bufio/_test/bufio.test -L $WORK/bufio/_test -L $WORK -w -extld=gcc -buildmode=exe $WORK/bufio/_test/main.a
/root/bin/go_nacl_arm_exec $WORK/bufio/_test/bufio.test -test.v=true
++ go env
+ eval 'GOARCH="arm"' 'GOBIN=""' 'GOEXE=""' 'GOHOSTARCH="arm"' 'GOHOSTOS="linux"' 'GOOS="nacl"' 'GOPATH="/root"' 'GORACE=""' 'GOROOT="/root/go"' 'GOTOOLDIR="/root/go/pkg/tool/linux_arm"' 'GO15VENDOREXPERIMENT=""' 'CC="gcc"' 'GOGCCFLAGS="-fPIC' -marm '-fmessage-length=0"' 'CXX="g++"' 'CGO_ENABLED="0"'
++ GOARCH=arm
++ GOBIN=
++ GOEXE=
++ GOHOSTARCH=arm
++ GOHOSTOS=linux
++ GOOS=nacl
++ GOPATH=/root
++ GORACE=
++ GOROOT=/root/go
++ GOTOOLDIR=/root/go/pkg/tool/linux_arm
++ GO15VENDOREXPERIMENT=
++ CC=gcc
++ GOGCCFLAGS='-fPIC -marm -fmessage-length=0'
++ CXX=g++
++ CGO_ENABLED=0
+ export NACLENV_GOARCH=arm
+ NACLENV_GOARCH=arm
+ export NACLENV_GOOS=nacl
+ NACLENV_GOOS=nacl
+ export NACLENV_GOROOT=/go
+ NACLENV_GOROOT=/go
++ pwd
++ sed 's;/root/go;/go;'
+ export NACLENV_NACLPWD=/go/src/bufio
+ NACLENV_NACLPWD=/go/src/bufio
++ which sel_ldr_arm
+ exec nacl_helper_bootstrap_arm /root/bin/sel_ldr_arm -v -v -v -v --reserved_at_zero=0xXXXXXXXXXXXXXXXX -l /dev/null -S -e /tmp/go-build079271012/bufio/_test/bufio.test -test.v=true
[18590,1992093696:00:25:59.843452] NaClHandleReservedAtZero: Could not parse reserved_at_zero argument value of 0xXXXXXXXXXXXXXXXX
POST-ABORT: LOG_FATAL abort exit
signal: aborted (core dumped)
FAIL    bufio   0.098s

--reserved_at_zero=0xXXXXXXXXXXXXXXXX must be the first argument to sel_ldr_arm for the helper to detect it properly, so the error about parsing was due to the extra -v's I added. With that corrected, the output is now.
+ exec nacl_helper_bootstrap_arm /root/bin/sel_ldr_arm --reserved_at_zero=0xXXXXXXXXXXXXXXXX -v -v -v -v -l /dev/null -S -e /tmp/go-build551330618/bufio/_test/bufio.test -test.v=true
sel_ldr argument list:
/root/bin/sel_ldr_arm --reserved_at_zero=0x0000000040002000 -v -v -v -v -l /dev/null -S -e /tmp/go-build551330618/bufio/_test/bufio.test -test.v=true
Dumping vmmap.
In PrintVmmap
Done.
exit status 1
FAIL    bufio   0.273s

Ahh, it's a validation failure (maybe we shouldn't pass -l /dev/null ?)
https://gist.github.com/davecheney/f56e28ca4573f241d9fc

Here are the offending instructions
   0x001b5e54 <+84>:    ldr     r11, [pc, #1836]        ; 0x1b6588 <runtime/pprof.writeHeap+1928>
   0x001b5e58 <+88>:    str     r0, [sp, r11]                  <<<< this one
   0x001b5e5c <+92>:    ldr     r11, [pc, #1832]        ; 0x1b658c <runtime/pprof.writeHeap+1932>
   0x001b5e60 <+96>:    str     r0, [sp, r11]                  <<<<< and this one

I believe this was the offending commit, d4472799277102e461968fa059f49bc8b9b6e433

FWIW in the old versions of NaCl, if you didn't pass -l /dev/null then you got stderr spam every time you ran a program, which breaks output tests. So you had to take it off explicitly when you wanted the output, but leave it there by default. Maybe that's fixed (I did report the problem), but maybe not. I haven't checked recently.

@rsc, pepper44 has some nice new debug flags, including a -q. I'll leave the fettling of the nacl helper scripts for 1.6.
Via the build dashboard I have chased this back to 79986e24e0152ba448fd41d65eeb24ebdb6c7ec7, but I think this commit was just unlucky, not the cause.

Yup, that'll be the problem. Note the lack of BIC instructions to mask off the store address.
   0x001b5e38 <+56>:    ldr     r11, [pc, #1860]        ; 0x1b6584 <runtime/pprof.writeHeap+1924>
   0x001b5e3c <+60>:    add     r1, sp, r11
   0x001b5e40 <+64>:    add     r2, r1, #32
   0x001b5e44 <+68>:    bic     r1, r1, #-1073741824    ; 0xc0000000     <<< GOOD
   0x001b5e48 <+72>:    str     r0, [r1], #4
   0x001b5e4c <+76>:    cmp     r2, r1
   0x001b5e50 <+80>:    bne     0x1b5e44 <runtime/pprof.writeHeap+68>
   0x001b5e54 <+84>:    ldr     r11, [pc, #1836]        ; 0x1b6588 <runtime/pprof.writeHeap+1928>
   0x001b5e58 <+88>:    str     r0, [sp, r11]           <<< OOPS, no BIC r11, r11, n
   0x001b5e5c <+92>:    ldr     r11, [pc, #1832]        ; 0x1b658c <runtime/pprof.writeHeap+1932>
   0x001b5e60 <+96>:    str     r0, [sp, r11]
   0x001b5e64 <+100>:   mov     r0, #0

First two: https://go-review.googlesource.com/13010 and https://go-review.googlesource.com/13011.
Running nacltest.bash on my ARM Chromebook now.

Fixed. See #11961 for followup work.


dUMP kinase activity

I would like to see "dUMP kinase activity”, added to the GO ontology under the parent term "uridylate kinase activity” (GO:0009041).  The definition could be "Catalysis of the reaction: ATP + dUMP = ADP + dUDP”.  Example can be found in PMID: 3010881.

I don't think 'dUMP kinase activity' is a type of 'uridylate kinase activity' - it should probably be a GO:0019201 nucleotide kinase activity.
Pascale

But "2'-deoxyuridine 3'-monophosphate (CHEBI:46322) is a deoxyuridine phosphate (CHEBI:23641)" (ChEBI) and "Deoxyuridine monophosphate (dUMP), also known as deoxyuridylic acid or deoxyuridylate in its conjugate acid and conjugate base forms" (Wikipedia)

If "UMP kinase activity" (GO:0033862) is a child of "uridylate kinase activity" (GO:0009041, and the definition of "uridylate kinase activity" is "Catalysis of the reaction: ATP + (d)UMP = ADP + (d)UDP", why would "dUMP kinase activity" not be a child also?  That equation is really two equations with two alternate substrates (dUMP and UMP) and products (dUDP and UDP).  There are two separate enzyme activities implied in that equation: "UMP kinase activity"  and "dUMP kinase activity"

@slaulederkind OK - I missed that, thanks.
Pascale

@slaulederkind - added term as you requested.
Also added EXACT synonyms parallel to those of the existing EXACT synonyms of the existing "UMP kinase activity" term, but changing "UMP" to "dUMP" or "uridine" to "deoxyuridine". If you think any of these are inappropriate, let me know and I'll remove them.


minimize_scalar -- strange behaviour

Define simple function
func_1 = (lambda x: -5 * x**5 + 4 * x**4 - 12 * x**3 + 11 * x**2 - 2 * x + 1)
Hovewer,
optimize.minimize_scalar(func_1, (-0.5, 0.5))
rases OverflowError: (34, 'Numerical result out of range').
Definitely, there is a minimum in (-0.5, 0.5): {0.897633, {x -> 0.10986}}, and it could easily be found with Golden ratio method (or Brent).
What am I doing wrong?
Wolfram Mathematica easily deals with it. R's function optimize uses Brent method and has no problem with that.

Playing a bit with the bracket parameter you can easily find the solution. For instance, try (-0.1, 0.5) or a three-element bracket:
In [60]: minimize_scalar(f, (-0.5, 0, 0.5))
-0.5
0
0.5
0
-0.190983
0.190983
0.109652269292
0.116266754714
0.109432982468
0.109862906032
0.109859850423
0.109859915545
0.10985991391
0.109859912274
Out[60]:
     fun: 0.89763297189616675
    nfev: 11
     nit: 10
 success: True
       x: 0.10985991390956745

(here f is your function instrumented to print its argument on each call).
The bracketing algorithm can likely be made smarter. Other than that, I'd say it's not a bug.

Thank you for your quick response!
I see, what you mean.
Still I find it rather strange, that I need to supply 0.
Suppose, that I write this:
optimize.minimize_scalar(func_1, (-0.5, 0.5), method="Golden")
The function is infinitely smooth and doesn't have any sharp drops or anything, that could affect in (0.5, 0.5). It is unimodal.
"Golden" should work easily and find local minima. It should not need any third point.
The third point, as far as I know, is only needed, when you try to be clever in Brent.

I tried minimize_scalar(f, (-0.5,  0.5), method='golden') and it fails in exactly the same way, overflowing inside bracket.
As far as I can see, this can be interpreted as an enhancement request for improving the bracketing algorithm (likely, optimize.bracket). I suspect what's happening is that -5 x**5 grows quite fast, so if you make too large of a step, the value of the function is large and negative, while f(-0.5) and f(0.5) are of the order one and positive. Then the bracketing search just wonders all the way to overflow.
I think we could merge a pull request with an improvement, however it would then have to be made sure somehow that the change actually fixes more than it breaks for a range of functions.

Digging into this, it looks like there is a mismatch between the interpretation of a two-element bracket between scipy.optimize.minimize_scalar and scipy.optimize.bracket.
minimize_scalar says:

scipy.optimize.bracket says:

minimize_scalar says that if two points are provided; these are xa and xc, whereas bracket accepts xa and xb. (brent was fixed after this was reported in gh-5408, but golden is still wrong.)
The difference is important. Users of minimize_scalar would assume from the documentation that they should try to provide points on either side of the minimum, but in many cases, this could be exactly the wrong thing to do because bracket only looks for a third bracket point outside the interval. In the example above, yes, it expands the interval according to golden ratio until overflow occurs.

import numpy as np
from scipy import optimize

xs = []
def f(x):
    xs.append(x)
    return -5 * x**5 + 4 * x**4 - 12 * x**3 + 11 * x**2 - 2 * x + 1

try:
    optimize.bracket(f, -0.5, 0.5)
except OverflowError:
    pass
d = np.diff(xs)
print(d[1:]/d[:-1])

# [1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034
#  1.618034 1.618034 1.618034 1.618034 1.618034]

The documentation of minimize_scalar has been like this for a decade (and golden even longer), so I think we need to do two things:

Look at at least one point inside bracket when trying to complete the bracket, say (xa + (xb - xa)/golden_ratio).
Update the documentation of bracket/brack wherever it appears to summarize what bracket is going to do, and probably add a .. :: warning to bring this to the attention of users of root_scalar. It's pretty natural to assume that bracket should try to bound the solution, especially since the next parameter is bounds.

@ev-br since you looked into this issue in the past, could you take a look at the latest findings and opine on what else should be added to gh-17705?

@ev-br Thought I'd ping again because this includes at least a documentation issue that we should fix before 1.11.0.

A doc fix LGTM. There might be something to fix in the bracket itself, but it's best kept separate from a doc improvement.
On  a cursory look (all I can do ATM), a while loop without a cap on the number of iterations looks suspect. Not sure if it's related though.  https://github.com/scipy/scipy/blob/v1.10.1/scipy/optimize/_optimize.py#L2876

@mdhaber did you want to leave to this open for further improvements to the bracketing algorithm?

@seryrzu if you want to find a minimum within an interval, please provide the bounds argument, not bracket.
from scipy import optimize
def f(x):
    return -5 * x**5 + 4 * x**4 - 12 * x**3 + 11 * x**2 - 2 * x + 1
res = optimize.minimize_scalar(f, bounds=(-0.5, 0.5))
res.x  # 0.10985997156890048


Added generic Log method to extension.

See issue #629.

@ddobric,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@davidfowl could you take a look (you recommended a PR on #629)

ping @davidfowl

@ddobric,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Thanks @ddobric


Tidy project tree and full  symlink support

THIS PROJECT IS IN DEVELOPMENT MODE. Any pull requests should merge to branch dev, otherwise will be rejected immediately.
Describe your changes
Issue ticket number and link
Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.
[ ] I have checked readme and add important infos to this PR (if it needed).
[ ] I have added/adapted some tests too.

Maybe "adding" one ore more  "issue" project(s) (everybody can add sources for esear testing issues)?
It is often a hard work to reproduce the issue (copy sources and so on...)

This is a improvements PR, not only for sepcific issue


Cosmetic issues in: Firewall_schedule_edit.php

Minor cosmetic issues:

description of scheduled ranges in Firewall Schedule is displayed in HTML encoded string. Cannot find where/how to fix. See screenshot below.

Variable naming contains a typo. Tried to repair in commit 551d935c5ffd87fbd54e494a6ea718acde28328e but don't know how to cherrypick this commit into a pull request.

it's a bit tricky this one, the code underneath is horrible, I fixed some escape / xss issues after a tip from one of our users in https://github.com/opnsense/core/commit/80d94767a7f6dbb278ab1abfdba2ccc3c839a4fb , this probably is an unintended aside affect.
https://github.com/opnsense/core/commit/551d935c5ffd87fbd54e494a6ea718acde28328e likely puts the xss issue back in ;(
I'm open for other fixes, let's mark this as a bug for now.

Hi Ad, I am not very experienced with PHP, but google mentioned URLdecode() of the string to remove the HTML entities? Tried it myself, but this only yielded a non responsive webpage.
Regarding issue 2) can you cherrypick my commit from my own fork?

The problem is that this code is Javascript, but as mentioned the page is horrible to maintain (needs a lot of work, not very high on our priority list).
Yes, I can pick a single commit from your fork, but since it will most likely reintroduce the same issue of script execution, I'm not going to.

OK clear.

This issue has been automatically timed-out (after 180 days of inactivity).
For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.
If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.


attachment_fu + ruby 1.9.1

Something goes wrong when I upload:
/!\ FAILSAFE /!\  2010-09-03 15:21:19 +0200
Status: 500 Internal Server Error
can't convert nil into Integer
/files/sources/rails/customer-service/vendor/plugins/attachment_fu/init.rb:7:in sprintf'     /files/sources/rails/customer-service/vendor/plugins/attachment_fu/init.rb:7:inmake_tmpname'
/usr/lib64/ruby/1.9.1/tmpdir.rb:132:in create'     /usr/lib64/ruby/1.9.1/tempfile.rb:134:ininitialize'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/utils.rb:486:in new'     /usr/lib64/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/utils.rb:486:inblock in parse_multipart'
[...]
On ruby 1.8 is ok.

Johnypez, I upgraded my app to Ruby 1.9.2 and had to make the fix mentioned above. I was then able to upload images but they weren't being resized nor where the thumbnails being created. I realized that the processor wasn't able to load ImageMagick. After uninstalling and reinstalling rmagick I then had a seg fault and had to also reinstall ImageMagick based on http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault. Once ImageMagick was up and running fine attachment fu properly resized the images and created thumbnails under 1.9.2.


Webhook Security - Unable to verify signature when payload contains an emoji?

What article on docs.github.com is affected?
https://docs.github.com/en/developers/webhooks-and-events/securing-your-webhooks#securing-your-secret-token
What part(s) of the article would you like to see updated?
Below is the verification method I made for processing webhook events (.NET Core backend).  It works for the test payload that gets sent when creating the webhook, and it works in my local tests.
However, it failed when receiving one of the real events.  The only thing I could think that was significantly different is that the failed payload contained an emoji (from the tier description).
Is there something special that needs to be done when the payload contains an emoji?
Additional information
Verification Method
        private async Task<(bool signaturesMatch, string payloadString)> VerifySignature()
        {
            using var sr = new StreamReader(Request.Body);
            var payloadString = await sr.ReadToEndAsync();

            var signature = Request.Headers["X-Hub-Signature-256"].ToString();
            var secret = _config["WebhookSecret"];
            var key = Encoding.ASCII.GetBytes(secret);
            var payloadBytes = Encoding.ASCII.GetBytes(payloadString);

            using var hasher = new HMACSHA256(key);
            var hash = hasher.ComputeHash(payloadBytes);

            var hashString = string.Join(string.Empty, Array.ConvertAll(hash, b => b.ToString("x2")));

            return ($"sha256={hashString}".ConstantTimeCompare(signature), payloadString);
        }

Test Payload
Header:
X-Hub-Signature-256: sha256=09f0b80427cf91b9e9fed1d4df498e4ee7a018fca94dcf3fb61816e1391205d3
Body (minified in real test):
{
  "zen": "Design for failure.",
  "hook_id": 279464316,
  "hook": {
    "type": "SponsorsListing",
    "id": 279464316,
    "name": "web",
    "active": true,
    "events": [
      "*"
    ],
    "config": {
      "content_type": "json",
      "secret": "********",
      "url": "https://remotely.one/api/sponsors",
      "insecure_ssl": "0"
    },
    "updated_at": "2021-02-04T05:56:56Z",
    "created_at": "2021-02-04T05:56:56Z",
    "sponsors_listing_node_id": "MDE1OlNwb25zb3JzTGlzdGluZzY3OTM="
  },
  "sender": {
    "login": "lucent-sea",
    "id": 20995508,
    "node_id": "MDQ6VXNlcjIwOTk1NTA4",
    "avatar_url": "https://avatars.githubusercontent.com/u/20995508?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/lucent-sea",
    "html_url": "https://github.com/lucent-sea",
    "followers_url": "https://api.github.com/users/lucent-sea/followers",
    "following_url": "https://api.github.com/users/lucent-sea/following{/other_user}",
    "gists_url": "https://api.github.com/users/lucent-sea/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/lucent-sea/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/lucent-sea/subscriptions",
    "organizations_url": "https://api.github.com/users/lucent-sea/orgs",
    "repos_url": "https://api.github.com/users/lucent-sea/repos",
    "events_url": "https://api.github.com/users/lucent-sea/events{/privacy}",
    "received_events_url": "https://api.github.com/users/lucent-sea/received_events",
    "type": "User",
    "site_admin": false
  }
}

👋 @lucent-sea That sounds like a question that our wonderful support team will have the best answer for! I'm going to close this issue. Let us know if there are any docs updates needed after you get an answer 🍀

👋 @lucent-sea I just merged a PR from a contributor that looks like it's related to your issue: https://github.com/github/docs/pull/3315
In particular: because webhook payloads can contain UTF characters (like emoji and others), the webhook payload should be handled as UTF rather than ASCII.
I hope this helps!


Further optimization inside MoreThuente

Changes in MoreThunete to decrease number of function and gradient evaluation

line 147 [~,outGr,~] = feval(f,x_0 + alpha_t*d,[0 1 0]);  is unnecessary and should be deleted.
New line outGr = g_t; should be added.


Post-parsing transforms, view-local data, and maybe @state with nested computations - RFC

Description of the pull request:
In looking at how to implement something like materializecss in pure ractive, it feels excessive to create a component for every button and card you add to the view. That lead back to the lightweight components PR, but even that seems like too much for simple things that could easily be a partial with a few parameters.
That brought me around to "what if we could just turn what looks like a regular component into a sort of macro that replaced itself with other template". So that's what this is:

Ractive.parse now considers Ractive.defaults rather than using hard-coded values if no options are passed, meaning that Ractive.defaults.delimiters = ['<%', '%>'] will actually work with Ractive.parse('...') now. It also means that Ractive.defaults.parserTransforms would actually mean something.
The parser now accepts a transforms array or the global/instance parserTransforms which is an array of functions to be called with each element in the parsed template. Each function may remove, modify, or replace each element template with which it is called. It is called with Ractive as the context, so parse is available locally without having to pull in Ractive as a dependency.
To facilitate having small bits of local state, this introduces @data, which is a root model that is created as needed on the current @context, with the idea being that the transform sets up something like <div>{{#with @data as state}}...{{/with}}</div> as the replacement template. Then any state references within the template won't interfere with normal data, but will instead live only for the lifetime of the outer div element in the replacement.
@data refs are also available to @context objects, so you can interact with template-local context from outside of the template.

This is sort of the reciprocal to the @state PR, which would be the same thing, but hanging off of the internal model object rather than the view. I considered introducing @state here too, but there are a few questions surrounding that and probably a little bit of confusion around the difference between @state and @data. One of the questions is should<EMAIL_ADDRESS>be the same as<EMAIL_ADDRESS>or should it be its own independent tree? There's also some question as to what should happen with state on linked models.
At any rate, @data is not really meant to be used for general purposes, nor are transforms for that matter. Transforms require a fairly intimate knowledge of the compiled template format, but I don't expect many people to want to write their own widget libraries beyond the level of components. If you do need to achieve something like a partial with paramaters, including passed-in inline partials, this would allow it, though in a component-like form rather than {{> partial}} form. Attributes, child elements, inline partials, and other content are all fairly easy to access, move around, and massage.
Why?
One of the major goals for 0.9/0.10 is to have a nice component suite like materialize or vuetify available to use alongside a ractive-based router/app framework that uses anchors to swap views in and out. Part of any of the better component suites are small things like buttons and cards that may be rendered a lot in various places, so low overhead is important. Most of those could mostly be handled with css alone, but they would be a lot more ergonomic and complete as component-like constructs.
Questions

Is there a better name for @data.
Right now the return of the transform determines what happens with the node being transformed. I think it's probably a bit limited with false removing the node and an object replacing the node. I think maybe it should be an object that specifies what to do instead, like maybe { remove: true } for remove, { replace: { ... } } or { replace: [ ... ] } to replace it with one or more nodes, and undefined for nothing?
Should figuring out what exactly to do with @state go ahead and happen? It would give stable out-of-data storage, meaning it wouldn't interfere with normal data, it wouldn't disappear with an unrender/re-render, and it has been requested a fair amount. It would also give a nice entry point for nested computeds, which remains one of the oldest requested features.

Is breaking:
Nope.
Reviewers:
Yep.

I think I like @local better.
Yep. Done.

@local is excellent!

Post-processing templates looks neat! Although not everyone goes that low.

I explored the @state a bit, and there's definitely some merit to it. I think it's not quite time for that now though, as there's a bit more depth to it than I'm comfortable sounding right now. So anyone looking for @state, feel free to leave comments about how you'd expect it to work. Here's where I left it:

Each model can potentially get its own state tree accessible by special key @model, because @state is ambiguous. This includes links.
Any keypath can contain a @model ref inline e.g<EMAIL_ADDRESS>which would get the baz key in the state model attached to the foo.bar model. This also works with relative keypaths.
Computations would be introduced at any keypath with a new config property (registry) next to computed. When a state model is asked for a key that it doesn't already know about, it first checks with the config registry to see if a computed matches, and if it does, grafts it in. This only works on the root of the state model e.g<EMAIL_ADDRESS>Not the prettiest thing in the world, but also non-polluting and it doesn't nerf perf for plain models.
a. In order for the computation to work, it has to take a parameter for its context.

If anyone's curious what a more in-depth transform looks like, here's a demo playing around with copying materializecss cards and tabs.
If 4k links don't work for you, you can paste this into the content textarea on the settings tab:
[encoded data, 4321 characters]


New version: Squiid version 1.1.3

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the directory's name containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

If needed, I can switch to the new manifest version, but I'm out until later tomorrow, so I'll have to get it done then

If needed, I can switch to the new manifest version, but I'm out until later tomorrow, so I'll have to get it done then

Most manifest fields are identical with the newest version. In most cases, just increasing the ManifestVersion is enough to pass that check. Could the next package version have the newest manifest version?

Could the next package version have the newest manifest version?

Yep, I could definitely do that. Thanks!


Edit enum doc easier for users to follow the tutorial

Description
There was a part that didn't work out strangely while imitating enum tutorial, so I checked it in the test case and corrected it. Now, novice users like me can copy without getting confused.
I would appreciate it if you could correct some additional things or grammar problems. I am not a familiar English speaker.
Types of Changes

[ ] Core
[ ] Bugfix
[ ] New feature
[ ] Enhancement/optimization
[x] Documentation

Issues Fixed or Closed by This PR

Checklist

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Hi, thanks for contributing to Strawberry 🍓!
We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!
So as soon as this PR is merged, a release will be made 🚀.
Here's an example of RELEASE.md:
Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver,so make sure to pick the appropriate type. If in doubt feel free to ask :)

/preview-docs sha=a0cea39

I checked commit suggestions. Thanks for helping me!


Fix the detection of directories when listing files using libgit2

The pull request addresses issue #1663. The problem is that libgit2 combines S_IFDIR  with S_IFLNK, and, therefore, the strict comparison based on S_ISDIR rejects directories.
Regards,
Ivan

r? @alexcrichton
(rust_highfive has picked a reviewer for you, use r? to override)

It has been noted on Freenode’s #libgit2 that, even though entry->mode is set using UNIX file modes, mode should not be interpreted as being composed of such modes. One should use git_filemode_t instead. Regarding file traversal, a submodule corresponds to the GIT_FILEMODE_COMMIT file mode, and, in order to continue traversing files when such an index entry has been encountered, one should open another repository corresponding to that submodule and use its index.

Aha! I think that using that enum may be best in this case, could you switch this to calling the filemode method on the entry instead? You can then link to libgit2-sys to inspect the return value as well.

Also, could you add a test for this? I believe there's a few example tests using submodules already.

@alexcrichton, so you suggest switching to tree traversal instead of index traversal in list_files_git, right? In that case, one should find an appropriate tree first. One could map the HEAD reference to the corresponding ID and then use that ID to look up the corresponding tree. Is that similar to what you have in mind?

Actually the problem with trees is that they are not the index. They are recorded states of the world, and they do not necessarily reflect the current situation. In particular, untracked files will not be listed. Probably the traversal based on the index should stay in list_files_git.

Oh oops, right! I suppose we can't use git_filemode_t then as it doesn't seem to be stored in git_index_entry?

Even though mode in git_index_entry is not of type git_filemode_t, the comment above git_filemode_t says
Valid modes for index and tree entries.

So, I suppose mode in git_index_entry can be treaded as being of type git_filemode_t.

Ah ok, then it looks like we just need to compare against the right value!

I’ve updated the pull request; I’m not sure, though, if I’m able to pull off writing a test for that.

Looks good to me, thanks! If you take a look at the dont_require_submodules_are_checked_out test in test_cargo_compile_git_deps.rs file you may be able to easily adapt it to this test case. I'd recommend confirming the test fails before this patch and then you can confirm that this patch fixes it.

@alexcrichton, test_cargo_package.rs seemed to be appropriate for accommodating a test concerning packaging. So, in order to keep things dry, I extracted the auxiliary routines related to Git from test_cargo_compile_git_deps.rs to support/git.rs and made use of them in test_cargo_package.rs.

Looks great, thanks @IvanUkhov!
@bors: r+ 632780ebef1044ee110d5cbcdd850d72a92ed55f

:hourglass: Testing commit 632780e with merge bc40ad7...

:sunny: Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64


Create the desktop screen.

Is your feature request related to a problem? Please describe.
Desktop UI is ready. Make sure that the responsiveness is maintained.

Describe the solution you'd like
All the required components i.e.

Frame (Canvas)
Frame carousel
Upload Input
Name and Guild Inputs.

Preferably use CSS Grids. Though, seeing the designs there is no strict requirement for the same and can be done using flexbox as well.

Interested


Todo list

The look of the User Interface
When you open the app, you will see three buttons

New Project: You can create a new Project
New Todo: You can create a new Todo and Associate a project to it
Show Project: A list of all Projects is displayed and the todo for each project with the edit and delete buttons

Hello, @maelfosso thanks for the review. Just to clarify, we have a default project called "All Todos", do you want us to rename it to "Default"?

Dear TSE, here are some pictures that show the default Project when you first open the app

We made the required changes

Hello there, thank you for noticing that bug, it slipped! :sweat_smile:
I am looking forward to learning how to use testing in Javascript, so we are able to notice the mistakes easily.
We just made the required changes!


Failed to clone nvm repo. Please report this!

Describe the bug
Running "reflex init" on a newly created directory gives the following error:
reflex init --loglevel debug
───────────────────────────────── Initializing Base45Reflex ──────────────────────────────────
Debug: Running command: ['/home/evan/.reflex/.bun/bin/bun', '-v']
Debug: Running command: ['/home/evan/.reflex/.nvm/versions/node/v18.17.0/bin/node', '-v']
[13:53:36] Initializing the web directory.                                       console.py:81
Debug: Downloading https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
Debug: Running command: ['bash', '/tmp/tmp1e44lg70']
Debug: Installing https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
Debug: => Downloading nvm from git to '/home/evan/.reflex/.nvm'
Debug:
Debug: => Cloning into '/home/evan/.reflex/.nvm'...
Debug: fatal: invalid branch name: init.defaultBranch =
Debug: Failed to clone nvm repo. Please report this!
Error: Error during Installing https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
Error: Run in with --loglevel debug to see the full error.
To Reproduce
Steps to reproduce the behavior:

Code/Link to Repo:

" mkdir Base45Reflex
cd Base45Reflex
reflex init "
Expected behavior
Initialize the project
Screenshots
If applicable, add screenshots to help explain your problem.
Specifics (please complete the following information):

Python Version: 3.11.4
Reflex Version: 0.2.3
OS: Ubuntu 22.04.2
Browser (Optional):

Additional context
Add any other context about the problem here.

fatal: invalid branch name: init.defaultBranch =

Is it helpful for you?
https://stackoverflow.com/questions/64349920/git-error-fatal-invalid-branch-name-init-defaultbranch

That did in fact help. Thank you.


fix: throw UfoFallbackException on RequestFailed

version 3.17 of the LSP specification has a RequestFailed error code (= -32803).
haskell-language-server throws this if a foldRange request fails, leading to an UnhandledPromiseRejection to be thrown by nvim-ufo.
Fixes #158 and https://github.com/mrcjkb/haskell-tools.nvim/issues/251.

Thanks!


link to mafs.deb is dead

Whoops, good catch! This was supposed to be https://mafs.dev. I've fixed the link in the README.


help with access token

so in your code it says we have to enter a code to avail the access token:
access_token = await client.exchange_code("my_code")

but i am new to whole oauth2 stuff so do you mind telling me what should i enter as 'my code'?

"my_code" is used to exchange for a token. This token is provided by the authorization code grant flow, in a nutshell this flow consists of:
User Authorizes App -> Redirect to redirect_url
The redirect_url receives two parameters:

code: Used to exchange for a access token.
state: helps prevent CSRF attacks and represents your application's state.

Here's a simple example for authorization code grant using aiohttp:
import asyncio
import os

import disco_oauth2
from aiohttp import web

routes = web.RouteTableDef()

@routes.get("/start-flow")
async def start_flow(request: web.Request) -> web.StreamResponse:
    client: disco_oauth2.Client = request.app["client"]

    # Get the auth url with a random state and redirect
    auth_url = client.get_oauth_url(state=os.urandom(16).hex())

    return web.HTTPFound(auth_url)

@routes.get("/exchange-code")
async def exchange_code(request: web.Request) -> web.StreamResponse:
    client: disco_oauth2.Client = request.app["client"]

    # Get code from received parameters
    code: str = request.rel_url.query["code"]
    # Get state from received parameters
    state: str = request.rel_url.query["state"]

    # Exchange the code for a access token
    access_token: disco_oauth2.AccessToken = await client.exchange_code(code)

    # Fetch user's information
    user = await client.fetch_user(access_token)
    # Fetch user's guilds that he is member of
    guilds = await user.fetch_guilds()

    return web.Response(
        text=f"WoW got user information and token of {user!r}! Look at this:\n\n{access_token.access_token}\nGuilds: \n\n{', '.join(repr(x) for x in guilds)}"
    )

def init() -> web.Application:
    # Create new event loop
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)

    client = disco_oauth2.Client(
        client_id=...,
        client_secret="...",
        redirect_uri="http://localhost:8000/exchange-code",
        scopes=["identify", "guilds", "email", "connections"],
    )
    app = web.Application()
    app["client"] = client
    app.add_routes(routes)
    web.run_app(app, host="localhost", port=8000, loop=loop)

if __name__ == "__main__":
    init()

I suggest you learn more about the OAuth2 protocol and familiarize yourself with it, here are links that may be useful for you:

Discord OAuth2 Docs
OAuth2.0 rfc


[Bug]: Consent Registry does not make audit decisions and so cannot record the Consent Authorication Decision Audit Message

Contact Details
<EMAIL_ADDRESS>Section Number
1:53.3.1
What is wrong
This section requires the Consent Registry to record the Consent Authorization Decision Audit Message, but the Consent Registry simply stores the Consent Resources, it does not make decisions.
Describe the solution you'd like
No response
Relevant log output
No response
Priority
{"Low"=>"Typo or other minor classification that an editor can manage. Requires no group discussion."}
Code of Conduct

[X] I agree to follow the IHE Code of Conduct

agreed. Will fix. That AuditEvent would be for the Consent Authorization Server.


Supporting DID links to sphere content

Recently the team has been discussing the value of supporting a did link form for sphere content. This has many upsides, and also many cascading effects on the UX of Subconscious, the UX of writing Subtext, the parsing of Subtext, and more.
Design is navigating tradeoffs by values. To that end, This note is an attempt to explore and reflect on these interconnected aspects, how they intersect with the design values of Subtext, and to find a balance of tradeoffs that best suit our values.
Values:

DIDs are an important modular interface.

If DIDs are a lego dot, then supporting them means you can click together with many other systems.

DIDs are not user-friendly, but @petnames are.

To that end, we want to bias the ecosystem toward @petnames, while supporting dids.
Adding more structured syntax to dids exacerbates the problem.
Chaining dids is pathological.

Conformability. E.g. Leaning into valid did syntax makes us conformable to a large number of other systems.

Reduces corner cases, sharp edges, surprises.

Subtext should be simple to write, simple to read, simple to parse.
The best Subtext syntax is no syntax (e.g. auto-linking http URLs).

The second best syntax is what you would write anyway (e.g. > blockquote).
The third best syntax is popular syntax from existing systems (e.g. _italic_ or @handles).
Subtext is less like Markdown, more like the auto-syntax you get in a social media site. We should not support deep structure or features.

Things like URLs should just work when you paste them into Subtext...

...Within the limits of keeping parsing simple and unambiguous.
E.g. we only auto-link URLs starting with http:// or https:// for this reason.

Previously-resolved tradeoffs:

URLs are ASCII only. Slashlinks support UTF-8. See #28

Resolution: there are specifications for translating between URLs and UTF-8 representations. We should use those. https://en.m.wikipedia.org/wiki/Internationalized_Resource_Identifier

Did/URL paths and slugs have different syntax.

Resolution: slug syntax should always be a simplified subset of paths.
They should not get more complicated than ([\w\-]+)(\/[\w\-]+)*

It is worth noting that these are both structurally valid DID URLs. However, other consumers of did:key won't know what to do with them.
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK/foo
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK@petname/foo

References:

did:key https://w3c-ccg.github.io/did-method-key/
DID URL syntax (which allows a path) https://www.w3.org/TR/did-core/#did-url-syntax
Path RFC https://www.rfc-editor.org/rfc/rfc3986#section-3.3

One approach we could take is to only allow "absolute" did links, without petnames.
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK/slug

To traverse from one sphere to another, you would "absolutize" the slashlink, at each step, so there is never a traversal path. This keeps the did path simple. This is in keeping with the idea that the did is an "unknown", so the petnames in their address book do not provide much information security.
This is a valid DID URL, with caveats:

Other consumers of did:key won't know what to do with the path part.
Slashlinks allow for UTF-8 characters, so we would have to percent-encode to make slashlinks valid DID URLs.

We could ofc just allow UTF-8 directly in Subtext, and percent-encode when parsing.

Another approach could be to allow slashlinks after a did, with or without petnames.
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK@foo/slug

This gets visually complicated quickly.
I believe this is a valid DID URL, with same caveats as above.

This is interesting, but possibly premature? Other systems mostly don't know what to do with DIDs at all, and haven't thought about the interfaces.
Maybe @-syntax is correct? So either @petname (which resolves to a DID) or @did:key (which may get looked up and replaced with a label or a petname).
Also: what about other mentions that themselves resolve to a DID? So, @bmann.ca has an _atproto subdomain / TXT record which contains a DID.
@boris.fission.name contains a _did subdomain / TXT record.
DNS flavoured links that resolve to DIDs at well known locations could be a good start?


Cleanup and rewrite to make this importable into other projects

I have brought the code style mostly in line with PEP8 style guide.
This module now importable by other python code.
setup.py is updated to follow pypi standards - this module is ready for release on pypi and pip installation.
The command line is now cross-platform and uses argparse to provide arguments.
A number of other cleanups.

@utkonos one of the things I was going to do was to look at the official yara grammar and make sure it's all supported.
You might also be able to leverage the yara test files to make sure we have full coverage.
I'm not sure if @8u1a is still active, but thanks for all your work on this. If we can't merge it here, we might be able to fork it elsewhere

@austinbyers any news on this? Thought about forking this too.

Do you have a better way of contacting @8u1a about his thoughts on this?
Are you still interested to fork? Just want to make sure to not duplicate any efforts!

@utkonos only took a quick look at your PR. Thanks a lot! Any interest on forking this project from your side?
@austinbyers @utkonos: Interested in teaming up on this?

@larsborn Community-maintained fork of plyara at https://github.com/plyara/plyara


Fix english edit after submission

Context
There is a bug when editting the english GCSE after granted an extension.
Ways to reproduce the bug:

Have GCSE in the application
Make editable English GCSE or equivalent
Switch to UK O level
Switch back to GCSE

Then we show single graded but we should show multiple grades for english GCSE.
Guidance to review

Does it work?
Does it work changing all the types?

Link to Trello card
https://trello.com/c/KKoYw49Y/888-fix-english-gcse-edit-after-submission-change-type

 Fix English GCSE edit after submission (change type)


Field resolution to error

Hi
If in schema.js, I resolve userType to a graphqlError by throwing an exception, nothing is rendered at all and renderError of routes is not called.
 Just handle error rendering in the render callback as with <QueryRenderer>.

I added both route-level render and top-level renderError functions but in case of graphql error response, none of the methods are called with error argument. I see the following error in console:
Uncaught (in promise) undefined
I'am stuck for handling graphql errors from server:
{ errors: [ { message: 'my custom error message' } ] }
would you please make and advise?

I took a closer look.
Per https://github.com/facebook/relay/issues/1913, your network layer actually needs to throw if you get any errors from your back end.
Separately, https://github.com/4Catalyzer/found-relay/pull/38/files#diff-0c098dedebf1347f99e1bf83329ad9d2R65 fixes a typo that would cause rendering to fail entirely when queries have errors. That is fixed in the newest alpha: https://github.com/4Catalyzer/found-relay/releases/tag/v0.3.0-alpha.3.

thank you very much for your help. now, when both data and error are not null, route-level render error is populated with error but when only error exists and data is null in response, the following error is raised in console:
Uncaught (in promise) Error: Objects are not valid as a React child (found: RelayNetwork: No data returned for operationroutes_TodoApp_Query`, got error(s):
global error message
See the error source property for more information.). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of SnapshotRenderer.
at invariant (invariant.js:44)
at traverseAllChildrenImpl (traverseAllChildren.js:144)
at traverseAllChildrenImpl (traverseAllChildren.js:93)
at traverseAllChildren (traverseAllChildren.js:172)
at flattenChildren (flattenChildren.js:66)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:202)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
`
and renderError is not called. would you please have a look? thank you.

You need to actually render something in render. Regardless, renderError will not be called unless you throw an HttpError in prerender.


hot reloading does not work anymore from version 0.10.2

I have a  webpack project where I use wasm-pack to build one of my node dependencies.
It all worked fine on v0.10.1 but since v0.10.2 there is the following bug:

compile rust code
start the webpack devserver
recompile the rust code
At this point,
on v0.10.1, webpack simply reloadsthe page
on v0.10.2, webpack returns a "Module not found" compilation error

I have no idea what is causing this, and I just went back to using the ver0.10.1.
rustc version: 1.59.0
Please tell me if there is any detail I should include.

Related wasm-tool/wasm-pack-plugin#125
There's a working solution in the thread :
watchOptions: {
   aggregateTimeout: 200,
   poll: 200,
},

Adding this options to webpack.config.js resolves the issue for me.


Kill pending python workers on start

(to make sure we start clean each time)

LGTM

Test failures are unrelated (this is only touching a perf testing script and some node unit tests are failing).


How can I use micro_mutable_op_resolver.h instead of all_ops_resolver.h to run TensorFlow Lite for Microcontrollers exapmle?

@tensorflow/micro
System information

Host OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows subsystem for Linux, Ubuntu 18.04
TensorFlow installed from (source or binary):
Tensorflow version (commit SHA if source):
Target platform (e.g. Arm Mbed OS, Arduino Nano 33 etc.): My own PC

Describe the problem
I'm running test on the hello_world example in TensorFlow Lite for Microcontrollers, on my own develop machine.
In https://www.tensorflow.org/lite/microcontrollers/library I found an option to use micro_mutable_op_resolver.h instead of all_ops_resolver.h, so that I can only pull in the ops I need.
I've tried to change some lines in hello_world_test.cc, but still can't get it right.
Please provide the exact sequence of commands/steps when you ran into the problem
I've change these lines in tensorflow\lite\micro\examples\hello_world\hello_world_test.cc:
line 16:
#include "tensorflow/lite/micro/all_ops_resolver.h"
to :
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
line 41:
tflite::AllOpsResolver resolver;
to:
const unsigned int tOpCount = 5;
tflite::MicroMutableOpResolver<tOpCount> resolver;

then I run the command:
sudo make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test
But It seems to pull in and compile all ops. Also, after printing out"~ALL TESTS PASSED~'", the process doesn't end.
Could anyone help me please?

Hi, it's me again.
I referred to another task--micro_speech, which uses micro_op_resolver.h in both main_functions.cc and micro_speech_test.cc.
It seems like I should make a list of all ops I need, so in hello_world_test.cc, I modify the following lines:
line 18:
#include "tensorflow/lite/micro/all_ops_resolver.h"
to
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
line 47:
tflite::AllOpsResolver resolver;
to
  tflite::MicroMutableOpResolver<5> resolver;
  resolver.AddDequantize();
  resolver.AddFullyConnected();
  resolver.AddQuantize();
  resolver.AddRelu();
  resolver.AddReshape();

In hello_world/main_functions.cc I modifiy:
line 18:
#include "tensorflow/lite/micro/all_ops_resolver.h"
to
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
line 67:
static tflite::AllOpsResolver resolver;
to
  static tflite::MicroMutableOpResolver<5> resolver(error_reporter);
  if (resolver.AddDequantize() != kTfLiteOk) {
    return;
  }
  if (resolver.AddFullyConnected() != kTfLiteOk) {
    return;
  }
  if (resolver.AddQuantize() != kTfLiteOk) {
    return;
  }
  if (resolver.AddRelu() != kTfLiteOk) {
    return;
  }
  if (resolver.AddReshape() != kTfLiteOk) {
    return;
  }

Actually I'm not sure how many ops should I use. When I was testing, I found that I can pass the test using only AddFullyConnected().
At least it works better than 3 days ago. If anyone knows how to check the ops used in a model, or spots some problem in my code, please leave a comment.
Thank you for helping.

Hi @Dueschen!
Could you post this issue in Stackoverflow /TF forum as there is a larger community to help you out .Thanks!


Chapter 14 review

These are the changes suggested after reviewing Chapter 14.

Fixes queries to update nickname where the column name was wrong (nickname instead of nick),
Updates changeNickNameWithInput mutation to return only the ID as defined in gql-schema.js,
Removes the reference to person dataloader in app-without-dataloaders.js file,
Renames table names to all lowercase as it is in the book

Supersedes by #27


about the kernel size

Hi, I find that there is no explicit parameter specifying kernel size in natten.py. How does cuda code get it? By the shape of rpb? Thanks!

Hello, thanks for your interest.
Yes, RPB is always in the shape of 2 * kernel_size - 1 across the two axes, for every head, therefore it's easy to obtain kernel_size from that.

Thanks for your prompt reply!

Closing this due to inactivity. If you still have questions feel free to open it back up.


Add unit tests for ResponseSpecBuilder

I thought the project would benefit from better coverage, so these are just tests to some previously untested code.

Awesome @Bisk1! Thanks a lot!


Not loading mods

Hello again :)
now I try to load my local mods/maps but the game will not load them. The mods/server_packages will be synced via MEGA. I also looked into the container and the mods/server_packages were available and have the same user permissions like the other files.
KR,
BlackRose01
Docker-Compose
version: '3'

services:
  ets2:
    user: "1000"
    build:
      context: steam-fix
    container_name: 'ETS2'
    restart: on-failure
    tty: true
    network_mode: host
    volumes:
      - "/opt/ets2/server_data:/app"
      - "/opt/ets2/game_data:/root/.local/share/Euro Truck Simulator 2"
      - "/opt/ets2/mods:/root/.local/share/Euro Truck Simulator 2/mod"
      - "/opt/ets2/server_packages.sii:/root/.local/share/Euro Truck Simulator 2/server_packages.sii"
      - "/opt/ets2/server_packages.dat:/root/.local/share/Euro Truck Simulator 2/server_packages.dat"
    environment:
      - "ETS_SERVER_UPDATE_ON_START=true"
      - "ETS_SERVER_NAME=xxx"
      - "ETS_SERVER_PASSWORD=xxx"
#      - "ETS_SERVER_LOGON_TOKEN=xxx"
      - "ETS_SERVER_PLAYER_DAMAGE=false"
      - "ETS_SERVER_HIDE_COLLIDING=false"
      - "ETS_SERVER_SERVICE_NO_COLLISION=true"
      - "ETS_SERVER_MODERATORS=xxx"

Okay I figured this one out too.
You need to adjust your paths since I am now using a new image as a base image that saves the config files in /home/steam instead of /root.
Documentation will be adapted accordingly.
#8 will make these changes once merged.

Nice that works now. Thank you. But I am a little bit confused because when I go to my server then I cannot see the EU DLCs (east, baltic sea, balkane, etc.) in the DLC section. On my server I have the same output like you that it loaded them. So is it a display problem?

I think that has to do with mod optioning setting. When you open the
server_packages.sii in a text editor you will see the DLC marked as
optional. They should work in game but are not required to join. You could
try changing the mod optioning setting to see if that has any effect.
On Thu, 18 May 2023, 11:36 BlackRose01, @.***> wrote:

Nice that works now. Thank you. But I am a little bit confused because
when I go to my server then I cannot see the EU DLCs (east, baltic sea,
balkane, etc.) in the DLC section. On my server I have the same output like
you that it loaded them. So is it a display problem?
—
Reply to this email directly, view it on GitHub
https://github.com/LsHallo/ets2-dedicated-convoy-server/issues/7#issuecomment-1552795701,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFJE67VKSRBNEAFRIAZ4XGTXGXUTFANCNFSM6AAAAAAYCWRPV4
.
You are receiving this because you commented.Message ID:
@.***>

Ok, I will test it but at the moment it looks good. Thank you :)


Application failing.

A user ran into following error message when he ran this app.
Error using fileparts (line 32)
Input must be a row vector of characters.

Error in niftiRead (line 46)

Error in main (line 23)

MATLAB:fileparts:MustBeChar

I can recreate this by simply running the app.
I have following config
    "fa": true,
    "md": true,
    "rd": true,
    "ad": true

The code seems to be trying to open these as nifti?
nii_fa = niftiRead(fullfile(config.fa));
nii_md = niftiRead(fullfile(config.md));
nii_rd = niftiRead(fullfile(config.rd));
nii_ad = niftiRead(fullfile(config.ad));

Another issue with this app is that, it is failing to detect missing output files in main. If should be updated to check to see if numfiles.txt exists (if not, exit 1), then check the number of images generated?

User needs to run dt6 to nifti converter app before running this app (https://github.com/brain-life/app-dt6tonifti).  Each individual tensor metric needs to be in it's own nifti structure in order for the app to work properly.

Brad,
I see following apps registered to use this git repo

https://brainlife.io/warehouse/app/5a79e2e9e19e66005bdcd609

Brad,
I see following apps registered in BL to use this app.

https://brainlife.io/warehouse/app/5a79e2e9e19e66005bdcd609
https://brainlife.io/warehouse/app/5a037e0c8155510041652b72
https://brainlife.io/warehouse/app/59ca5c03c27f5b0770add9cf

Do all 3 supposed to work?
The issue I ran into was from this app..

https://brainlife.io/warehouse/app/5a79e2e9e19e66005bdcd609

Also, since "tensor" datatype now includes all 4 files, user shouldn't have to select them individually. You can just ask for 1 and assume that you can find other 3 files under the same path?

Test app should be deleted, just haven't gotten around to it. I was using it while implementing the changes just so people could still use the original app.
All three point to the same repo, just different branches. The code is nearly identical in both branches, but one is set up for NODDI files and the other tensor.
The way the new changes are set up, it's much easier to just have all 4 tensors run at once than have users select which ones they want. Most of the time you should generate plots for all 4. I don't have time over the next few weeks to work on making the change to select individual files, but can spend a scant amount of time the second week of March.
We can discuss more tomorrow.

I believe this is fixed..


ZkSyncProviderV01 toChecksumAddress

In the get_tokens method the in the ZkSyncProviderV01
Web3.py changed to snake cases the function call is still in camel causing it to fail: https://github.com/ethereum/web3.py/pull/2708

Thanks, I modify the  C:\Program Files\Python310\Lib\site-packages\zksync_sdk\zksync_provider\V01.py
Then It's support the last version web3.py


UNION throws ErrorException when binding added clauses

Laravel Framework version 5.1.16 (LTS)
Unions that contain an added clause are generating an ErrorException.
This works:
			$foo = Foo::select('created_at');
			$bar = Bar::select('created_at');
			$foo->union($bar);
			$foo->get();

This fails:
			$foo = Foo::select('created_at');
			$bar = Bar::select('created_at')->where('updated_at','<', \Carbon::now());
			$foo->union($bar);
			$foo->get();

ErrorException in Builder.php line 1244:
Undefined property: Illuminate\Database\Eloquent\Builder::$bindings

Changing this statement:
framework/src/Illuminate/Database/Query/Builder.php Line 1244:
$this->addBinding($query->bindings, 'union');

To:
$this->addBinding($query->getBindings(), 'union');

Is what remedied the problem for myself. Noted that all binding was being placed correctly, however, I'm a newbie when it comes to contributing to open source. Don't wanna futz anything up. Especially if I'm wrong. :)
Thanks!

Good! bro, this helped to me when I was using advanced joins and unions, by the way, if this was intentional in Laravel 5.1.17 (LTS), then is possible the property $query->bindings is being used in some moment, but if this is an error in the code, the best would be use until this was fixed:
$this->addBinding(isset($query->bindings) ?: $query->getBindings(), 'union');

@taylorotwell Was this intentional? Is it possible that this is added to the project?
See Illuminate/Database/Query/Builder.php#L1249
This:
$this->addBinding(isset($query->bindings) ?: $query->getBindings(), 'union');

Instead of this:
$this->addBinding($query->bindings, 'union');

Thanks!

We're open to PRs. :)

I also have the same problem....
Changing $this->addBinding($query->bindings, 'union'); to $this->addBinding(isset($query->bindings) ?: $query->getBindings(), 'union');
seems to fix the issue

        $foo = Foo::select('created_at');
        $bar = Bar::select('created_at')->where('updated_at','<', \Carbon::now());
        $foo->union($bar);
        $foo->get();

Undefined property: Illuminate\Database\Eloquent\Builder::$bindings
Your loosing your bindings because as I presume the union()  is executing  $bar first then passing it to $foo hence your need to modify the framework to hold onto those bindings.
I have not built queries much  in static format $foo::select
but if it is the same thing
$foo = new model_X()->select('created_at');
$bar = new model_y()->select('created_at')->where('updated_at','<', \Carbon::now());
return $foo->union($bar->getQuery())->get()  // adds the $bar query to $foo instead of executing.
If you want to add joins to the query you will need to be specific to avoid an ambiguity Use
$foo->selectRaw('the_foo_table_name.field_name, some_table.field_name')->join("the_joining_table as some_table", "the_foo_table_name.field_name", "=","some_table.field_name"  );
then do
$foo->union($bar->getQuery())->get();
you can chain many unions


IGAPP-297: Add build config for aschaffenburg app

This pull request belongs to an issue on our bugtracker.
You can find it there by looking for an issue with the key which is mentioned in the title of this pull request.
It starts with the keyword IGAPP.

I think you still have to add the assets here: https://github.com/Integreat/integreat-app/blob/main/native/src/modules/app/constants/buildConfig.js

I think you still have to add the assets here: https://github.com/Integreat/integreat-app/blob/main/native/src/modules/app/constants/buildConfig.js

@SteffiStuffel I think you still have to add the assets here: https://github.com/Integreat/integreat-app/blob/main/native/src/modules/app/constants/buildConfig.js

Yeah good point. Added this.

@SteffiStuffel I think you still have to add the assets here: https://github.com/Integreat/integreat-app/blob/main/native/src/modules/app/constants/buildConfig.js

Yeah good point. Added this.


Fixed link to Single File STAC example

Related Issue(s): None
Proposed Changes:

Fixed link to Single File STAC example

PR Checklist:

[x] This PR has no breaking changes.
[x] I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.
[x] API only: I have run npm run generate-all to update the generated OpenAPI files.

Need to redo it against dev instead of master. :-(


How to handle errors using this package?

Hi @takielias
The package throws various exceptions depending on the error. In general if the API returns an error response a ErrorException is thrown which you can handle in your application.
Is there a specific error which you expect to be handled differently by the library?


webkitRequestFullscreen makes keyboard invisible

Hello!
It's cool application and works perfect! The only thing that makes me upset, is the fact it doesn't show up when I use document.getElementById('fs').webkitRequestFullscreen() in chrome.
Live example is at:
https://bl.ocks.org/AutomationEngineer/raw/203b24d38ddfd0825ea6c65cdafa6eb2/
It would be great if its possible for you to fix this, or is there a workaround?
Regards,
Vicror

I have fixed this in my fork and have created a pull request to your master  #13   . Please see if it would be possible to merge.
PS: I believe removeChild is not nesessary

Thanks a lot.  Merged your pull request


Cannot parse empty color on the latest version 2.15

After update (from 2.1.12) 2 out of my 3 panels stopped working with the error

error: Failed to setup bar renderer: Cannot parse empty color

the config didn't change and here it is. Left panel works OK, middle and right don't,

The parameters linecolor and border-color are empty for those bars. Remove or comment and you should be good.

If you don't want to show the color, you can make it fully transparent by setting the value to #00ffffff

Thank you!


Step 2 and 3 contain the same code

The code in step 2 and 3 is exactly the same, I assume something is missing there

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d4501148-c205-283d-9b31-cf21486c7615
Version Independent ID: 11b31390-71ec-1784-3593-c3b4b1f1326f
Content: FPGA package for hardware acceleration for Azure Machine Learning
Content Source: articles/machine-learning/service/reference-fpga-package-overview.md
Service: machine-learning
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

@sauercrowd Thanks for your feedback! We will investigate and update as appropriate.

@sauercrowd Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
@rloutlaw Hi, this is a doc-bug, can you please check the code and update the document as necessary? Thanks a lot!

Please assign to @tedway . He is the true author.

Thanks for your report, @sauercrowd. I've checked in a fix for this that will go live tomorrow morning. When satisfied, #please-close.


Reserved identifiers

Personnel

[x] Owner: @mbudiu-vmw
[x] Supporters: @fruffy

Design

[x] Document: See below

Implementation

[ ] p4-spec:
[x] p4c: https://github.com/p4lang/p4c/pull/2706

Process

[ ] LDWG discussed:
[ ] LDWG approved:
[ ] Merged into p4-spec:
[ ] Merged into p4c:

======================
This discussion https://github.com/p4lang/p4c/pull/2706 made it clear that the compiler needs to handle some identifiers specially.
For example, __v1model_version is used to store the version of the v1model.p4 used, and the compiler should not delete this constant declaration even if it is dead, since the back-end depends on it to generate code, and the toP4 pass uses it to generate the proper macro before including v1model.p4. The PR cited assumes that all global identifiers starting with __ are reserved, but the spec does not codify this anywhere.

The main issue with macros is that they are not represented in the compiler IR. They only exist in the preprocessor, and after substitution they completely disappear.  So having a const is one way to preserve these values throughout the compilation process.

I'm confused... as a CPP define, the compiler has even less visibility. The version becomes just another integer literal. Isn't that a step in the wrong direction?

Looks like @mbudiu-vmw beat me to it.


Tried installing this but when I run it multiple console windows open

I've got it installed, I can see it as an option in the Windows Terminal which when I open it shows some information on how to use it.
When in a powershell terminal I run wsl.exe -d wsl-vpnkit service wsl-vpnkit start a handful of terminal windows open, some have [process exited with code 128 (0x00000080)] in them, others are blank.
https://i.imgur.com/Y6CbQZM.png
If I try and close the terminal windows that are opened a seemingly endless number of them open one after another, I need to reboot my machine to get them to stop.

Can you try v0.3.0 or run it in the foreground as in #61

v0.3.0 worked.


Fix memory leak following WebGPU migration

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/15510/merge
Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15510/merge/index.html
To test a playground add it to the URL, for example:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15510/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/15510/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/15510/merge
https://gui.babylonjs.com/?snapshot=refs/pull/15510/merge
https://nme.babylonjs.com/?snapshot=refs/pull/15510/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/15510/merge#BCU1XR#0

WebGL2 visualization test reporter:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15510/merge/testResults/webgl2playwright/index.html

Visualization tests for WebGPU (Experimental)
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15510/merge/testResults/webgpuplaywright/index.html


added 30 FAQs

tested locally

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://663140e0a645951302d38128--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://663149d8a8a5f219a91172a8--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66319613ab5ee55b0ed6c1a8--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6631981f93de534e82969b2f--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6632567893de53ea53969d9c--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6632b25d24494d1c4938c856--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66332f269a91de7bf209f4a3--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://663df7f61ecee8ec0987bd5f--harness-developer.netlify.app


fix: Add missing options to the Options interface

It seems I might have overlooked a few things in the tests.
@gr2m any idea why the state property of the options param isn't passed through?

ooopsie doopsie, you found a bug!


Add the CSS Anchor API

The CSS Anchor API allows you to define positioning rules for an element to keep it on screen. A classic use case is tooltips. Normally you may want the tooltip above the element on the y axis. But if the element with a tooltip is too high up on the page, you may want the tooltip to below the element.
The Anchor API provides a way to do that in CSS so we don't have to re-invent the wheel every time we encounter this problem.
https://www.w3.org/TR/css-anchor-position-1/
https://developer.chrome.com/blog/tether-elements-to-each-other-with-css-anchor-positioning/

I share the excitement, but per this comment already at https://caniuse.com/css-anchor-positioning, right?

@Schweinepriester ah, thanks. I had searched for "css anchor api" which I see now is incorrect.


Python.h: No such file or directory even after using "quick fix"

Python version: 3.8.1
I added Python.h and Numpy on the path with a json file.
I tried compiling the animation example. And I got the following error:
PS C:\CPPScripts\cpp_tmp_scripts\matplotlib-cpp\examples> g++ .\animation.cpp -o animation
In file included from .\animation.cpp:3:
.\../matplotlibcpp.h:5:10: fatal error: Python.h: No such file or directory
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.

Apparently matlabplotcpp.h still doesn't see the Python.h file despite I put in the required paths.
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:\\Users\\foo\\AppData\\Local\\Programs\\Python\\Python38-32\\include",
                "C:\\Users\\foo\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site-packages\\numpy\\core\\include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\Strawberry\\c\\bin\\gcc.exe",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "windows-gcc-x64"
        }
    ],
    "version": 4
}

How do I fix this?

had you resolve it? I metting same quetion -. -


Document the CSV reader's buffer_size option

Fixes #1039

Should be merged after - https://github.com/duckdb/duckdb/pull/8253

Thanks for adding this Gabor, highly appreciated! LGTM. Should we also add that messing around with this option can affect performance and memory usage, so it should only be used by "advanced" users?

Thanks for adding this Gabor, highly appreciated! LGTM. Should we also add that messing around with this option can affect performance and memory usage, so it should only be used by "advanced" users?


Fix "I am a*" icons/hover

When you hover over it seems to be a button or that you can "add" a picture since is a profile. It will be better if we can add the capability of adding a picture to that profile.

Rattana changed the page to be able to add profile info and picture


update .gitignore to ignore export directory

update .gitignore to avoid adding export directory to further git commits.

Codecov Report

Merging #116 (2afb558) into master (6475e59) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #116   +/-   ##
=========================================
  Coverage     54.92%   54.92%
  Complexity      571      571
=========================================
  Files           101      101
  Lines          2658     2658
  Branches        374      374
=========================================
  Hits           1460     1460
  Misses          962      962
  Partials        236      236

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Avoid loading assemblies from cached catalogs when composing

When one of the assemblies that contribute to the MEF catalog are changed, we have to rescan that assembly, then we have to recompose the graph. Although scanning an assembly is relatively quick, composing the graph can take a long time, and loads many assemblies in the process even though they weren't changed from their cached catalog versions.
There are at least two reasons why composing loads assemblies from the catalog, and I think we can solve them.

I have a branch where I've added tests that verify that we don't load assemblies during composition (these tests fail at present) and I'm working through the issues.


Token Migration Case Studies

In a discussion about token migration in the Oxen community, @KeeJef suggested studying cases including Helium, Rollbit, Unibot, Threshold, Thorchain, TRON, EOS, Golem, and Aeternity.
Here are the notes:
1. Helium Migration from Helium native token to Solana token

Aspect
Details

Migration Process
Helium's L1 ceased block production during the migration window. A snapshot of its network state was loaded onto the Solana Mainnet using a Merkle Tree structure. Users only need to upgrade their wallets. Public wallet addresses changed, but private keys and seeds remained the same.

Migration Deadline
Indefinite (balances imported from old to new chain, private keys compatible).

Swap Ratio
1:1 constant rate.

Community Vote in Decision
Yes.

Source
Helium Documentation

2. RLB Migration From Solana to Ethereum

Aspect
Details

Migration Process
Users register an account on the official platform https://rollbit.com/, deposit their RLB to Rollbit, then withdraw to the Ethereum network.

Migration Deadline
Indefinite as promised by the Rollbit official announcement, stating, “Indefinitely. It's important to us that no one is left behind on the Solana network. As such, we'll give plenty of time for folks to migrate their RLB to Ethereum.”

Swap Ratio
1:1 constant rate.

Community Vote in Decision
No.

Source
Rollbit Blog

3. Unibot Migration from V1 Token to V2 Token

Aspect
Details

Migration Process
The first claim window is two days, after that a snapshot will be taken and the second claim window will be open indefinitely for those who missed the initial claim.

Migration Deadline
Indefinite.

Swap Ratio
1:1 constant rate.

Community Vote in Decision
Yes.

Source
Unibot Blog

4. TRON Migration from ERC20 based TRX to TRON’s MainNet

Aspect
Details

Migration Process
Investors can exchange TRON MainNet tokens at exchanges supporting permanent TRX migration, including Binance, Gate.io, Kucoin.

Migration Deadline
Indefinite as promised by the official announcement.

Swap Ratio
1:1 constant rate.

Community Vote in Decision
No.

Source
TRON Network

5. EOS Migration from ERC20 Token to EOS native token

Aspect
Details

Migration Process
A snapshot is taken, and a sophisticated account verification process is created for recovering unregistered EOS tokens.

Migration Deadline
Indefinite.

Swap Ratio
1:1 constant rate.

Community Vote in Decision
No.

Source
EOS New York Blog

6. Golem (GNT to GLM) Migration

Aspect
Details

Migration Process
The migration of GNT tokens through the contract will be done using an audited migration app to perform on-chain contract execution. Similar to the SAI to DAI migration process.

Migration Deadline
Indefinite.

Swap Ratio
1:1 constant rate.

Community Vote in Decision
No.

Sources
Golem Network, Golem Project Blog

7. Aeternity Migration from ERC20 Token to Aeternity Native Token

Aspect
Details

Migration Process
æternity utilizes a smart contract that employs Merkle-tree hashes, allowing the owners of Ethereum private keys to claim their tokens on the æternity blockchain. This is done by providing a signed message of the æternity address.

Migration Deadline
Indefinite.

Swap Ratio
1:1 constant rate.

Community Vote in Decision
No.

Source
Aeternity Blog

8. Threshold Network Merging between Keep and Nucypher

Aspect
Details

Merging Process
Threshold represents the first on-chain merge between two existing networks, Keep and NuCypher. A sophisticated vending machine smart contract is implemented for the token swap. This is complicated because they need to take care of the migration of both liquid tokens and staked tokens.

Migration Deadline
Indefinite, with legacy networks maintained.

Swap Ratio
Constant 1NU: ~3.26T and 1KEEP: ~4.78T.

Community Vote in Decision
Yes.

Source
Threshold Network Blog

9. Thorchain Migration from ERC20 and BEP20 to Native Chain

Aspect
Details

Migration Overview
THORChain activated a "killswitch" to phase out RUNE tokens based on the Ethereum blockchain and BNB Chain in favor of rune issued on its native blockchain. The process aims to unify the RUNE token and enhance network security and stability.

Migration Process
BNB.RUNE and ETH.RUNE (IOU Tokens) are swapped for the upgraded native RUNE token. Users holding IOU Tokens are required to create a new wallet on THORChain and click an upgrade button to make the switch.

Swap Ratio
Initially, the conversion ratio was 1:1. However, after activating the killswitch, the redemption rate of BNB.RUNE and ETH.RUNE will decrease from 1:1 to 1:0 over a year. Six months after activation, 1 BNB.RUNE will be redeemed for 0.5 THOR.RUNE. After one year, it will be 0.0 THOR.RUNE.

Deadline for Migration
The reduction in swap ratio over a year after the killswitch activation serves as a gradual phase-out, encouraging users to migrate sooner rather than later.

Reason for Migration
The migration was part of THORChain's push towards further decentralization. It was also to address security concerns and dependencies on third-party networks, making the native network less susceptible to exploits.

Community Vote in Decision
No.

In my view, we can categorise the community into a few subsets:

Service Node operators and contributors (comprising about 40% of Oxen supply)
Active Oxen holders
Inactive Oxen holders

When designing the program, I believe it's sensible to target rewards towards the most active community members, as they generate the most value for the project. This includes running Service Nodes, building tools, creating software, and welcoming new people. This approach is what we have attempted with the Service Node bonus program and the Oxen swap.
Inactive Oxen holders are still important. However, there needs to be sense of closure with the swap. Keeping a large portion of the Oxen supply indefinitely side-lined will concern Session token holders (wondering what the Oxen holders will do with their tokens). The swap multiplier, in my view, balances these concerns and better aligns incentives. Unifying all users around the Session token
Separately, I can assure you we are committed to making the greatest possible effort to reach out to all Oxen/Loki holders about the swap, including those who are non-English speakers. We're aiming to bring as many people as possible along to the future Session token.

Didn't you notice a fallacy here? As I've explained, inactive Oxen holders will not be motivated by a late punishment because they are unaware of it.

There certainly will be inactive Oxen holders who become aware of the swap because the swap multiplier is decreasing, news travels far wider when there is a financial reward or cost to action or inaction.

I trust that you intend to do your best, but Thorchain has also made their best efforts, and yet there are still people who have missed out. You can verify this within the community by following the link I provided: https://t.me/thorchain_org/584304. You can even count them yourself.

We intend to hold the swap open indefinitely, which is inline with other projects, this should resolve the concern of people coming back and being unable to claim

This is admitting that we intend to take advantage of infrequent Oxen holders for our own benefit. Those infrequent Oxen holders have equal rights with any active Oxen holders, and we have no right to take advantage of them. This would be illegal in traditional IPOed companies if large stakeholders deprived infrequent stakeholders of their rights. Crypto projects are not IPO companies, but engaging in such misconduct is precisely the type of behavior that harms minority investors and provides regulatory agencies with an excuse to strengthen their hands towards decentralized projects in the name of protecting investors from scams.

I disagree, we are targeting rewards towards active members, the reward being Session tokens, Oxen holders still hold Oxen the value of which will trade at whatever it trades at, we don't remove Oxen from anyone. I see this as analogous to running a rewards program where you give x tokens to active members of the community or Service Nodes, but give less x tokens to less active members of the community, which is done every single day in crypto.

Up to 80 million Session Tokens unlocked at TGE
This step involves issuing an additional 14 million circulating coins to the foundation, which dilutes the value of everyone's holdings of OXEN by 17.5%. Consequently, the original value of 1 OXEN is now equivalent to 0.825 OXEN.

6 million for Project Treasury (7.5% TGE supply)
14 million for the Ecosystem and Community Fund (17.5% TGE supply)
In the first phase, the data is as mentioned above. However, in the "Where did it go" section, the data doesn't seem to match up. Where did the aforementioned two sets of data end up?

In the second phase, aside from setting aside 40 million for node rewards, the other 120 million is used for further dilution. Consequently, the value for the original holder of 1 OXEN decreases once again to: 0.825 * 0.4 = 0.33.

Even after deducting the Ecosystem and Community Fund of 44,000,000 and the Strategic Token Sale of 36,000,000, the foundation and team have again taken away a value of 40 million from the original shareholders. As a result, the value for the original holder of 1 OXEN decreases once more to: 0.825 * 0.667 = 0.5503. Moreover, who will manage the funds from the sale of 36,000,000 Strategic Tokens? Will it be proportionally returned to shareholders, or will it again fall under the control of the foundation? Please consider whether this numerical game is fair to the original OXEN shareholders.


Flooded service light turn on.

Third time this has happened the last month. All of a sudden i notice i can't turn any lights on. HA is very slow and the logs are flooding with errors about not being able to turn on lights service.
I'm including the logs i found. Looks like it has been going on all day

Latest hassOS in proxmox VM.
Using ZHA with about 5-6 lightning groups
conbee 2 stick and Ikea bulbs.

Logger: homeassistant.helpers.service
Source: helpers/service.py:128
First occurred: 21 oktober 2021 06:48:08 (71 occurrences)
Last logged: 09:18:39

Unable to find referenced entities media_player.emby_lucas_tv
Unable to find referenced entities light.kontoret_takbelysning
Unable to find referenced entities media_player.googlehome2104
Unable to find referenced entities light.badrummet
Unable to find referenced entities light.nedre_hall_takbelysning

Logger: homeassistant.components.recorder
Source: components/recorder/__init__.py:444
Integration: Recorder (documentation, issues)
First occurred: 10:17:37 (1 occurrences)
Last logged: 10:17:37

The recorder queue reached the maximum size of 30000; Events are no longer being recorded

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:528
First occurred: 10:32:33 (2 occurrences)
Last logged: 15:45:20

Updating state for light.nedre_badrum_spotlights_zha_group_0x000a (<class 'homeassistant.components.zha.light.LightGroup'>) took 0.699 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22
Updating state for light.nedre_badrum_takbelysning (<class 'homeassistant.components.zha.light.Light'>) took 0.629 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

Logger: homeassistant.core
Source: components/zha/light.py:257
First occurred: 09:52:54 (42358 occurrences)
Last logged: 19:05:29

Error executing service: <ServiceCall light.turn_on (c:adapt_lgt_abbe_interval_2068082): entity_id=['light.nedre_badrum_spotlights_zha_group_0x000a'], params=transition=0.0, brightness=145, color_temp=454>
Error executing service: <ServiceCall light.turn_on (c:adapt_lgt_abbe_interval_2069878): entity_id=['light.nedre_badrum_spotlights_zha_group_0x000a'], params=transition=0.0, brightness=145, color_temp=454>
Error executing service: <ServiceCall light.turn_on (c:adapt_lgt_abbe_interval_2070081): entity_id=['light.nedre_badrum_spotlights_zha_group_0x000a'], params=transition=0.0, brightness=145, color_temp=454>
Error executing service: <ServiceCall light.turn_on (c:adapt_lgt_abbe_interval_2070380): entity_id=['light.nedre_badrum_spotlights_zha_group_0x000a'], params=transition=0.0, brightness=145, color_temp=454>
Error executing service: <ServiceCall light.turn_on (c:adapt_lgt_abbe_interval_2068628): entity_id=['light.nedre_badrum_spotlights_zha_group_0x000a'], params=transition=0.0, brightness=145, color_temp=454>
AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1507, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 462, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 582, in async_turn_on
    await super().async_turn_on(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 257, in async_turn_on
    result = await self._color_channel.move_to_color_temp(temperature, duration)
  File "/usr/local/lib/python3.9/site-packages/zigpy/group.py", line 44, in request
    res = await self.application.mrequest(
  File "/usr/local/lib/python3.9/site-packages/zigpy_deconz/zigbee/application.py", line 211, in mrequest
    with self._pending.new(req_id) as req:
  File "/usr/local/lib/python3.9/site-packages/zigpy/util.py", line 262, in new
    raise ControllerException(f"duplicate {sequence} TSN") from AssertionError
zigpy.exceptions.ControllerException: duplicate 175 TSN

Hey @meanmrgreen,
did you solve the issue?

Solved it by putting the transition time above 0 (1 sec). Haven't had it since
//Mvh Johan Löfstedt

From: @RubenKelevra @.>
Sent: Tuesday, June 14, 2022 9:13:30 PM
To: basnijholt/adaptive-lighting @.>
Cc: meanmrgreen @.>; Mention @.>
Subject: Re: [basnijholt/adaptive-lighting] Flooded service light turn on. (Issue #211)
Hey @meanmrgreenhttps://github.com/meanmrgreen,
did you solve the issue?
—
Reply to this email directly, view it on GitHubhttps://github.com/basnijholt/adaptive-lighting/issues/211#issuecomment-1155616889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AG5XJ6IQAAJY3TCZM5L2FXTVPDKVVANCNFSM5GTVJIZQ.
You are receiving this because you were mentioned.Message ID: @.***>

Cool 😎


Rajarju/aio where output

Description

Related Issue
Fix: #115

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] I have signed the Adobe Open Source CLA.
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

[ ] Need to check if the Error should be thrown if org is not selected

@shazron Updated PR


ShowTypingMiddleware not working in SLACK

Is your feature request related to a problem? Please describe.
show typing middleware doesn't work in slack.
Describe the solution you'd like
Expected behavior is to see bot is typing so that user knows bot has received the message.
Describe alternatives you've considered
n/a

@Anshul21, I am able to repro the issue. I am attempting to identify a possible workaround and will update you when I know more.

@stevkan any ETA on this? this will help us plan our releas. Thanks

@Anshul21, thank you for your patience while I try to isolate why this is happening. I can see where I believe this is failing though the why is eluding me, at the moment. Out of curiosity, if you simply pass in a 'typing' activity, does that get picked up by Slack?
await turnContext.sendActivities([
     { type: ActivityTypes.Typing },
     { type: 'delay', value: 500 },
]);

@stevkan i tried, it didnt work .

@Anshul21, thank you for your patience. I can see that the typing activity appears to be processed but it also seems as though it is getting bypassed as new activities are coming in behind it. I seem to be getting the same result whether using the 'showTypingMiddleware()' or just sending a typing activity after every activity in the 'adapter.processActivity()` method. I'm digging deeper and hope to have more of a response soon.


Config Validation warning when E9_sniper is not used

E9_sniper is the Klimov exfil and it's important for the "Cease Fire!" quest (given by Jaeger) to use it in config files.
For now I fixed the default config but it could be nice to add a validation step for this edge case.

TODO: find a more global solution to warn about all quests that need to take a specific extract point