CLEANUP: Reorder so MD is deleted before data

Related to issue #312

Add optional callback to batchDelete so it can be used to delete object(s) instead of duplicating code
Swap order so MD is deleted before data
Remove redundant log traces and errors
Add functional test for deleteObject to test deleting an object uploaded in parts

This at least swaps the order of deletion so MD is deleted before data, which is preferable to potential ghost MD of a deleted data object. The issue of how to persist the delete keys for confirmation of data deletion still needs to be resolved.

@ironman-machine

Hello @electrachong
Starting end to end procedure using the following payload:
{"REPO_NAME": "S3", "SCALITY_S3_BRANCH": "CLEANUP/swapDeleteOrder", "DEFAULT_BRANCH": "master"}
Please follow http://ci.ironmann.io/gh/scality/Integration/5759 for CI status.

@ttvi @electrachong @LaurenSpiegel
I am thinking, may be we should hold this off until we actually have GC implemented.
Let's take an example. User requests foo object to be deleted, we delete metadata and error in data

We respond back with error. Bart tries again but we send 404 as we have no record of metadata. We created an orphan.
We respond back with success. We created an orphan

Currently we don't have a GC setup to deal with orphans. Up until then we should live with this issue. Otherwise we are substituting one problem with another.
Quoting @ttvi from issue #312,

The "correct" way is to include data locations in the delete call to metadata. This location information will be stored in metadata log for GC later to use

We can use this PR after that is implemented.

@rahulreddy I would say that this PR targets a specific problem itself. Previously, we can have objects that exist but their data is corrupted if deletion fails. This PR solves that and introduces another non-harmful side-effect: we can have object deleted but their data not purged. This side-effect will be solved when GC is available.
For short, this PR reduces the severeness of the issue from "corrupting data" to "not purging deleted data" (users cannot see deleted data anyway). This PR still deserves some approvals.

@rahulreddy, I agree with @ttvi.  We discussed this and we prefer to show the user a view of the world without ghosts even if it means that orphans might have to be cleaned up.

@ttvi @LaurenSpiegel Thanks for making it clearer.

. Previously, we can have objects that exist but their data is corrupted if deletion fails.

Given that we actually ran in to a streaming issue last week, I agree with going on with this approach.

@ironman-machine check it, please!

Hello @electrachong
Starting end to end procedure using the following payload:
{"REPO_NAME": "S3", "SCALITY_S3_BRANCH": "CLEANUP/swapDeleteOrder", "DEFAULT_BRANCH": "master"}
Please follow http://ci.ironmann.io/gh/scality/Integration/5844 for CI status.

@ironman-machine check it

Hello @electrachong
Starting end to end procedure using the following payload:
{"REPO_NAME": "S3", "SCALITY_S3_BRANCH": "CLEANUP/swapDeleteOrder", "DEFAULT_BRANCH": "master"}
Please follow http://ci.ironmann.io/gh/scality/Integration/5897 for CI status.

looks good.  Good that you said related to #312 since we don't want to close with this PR.  We still want to deal with the logging issue.  Please update that issue once this is merged.

@ironman-machine one more check

Hello @electrachong
Starting end to end procedure using the following payload:
{"REPO_NAME": "S3", "SCALITY_S3_BRANCH": "CLEANUP/swapDeleteOrder", "DEFAULT_BRANCH": "master"}
Please follow http://ci.ironmann.io/gh/scality/Integration/6032 for CI status.

end-to-end passed, it's mergeable


Coverage: fix handling of constructors and top-level decls  (SR-7446)…

… (#15966)

[Coverage] Instrument constructor initializers (SR-7446)

We need to instrument constructor initializers, instead of the
delegating constructors which just call them.
rdar://39460313

[Coverage] Remove dead code, NFC

[Coverage] Use a shared profiler for constructors and member initializers

This fixes coverage reporting for member initializers and cuts down on
repeated AST traversals of pattern bindings within nominal type decls.
This allows us to remove some defensive heuristic code which dealt with
closures and if-exprs within member initializers.
(cherry picked from commit 8a003a41dac7f500866bc0facee323c79780d9b1)
Resolves SR-7446.

@swift-ci test and merge


Access denied when running as Github action

I am trying to run this container as part of a GitHub pipeline, locally everything runs, however, as GitHub Actions I get Error in Z:\work\setup.iss: File access denied.
This is even though I set chmod 777:
-rwxrwxrwx 1 runner docker     1856 Feb 23 14:21 setup.iss

This is the output I get from the action (https://github.com/13hannes11/focus_annotator/runs/5304797855?check_suite_focus=true):
Preprocessing
   Reading file: C:\Program Files\Inno Setup 6\ISPPBuiltins.iss
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line 11
Parsing [Setup] section, line 12
Parsing [Setup] section, line 13
Parsing [Setup] section, line 14
Parsing [Setup] section, line 15
Parsing [Setup] section, line 16
Parsing [Setup] section, line 17
Parsing [Setup] section, line 20
Parsing [Setup] section, line 21
Parsing [Setup] section, line 22
Parsing [Setup] section, line 23
Parsing [Setup] section, line 24
Creating output directory: Z:\work\Output
Error in Z:\work\setup.iss: File access denied.
Compile aborted.
Error: Process completed with exit code 2.

I found a workaround by copying files to the container manually:
docker container create --name setup amake/innosetup setup.iss
docker cp ./package setup:/work/
docker cp setup.iss setup:/work/
docker cp LICENSE.md setup:/work/
docker start -i -a setup
docker cp setup:/work/Output/. .
docker rm setup

I have the same issue , I figured it out that it is the uid mapping of the mounted volumes.

I have a vague understanding of the uid issue, and I've seen a fork of this repo has done some related work:
https://github.com/SundialTechnologies/innosetup-docker/commit/da63fefca165d377abaad58e8e8fbfa7eb1552e1
But I don't really understand it enough to confidently apply any of it myself. In my CI I prepare things ahead of time with umask and chmod.

I had a similar problem, when I tried to run this docker through podman. To remind you, podman runs with user permissions (not root), and if a docker has user configurations, there's sometimes a problem which needs to be handled.
This time I handled it using a brute force method: since it's a permissions problem (and since podman itself has no security issues if run as root) I regained the root permissions to innosetup docker file.
Here is my Dockerfile, in case someone finds any use to it:
FROM docker.io/amake/innosetup
USER root
ENV HOME /home/xclient
ENV WINEPREFIX /home/xclient/.wine
ENV WINEARCH win32
RUN chown -R root /home
WORKDIR /work
ENTRYPOINT ["iscc"]

Maybe the only required commands are only USER and RUN/chown, but just in case, I re-enter the last parts.
And this works for me.

@teras wrote:

Here is my Dockerfile, in case someone finds any use to it:
(Snip)
And this works for me.

It works but it brings another permission issue.
Generated files are owned by root.root and there is no write permission for the user.


Incorrect unused setting warning

In my snippet from here:
lazy val IntegrationTest = config("integration").extend(Test)

//...
lazy val root = Project(base = file("."))
  .configs(IntegrationTest)
  .settings(
    // Exclude integration tests by default (in ScalaTest)
    Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-l", "integrationTest"),
    // Include integration tests, by nullifying the above option
    IntegrationTest / testOptions := Seq.empty,
  )
  .settings(
    // Enable integration tests
    inConfig(IntegrationTest)(Defaults.testTasks)
  )

What happens is that IntegrationTest / testOptions := Seq.empty would get reported as an unused setting, which is false.
Getting this warning in our project:
[warn] there's a key that's not used by any other settings/tasks:
[warn]
[warn] * sample / Integration / testOptions
[warn]   +- /Users/alex/Projects/sample/build.sbt:63
[warn]
[warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key

Clearly Integration/testOptions is being used, being the reason for why that Integration was defined in the first place.

Otherwise this warning is very useful, glad you've added it, I already found some unused settings, thanks a lot for it.

@alexandru Thanks for the report!

I believe the Lagom SBT plugin might also have some incorrect warnings: https://discuss.lightbend.com/t/sbt-1-4-0-and-lagomkafkaenabled/7311/5

It would be nice for the cut-n-pasters to have pastable advice here. Meanwhile, I try to figure out how to get the withRank syntax to work.


Bump prettier to 1.5.2

Summary
As in title.
Test plan
prettier

It's reprinting a FlowFixMe comment wrongly. Mind fixing that?
Unrelated, but this is a massive amount of thrash on a relatively small codebase like Jest :(

I tried to land all the big formatting changes I wanted before switching team, hopefully it'll be much more quiet now.


Several .mata format files in automata-benchmark not successfully parsing

Various files from https://github.com/VeriFIT/automata-bench have lines like: "q46 false true". It's not clear to me what this is supposed to represent, but it seems to break the MATA parser:
./build/examples/example05-parsing automata-bench/email_filter/1-19-34-37-67/gen_aut/aut34.mata
libMATA error: Unknown token false

Hello. Thank you for the reporting the issue. This is a known bug to us that we have yet to fix. We changed the supported .mata format for false and true: from false and true to \false and \true.
The following script replaces the invalid tokens:
import re
import sys

out = []

in_parens = re.compile(r"^(.*)\(([^\(]*)\)$")
is_q = re.compile(r"^q[0-9a-zA-Z]+$")
ltrue = re.compile(r"\btrue\b")
lfalse = re.compile(r"\bfalse\b")

with open(sys.argv[1], "r") as f:
    for line in f:
        line = line.strip()
        modified = False

        line = ltrue.sub("\\\\true", line)
        line = lfalse.sub("\\\\false", line)

        if line.startswith("q") and line.endswith(")"):
            line_match = in_parens.match(line)
            if line_match:
                qs = line_match[2].split(" | ")
                if all(is_q.match(q) for q in qs):
                    modified = True
                    for q in qs:
                        out.append(line_match[1] + q)

        if not modified:
            out.append(line)

with open(sys.argv[1], "w") as f:
    for line in out:
        print(line, file=f)

And can be run like this:
for f in $(find . -type f | grep 'gen_aut.*\.mata$'); do python3 fix_nfa.py $f; done

This should hopefully fix the issue if you need this right now. Sorry for the inconvenience.


CalculatorApp.exe is not executable...

Describe the bug
I try to build the Calculator for a computer without entry to the Microsoft Store. After I compile the project with Visual Studio inside my project folder the CalculatorApp.exe appears. Unfortunately this exe is not executable. Every time I try to start the exe nothing happens. When I simultaneously open the Task Manager I can see that the exe start and cancel after a few seconds. Inside the Event Viewer two error messages appear(see first two screenshots). When I debug the project in Visual Studio the calculator starts normally.
When I create a Setup Launcher for the project the application it cant installed the application probably, without the change of the Microsoft.NET dependency from .NET Framework 4.7.2 to Any, although the requested version is installed(see screenshot 3 and 4). While the build process of the Setup Launcher several warning appears(see screenshot 4 and 5). Likewise the warning before the requested dependencies are available on the system. While my search I discovered that maybe some file path are not resolved correctly(see screenshot 7). All in all i can not find the reason why the creation of a working exe is not working. Maybe some compatibility issues...
Can someone maybe describe the correct steps how to create a working exe of the Calculator?
So why run the calculator after I debug the project in Visual Studio, but not when I try to open the exe?
Steps To Reproduce
Steps to reproduce the behavior:

Download a version of the project with is compatible with Win 10.
Follow the instructions of the "Getting Started".
Build Solution with Visual Studio.
Open exe in the project folder.
See error

Expected behavior
The Calculator can be installed on the computer normally.
Screenshots
1.

Device and Application Information

OS Build: 10.0.20348.0
Architecture: x64
Application Version:
Region:de-De
Dev Version Installed:

Additional context
I work on a 2022 Server environment, but I can reproduce the error on a Win 10 Pro and a Win 11 Pro environment.
Requested Assignment

If possible, I would like to fix this.

Hi, could you assign me to it so that I can try and fix the problem for you

Hi, could you assign me to this task.


java.lang.RuntimeException

Hello,
In our app we are seeing this java.lang.RuntimeException once in a while.
Unfortunately, there are nothing in the stack trace which indicates where in our code or when this happens.
Version: de.halfbit:tinybus:3.0.2
java.lang.RuntimeException
de.halfbit.tinybus.TinyBus.handleExceptionOnEventDispatch(SourceFile:329)
de.halfbit.tinybus.TinyBus.processQueue(SourceFile:383)
de.halfbit.tinybus.TinyBus$TinyBusImpl.onPostFromBackground(SourceFile:529)
de.halfbit.tinybus.impl.Task.run(SourceFile:87)
android.os.Handler.handleCallback(Handler.java:739)
android.os.Handler.dispatchMessage(Handler.java:95)
android.os.Looper.loop(Looper.java:158)
android.app.ActivityThread.main(ActivityThread.java:7229)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.reflect.Method.invoke(Native Method)
de.halfbit.tinybus.TinyBus$TinyBusImpl.dispatchEvent(SourceFile:460)
de.halfbit.tinybus.TinyBus.processQueue(SourceFile:380)
de.halfbit.tinybus.TinyBus$TinyBusImpl.onPostFromBackground(SourceFile:529)
de.halfbit.tinybus.impl.Task.run(SourceFile:87)
android.os.Handler.handleCallback(Handler.java:739)
android.os.Handler.dispatchMessage(Handler.java:95)
android.os.Looper.loop(Looper.java:158)
android.app.ActivityThread.main(ActivityThread.java:7229)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Can it be that one of your @Subscribe methods is not public? Could you please check it out?

All the @Subscribe methods are public.
Do you have any other suggestions?

I would suggest to prepare a special version of the library with a try-catch block around line 460 of TinyBus.java.
try {
    subscriberCallback.method.invoke(receiver, event);
} catch (Exception e) {
   Log.e(TAG, 'kaboom -----', e);
   Log.d(TAG, subscriberCallback);
   Log.d(TAG, subscriberCallback.method);
   Log.d(TAG, receiver);
   Log.d(TAG, event);
}

This shall give you much better insides on what gets wrong when it fails once again. If you use crashlytics you can post more details to crashlytics. Hope this helps.

Thanks. We should give that a try.

Please keep me updated once you have more details.

It seems that it was our bug reporting tool, which was not providing enough information to us. The crash does not originate from TinyBus, but from some of our own code.
Closing the issue/question...


[AIRFLOW-2255] Add alembic migration script for airflow-2059

Make sure you have checked all steps below.
JIRA

[x] My PR addresses the following Airflow JIRA issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-2059

Description

[x] Here are some details about my PR, including screenshots of any UI changes:
Add alembic migration script for airflow-2059(indexing job_id in task_instance table).

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

[ ] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

Original pr could be found at https://github.com/apache/incubator-airflow/pull/3086

cc @cjgu @Fokko

thanks @jgao54 . did not know that script :) The reason I added this pr is because I added this pr(https://github.com/apache/incubator-airflow/pull/3086) which someone suggested I should have a migration script as well. I will close this pr for now.


Crash using i3

Describe the bug
The app crashes immediately after configuration when getting Unsupported desktop/window environment.
To Reproduce
Steps to reproduce the behavior:

Use i3 along with Arch
Launch go-hass-agent binary (v4.1.1)

Expected behavior
It should not crash, at least, it should skip to the next part.
Logs
go-hass-agent --debug
2:13AM DBG Debug logging enabled.
2:13AM DBG Setting language to [fr-FR].
2:13AM DBG Registration status is true
2:13AM WRN Unsupported desktop/window environment.
2:13AM DBG ../runner/work/go-hass-agent/go-hass-agent/internal/linux/appSensor.go:128 > Unsupported or unknown portal
2:13AM WRN Unable to execute org.freedesktop.problems.GetProblems on org.freedesktop.problems (args: []) error="The name org.freedesktop.problems was not provided by any .service files"
2:13AM WRN Unable to retrieve property net.hadess.PowerProfiles.ActiveProfile (net.hadess.PowerProfiles) error="The name net.hadess.PowerProfiles was not provided by any .service files"
2:13AM DBG Cannot retrieve a power profile from DBus. error="The name net.hadess.PowerProfiles was not provided by any .service files"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x876552]

goroutine 84 [running]:
github.com/joshuar/go-hass-agent/internal/hass/api.StartWebsocket.func1()
	/home/runner/work/go-hass-agent/go-hass-agent/internal/hass/api/websocket.go:65 +0x112
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer.func1()
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.1/retry.go:18 +0x1b
github.com/cenkalti/backoff/v4.doRetryNotify[...](0xc0005b1e58?, {0x7fd4ecbbb008, 0xc00068e320}, 0x0, {0x0, 0x0?})
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.1/retry.go:88 +0x152
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0x0?, {0x7fd4ecbbb008?, 0xc00068e320?}, 0xdbbcc0?, {0x0?, 0x0?})
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.1/retry.go:61 +0x65
github.com/cenkalti/backoff/v4.RetryNotify(...)
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.1/retry.go:49
github.com/cenkalti/backoff/v4.Retry(...)
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.1/retry.go:38
github.com/joshuar/go-hass-agent/internal/hass/api.StartWebsocket({0x10b6328?, 0xc000122050}, {0x10aec40, 0xc0002fbcc0}, 0xc0006aa0c0, 0xc0006aa120)
	/home/runner/work/go-hass-agent/go-hass-agent/internal/hass/api/websocket.go:73 +0x27c
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).runNotificationsWorker.func2()
	/home/runner/work/go-hass-agent/go-hass-agent/internal/agent/notifications.go:43 +0xad
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).runNotificationsWorker
	/home/runner/work/go-hass-agent/go-hass-agent/internal/agent/notifications.go:40 +0x1ea

Desktop (please complete the following information):

OS: Arch
Version: 4.1.1
Desktop env: i3 version 4.22 (2023-01-02)

Thanks for your work :pray:

Sorry for the bad title. I updated it. Let me know if I can help you running some tests !

Ugh, that's an ugly way for the program to crash :(  I can reproduce a similar crash in an Arch toolbox on my Fedora machine.
Would you be able to do some digging for me and:

look in the file ~/.config/fyne/com.github.joshuar.go-hass-agent/preferences.json and let me know what the value of the WebSocketURL is (I don't need the exact hostname, just the sheme and path, so please obscure it for privacy if needed).
if you were using a previous version without this issue, what version was that? In that case I can diff the changes in the source between that version and 4.1.1 to do some sleuthing.

Thanks for trying out go-hass-agent!

I believe that the issue is fixed with commit 6603e061f6887851cd0a8439093bb25a20b8abe4. Can you try out the attached version that has this commit backported on top of the 4.1.1 version?
go-hass-agent-4.1.1SNAPSHOT_32ac45e-1-x86_64.pkg.tar.zst.gz
The commit will also be in the next major version of go-hass-agent, but that will also have a major breaking change to the config, so I want to avoid trying both that change and this fix at the same time.

Hi @joshuar,
Sorry for the delay. I tried the snapshot you gave me and, indeed, it seems to work well.
However, I still have an error :
Could not connect to websocket. error="tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config"

It does not seems to prevent it from working.
The hass.websocketurl and WebSocketURL looks like this :
wss://HOST:PORT/api/websocket

My certificate is generated with letsencrypt and is currently valid.
Let me know if you want me to create a new issue about that.
Thanks !

Fun fact, using the snapshot you gave me, I can't register my computer if I'm starting from scratch. I had to re-install the latest stable release, then re-install your snapshot to get it to work.
Here is the result of the register command with the debug flag on the snapshot you gave me :
8:55AM DBG Debug logging enabled.
8:55AM DBG Setting language to [fr-FR].
8:55AM FTL Could not export apiURL. error="key hass.apiurl not set"

Another strange behavior, the GUI seems to ignore the --token and --server input from the command line

Hi @joshuar,
Sorry for the delay. I tried the snapshot you gave me and, indeed, it seems to work well.

Brilliant!

However, I still have an error :
Could not connect to websocket. error="tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config"

I've been struggling to either understand and replicate the cert issue. I think this might be an underlying library issue, but I'll have to spend more time trying to recreate and then fix.

It does not seems to prevent it from working.

Most likely this issue will block notifications from Home Assistant to the agent working for you unfortunately.

The hass.websocketurl and WebSocketURL looks like this :
wss://HOST:PORT/api/websocket

My certificate is generated with letsencrypt and is currently valid.
Let me know if you want me to create a new issue about that.

No need, I'll keep digging on this.

Fun fact, using the snapshot you gave me, I can't register my computer if I'm starting from scratch. I had to re-install the latest stable release, then re-install your snapshot to get it to work.
Here is the result of the register command with the debug flag on the snapshot you gave me :
8:55AM DBG Debug logging enabled.
8:55AM DBG Setting language to [fr-FR].
8:55AM FTL Could not export apiURL. error="key hass.apiurl not set"

Yes! I discovered a bug with the command-line registration flow. The issues should be fixed in the next major version.

Another strange behavior, the GUI seems to ignore the --token and --server input from the command line

This is expected :) The way I had planned registration was that the GUI registration process was:

Open go-hass-agent via your desktop application menu.
It opens a window asking you for all the details.

The --token and --server options were instead intended for a non-GUI registration flow in combination with the --terminal option (i.e., go-hass-agent --terminal register --server foo --token bar). For example, on a server.
I didn't envision people starting a graphical registration flow from the command-line and specifying the --token and --server options. Though I can see that is a possible way with the command-line options parsing. I can change the code to support this though, I'll add it in.
Thanks again for trying go-hass-agent. I hope despite these issues it is providing some usefulness!

Hey no problem and no need to apologise! I can always improve the documentation :) I'll release v5.0.0 shortly that will have the fix for the websocket (to at least not crash) and command-line registration. I'm still working on the cert issue you are facing, any fix will be in a patch release. Fingers crossed I can work out some kind of fix.

Closing this issue as I believe we worked it out :tada: If this is still an issue, lets re-open.


Question: Is there a way to avoid cached image response?

we have a use-case where we don't want response from imagor-cached-bucket, for certain image/bucket.
Q: is there any way to avoid cached image response? or force create cache image in imagor bucket?

If caching refers to Result Storage, you may use preview() filter:

preview() skips the result storage even if result storage is enabled. Useful for conditional caching

For caching regarding to response headers, you may try some of the config options:
  -imagor-cache-header-ttl duration
        imagor HTTP cache header ttl for successful image response (default 168h0m0s)
  -imagor-cache-header-swr duration
        imagor HTTP Cache-Control header stale-while-revalidate for successful image response (default 24h0m0s)
  -imagor-cache-header-no-cache
        imagor HTTP Cache-Control header no-cache for successful image response


[mdl-sdk] Update to 2024.0.4

Remove most patches (already integrated or no longer relevant).

Pass those cmake arguments that are actually relevant.

Add mdl_distiller_cli and mdltlc as tools.

Adapt installed cmake support scripts to the directory structure.

Merge all license files into the copyright file.

Update dependencies.

Replace freeimage feature by openimageio feature.

Support linux & arm.

[x] Changes comply with the maintainer guide.

[x] SHA512s are updated for each updated download.

[x] The "supports" clause reflects platforms that may be fixed by this new version.

[x] Any fixed CI baseline entries are removed from that file.

[x] Any patches that are no longer applied are deleted from the port's directory.

[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.

[x] Only one version is added to each modified port's versions file.

Usage test pass with following triplets:
x64-windows


Losing window focus each second on GNOME 43.2 Wayland

Screencast from 2023-12-16 15-06-32.webm
As shown on video, I constantly lose focus on any currently opened window each second for a moment. Getting no error messages after running it in debug mode.
After building it, got single warning:
 ~/Programs/cliptopia  ❯ ./install-from-source.sh
grep is installed
xclip is installed
pgrep is installed
pkexec is installed
whereis is installed
wl-copy is installed
wl-paste is installed
Installed Java Version is greater than 17.0.0
Installed Flutter Version is greater than 3.16.0

/home/user/Programs/cliptopia/linux/my_application.cc:73:5: warning: 'gdk_screen_get_monitor_geometry' is deprecated: Use 'gdk_monitor_get_geometry' instead [-Wdeprecated-declarations]
Building Linux application...
  >> Copying Bundle to /opt/cliptopia ...
  >> Starting Integration ...
  >> Creating a system link (update-alternatives) ...
  >> Writing Pixmap ...
  >> Writing Desktop Entry
  >> Integration Complete
  >> See setting up the keyboard shortcut for cliptopia (Super + V)

Should it be like that?

I constantly lose focus on any currently opened
This is an issue related to wl-clipboard, it needs to grab focus to work.
Not related to cliptopia though, but I would try to find a way to prevent this.

The background engine of cliptopia executes wl-paste which in turn grabs the focus to work.
This can be regenerated by running ...
sleep 1 && wl-paste > temp

After building it, got single warning:

That's ignorable, don't worry about it.
The function is actually used to handle cliptopoa's power mode appearance in a multi monitor setup.

Also, till the fix arrives, can you try force-xclip mode from the settings menu.
This Setting is located in Cliptopia's Normal mode which can be spawned by just running ...
cliptopia

I have created an issue regarding this in wl-clipboard.
I hope we get the fix as soon as possible.

An update will arrive soon.


/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmdSqrt'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `sgelsd_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `mkl_sparse_s_add'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cdotu_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `spotrf_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cgemm_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `dgetrs_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmdAsin'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `sgelss_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmsAcos'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `dgesdd_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmsAsin'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `saxpy_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `sgeev_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `spotri_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `sgemv_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `MKL_Somatcopy2'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmsTrunc'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `mkl_sparse_s_spmmd'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `ddot_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cblas_zgemm_batch'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmsLn'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `zhetrf_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `zsytrs_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cgeev_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cheev_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `vmdCos'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `mkl_sparse_z_trsv'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `mkl_sparse_z_create_bsr'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `iJIT_NotifyEvent'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `sscal_'
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `zsytrf_'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/sherpa-online-websocket-client-microphone] Error 1
make[1]: *** [sherpa/cpp_api/websocket/CMakeFiles/sherpa-online-websocket-client-microphone.dir/all] Error 2
[ 73%] Linking CXX shared library ../../lib/libsherpa_cpp_api.so
[ 73%] Built target sherpa_cpp_api
make: *** [all] Error 2
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Setting PYTHON_EXECUTABLE to /home/local/QCRI/ahussein/anaconda3/envs/k2/bin/python3
for fast compilation, run:
export SHERPA_MAKE_ARGS="-j"; python setup.py install
Setting make_args to "-j4"
build command is:

                cd build/temp.linux-x86_64-cpython-38

                cmake -DCMAKE_BUILD_TYPE=Release -DCUDNN_LIBRARY_PATH=/cm/shared/apps/cudnn8.0-cuda10.2/<IP_ADDRESS>/lib64/libcudnn.so -DCUDNN_INCLUDE_PATH=/cm/shared/apps/cudnn8.0-cuda10.2/<IP_ADDRESS>/include -DPYTHON_EXECUTABLE=/home/local/QCRI/ahussein/anaconda3/envs/k2/bin/python3 -DSHERPA_ENABLE_TESTS=OFF  -DCMAKE_INSTALL_PREFIX=/alt-arabic/speech/amir/k2/tmp/sherpa/build/lib.linux-x86_64-cpython-38/sherpa  /alt-arabic/speech/amir/k2/tmp/sherpa

                make -j4 install/strip

Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    setuptools.setup(
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/install.py", line 123, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 165, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command
    self.run_command(cmdname)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 112, in build
    self.run_command('build_ext')
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
    self.build_extensions()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
    self._build_extensions_serial()
  File "/home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
    self.build_extension(ext)
  File "/alt-arabic/speech/amir/k2/tmp/sherpa/cmake/cmake_extension.py", line 117, in build_extension
    raise Exception(
Exception:
Build sherpa failed. Please check the error message.
You can ask for help by creating an issue on GitHub.

Click:
	https://github.com/k2-fsa/sherpa/issues/new

How did you install k2?

This is my k2 installation https://github.com/k2-fsa/k2/issues/1124

/usr/bin/ld: warning: libmkl_intel_lp64.so, needed by /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmkl_gnu_thread.so, needed by /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmkl_core.so, needed by /home/local/QCRI/ahussein/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so, not found (try using -rpath or -rpath-link)

Please run
find $CONDA_PREFIX -name libmkl_intel_lp64.so

If it is inside $CONDA_PREFIX/lib, then please use
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH

Hi @AmirHussein96 @csukuangfj
I also faced a similar issue with the installation
Did you solve the problem yet?

@csukuangfj
I tried to follow the documentation but my k2 dir doesn't contain a build_release dir

Thanks for replying
I got
/usr/local/lib/python3.9/site-packages/k2# cd build_release/ /usr/local/lib/python3.9/site-packages/k2/build_release# cmake -DCMAKE_BUILD_TYPE=Release .. CMake Error: The source directory "/usr/local/lib/python3.9/site-packages/k2" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
I installed k2 using pip not from source
pip install k2==1.21.dev20221030+cuda11.3.torch1.12.1 -f https://k2-fsa.org/nightly

`/usr/local/lib/python3.9/site-packages/k2# cd build_release/

First, that doc assumes you want to install k2 from the source.

CMake Error: The source directory "/usr/local/lib/python3.9/site-packages/k2" does not appear to contain CMakeLists.txt.

The error is caused by not following the document. You have missed the git clone statement.
Please follow that doc strictly.

pip install k2==1.21.dev20221030+cuda11.3.torch1.12.1 -f https://k2-fsa.org/nightly

This wheel was built more than a half year ago. Please either install the latest k2 from source or
download some pre-compiled wheel from https://k2-fsa.github.io/k2/installation/pre-compiled-cuda-wheels-linux/index.html

Thanks @csukuangfj


Update youtube icon, fix 413

After

Fix #413
Reduces file size of youtube.svg from  3.13 KB  to 1.16 KB

Should not have a silid background color, according to other icons?

It should indeed and it used to, I think the online svg optimizer I used to minimize the svg changed this.
I will fix it.

Padding was incorrect, I updated the commit :
Current rendering is :

Nice improvement! Thank you!


Dataset.meta visualization

The "Meta" section of the single-dataset page will need a (minor) update, because the attributes contained in the meta object can be quite verbose (for instance there may be 400 elements of components, or the history string could be quite long and not fit there).
Example:

Possible ways out:

We could just show the names of the meta entries, and hide the values;
We could have a "view meta" button that opens a (wide) modal with all the keys and values
... other ideas?

I'd be in favor of option 2 :)

Not sure about button naming, in case I'll update it.


CD failures due to missing base images

The CD pipeline is currently failing due to debian:buster(-slim) not having a ppc64le build.
https://github.com/debuerreotype/docker-debian-artifacts/issues/173

https://github.com/debuerreotype/docker-debian-artifacts/issues/170
Looks like buster is EOL, so I'll be removing it from our base images.

done in #202


Update markup on signup data form.

Changes

Update markup on signup data form, in addition to the shipment data form. References #4220.

Fixes #4202 for real.
For review: @aaronschachter @DoSomething/front-end

:+1: Nice find value added shippy


Automated Package Upgrade

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Algorithm] Insertion Sort [Python]

#335 Adding Insertion sort program in python language.

thanks for contributing


Update License year and copyright holder

Since we are prepping for a new release, it makes sense for us to change this; all subsequent versions of rbx-dom starting from the next release will be licensed to the Rojo authors rather than specifically LPG.

Did you get permission from Lucien to do this?

I have, though the response is still pending. If the response is negative, we'll have to reconsider what that looks like but I'm optimistically assuming it will be positive.

It seems as though I'm not going to get a response one way or another on this, so I'll shelve this for now. We should consider what the future looks like though.


Add conda environment file.

Adds an environment.yml to participant environment setup. I have confirmed that the code on the readme page works with this environment. Participants will still need to execute pip install -e . to install the neuropixels package, as I do not believe that's currently distributed from a repo (and in any event it's changing rapidly anyway) and will obviously still need to do the kachery directory setup for kachery-p2p.
My personal neuropixels environment has a couple extra things installed--mainly numpy-base, some mkl packages and blas, as well as pymongo. I think the latter is an outdated dependency from the old version of hither. Not sure about the math libraries--they are not needed to execute the sample code on the readme page, so I'm not too sure how they got there, but I will leave them out until they actually seem to be needed.

Looks like this is superseded by PR #16 (just merged).


UnboundLocalError in Version 1.02

I was previously running 0.15.4 without issue and just installed the version 1.02 which has the following errors:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/squeezebox_controller/__init__.py", line 17, in cached_                                           f
    return f(self, details, *args)
  File "/home/pi/.local/lib/python3.7/site-packages/squeezebox_controller/__init__.py", line 42, in needs_p                                           layer_f
    return f(self, details, *args)
  File "/home/pi/.local/lib/python3.7/site-packages/squeezebox_controller/__init__.py", line 122, in simple                                           _command
    self._make_request(self.player_macs[details['player']], commands[command]['command'])
UnboundLocalError: local variable 'command' referenced before assignment

Sorry about that, I had released it before I had checked it over (test pipeline was still failing even :-/)
I've pushed a new release now, with the fix. The idea now is that you can use the uppercase codes or some english phrases (I'm trying to hook it in to Mycroft AI personal assistant). Anyway, let me know if there's anything else.


Added tests for the sqrt() method in math.sw

Description
Closes #5330
Previously, there were no tests for the sqrt() method in math.sw. This adds square root tests in the Rust test suite.
Other tests are found here:

pow()
log() and log2()

Checklist

[x] I have linked to any relevant issues.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
[x] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
[x] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
[ ] I have requested a review from the relevant team or maintainers.

Nice, but these can be unit tests inside the stdlib, right? sway-lib-std/src/math.sw has an example already.

Nice, but these can be unit tests inside the stdlib, right? sway-lib-std/src/math.sw has an example already.

You are correct. I would actually prefer the tests for math.sw to be right in there, but the pre-existing ones for pow(), log(), and log2() were made elsewhere. The reason I placed them in the Rust suite was to keep things uniform, but if desired I can move all of them into math.sw.

but if desired I can move all of them into math.sw.

If possible I think makes more sense. Thanks! :D

If possible I think makes more sense. Thanks! :D

Moved the tests for pow(), log(), and log2() into math.sw. Everything should be good on that front! However, may need to take a look at the failing checks.


Timer in NetworkObserver doesn't work as expected

I need to write some tests to verify this, but I believe the Timer doesn't work as expected. I believe that self.isCancelled is captured at the time the block is created and never gets updated.
I ended up copying the Timer into my project and noticed that it kept running even after I cancelled it. I couldn't figure out how to get dispatch_after to work in a Playground but I restructured it a little and this playground gets the point across:
struct Timer {

    var isCancelled = false
    var block: dispatch_block_t = {}
    var msg: String = ""

    init(_ handler: dispatch_block_t) {
        msg = "abc"
        block = {
            print("  inside block: \(self.isCancelled)")
            print("  msg: \(self.msg)")
            if self.isCancelled != true {
                handler()
            }
        }
    }

    mutating func cancel() {
        print("cancel = true")
        self.isCancelled = true
        self.msg += "123"
    }

    func runBlock() {
        print("running block (self.msg = \(self.msg))")
        block()
    }
}

var t = Timer {
    print("---")
}

t.runBlock()
t.cancel()
t.runBlock()

The output is:
running block (self.msg = abc)
  inside block: false
  msg: abc
---
cancel = true
running block (self.msg = abc123)
  inside block: false
  msg: abc
---

So you can see the values inside the block are captured at the time it is created and never updated. If anyone knows how to make the values in the block update properly, please let me know. Otherwise I'll keep looking for the solution...

I haven't been able to figure it out. It looks like it has to do with it being a struct vs class. Everything says "you can capture values" as if the default is that it shouldn't be. But with a struct it appears to capture the values. Changing it to a class makes it work.

Hi @ryanjm - yes, this is almost certainly a value vs reference issue. Must be some poor testing around this I think.


_relevance error when utilizing orderBy relations

Bug description
Using _relevance fails when used with fields within a relation table.
prisma:query SELECT "public"."Parent"."id", "public"."Parent"."childId" FROM "public"."Parent" WHERE 1=1 ORDER BY ts_rank(to_tsvector(concat_ws(' ', "public"."Child"."name","public"."Child"."description","public"."Child"."notes")), to_tsquery($1)) DESC OFFSET $2
prisma:query ROLLBACK
Error - ParentUtils.fetch():  PrismaClientKnownRequestError:
Invalid `prisma.parent.findMany()` invocation:

The table `(not available)` does not exist in the current database.
    at RequestHandler.handleRequestError (/node_modules/@prisma/client/runtime/index.js:35024:13)
    at RequestHandler.handleAndLogRequestError (/node_modules/@prisma/client/runtime/index.js:34996:12)
    at RequestHandler.request (/node_modules/@prisma/client/runtime/index.js:34991:12)
    at PrismaClient._request (/node_modules/@prisma/client/runtime/index.js:36082:16) {
  code: 'P2021',
  clientVersion: '4.8.1',
  meta: { table: '(not available)' },
  batchRequestIdx: 0
}
ERROR: Resource not found.

If orderBy: { ... } is removed, the query works without the table '{not available}' error.
How to reproduce
Setup a parent & child table relation. Preform the query.
Expected behavior
I would expect this to order results according to their relevance to the search query and the fields specified in the relation table.
Prisma information

model child {
  id          String              @id @default(uuid())
  name        String
  description String?
  notes       String?
  parent     Parent
}

model parent {
  id          String              @id @default(uuid())
  child     Child               @relation(fields: [childId], references: [id])
  childId  String              @unique
}

await prisma.parent.findMany({
          orderBy: {
            child: {
              _relevance: {
                fields: ['name', 'description', 'notes'],
                search: formattedQuery,
                sort: 'desc',
              },
            },
          },
})

Environment & setup

OS: macOS
Database: PostgreSQL
Node.js version: v16.16.0

Prisma Version
prisma                  : 4.8.1
@prisma/client          : 4.8.1
Current platform        : darwin-arm64
Query Engine (Node-API) : libquery-engine d6e67a83f971b175a593ccc12e15c4a757f93ffe (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine    : introspection-core d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary           : prisma-fmt d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Format Wasm             : @prisma/prisma-fmt-wasm 4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe
Default Engines Hash    : d6e67a83f971b175a593ccc12e15c4a757f93ffe
Studio                  : 0.479.0
Preview Features        : fullTextSearch

Any updates on this? Im having the same issue in the same scenario.

Can one of you please enable query logging and share the SQL queries that are created for this under the hood? What happens when you run them manually against the database?

I can't see an issue with the SQL, Card and Guardian both exist in the database

Ran the SQL direct against the database and got the following err
target: sorcery.-.primary: vttablet: rpc error: code = NotFound desc = Unknown column 'Guardian.typeText' in 'order clause' (errno 1054) (sqlstate 42S22) (CallerID: c8wo5ic6laxzc2b6yedl): Sql: "select Card.id, Card.slug, Card.`name`, Card.hotscore from Card left join Guardian as j1 on j1.cardId = Card.id left join Guardian as j2 on j2.cardId = Card.id where match(j1.typeText) against (:vtg1 /* VARCHAR */ in boolean mode) and j1.id is not null or match(j2.rulesText) against (:vtg1 /* VARCHAR */ in boolean mode) and j2.id is not null or match(Card.`name`) against (:vtg1 /* VARCHAR */ in boolean mode) order by match(Card.`name`) against (:vtg1 /* VARCHAR */ in boolean mode) desc, match(Guardian.typeText, Guardian.rulesText) against (:vtg1 /* VARCHAR */ in boolean mode) asc limit :vtg2 /* INT64 */, :vtg3 /* INT64 */", BindVars: {REDACTED}


didn't find a face

face_recognition version: 1.2.3
Python version: 3.5
Operating System: Ubuntu 16.04

Description
I had been using your virtual machine ... Thank you BTW.  Then I modified one of your scripts ever so slightly so that I could separate the training and the recognition.  Everything worked wonderfully except the performance.  I then purchased a machine with 5 GPUs.  I installed Ubuntu 16.04 and tensorflow-gpu.  Now when I train I get the following...
train_dir = knn_examples/train
Traceback (most recent call last):
File "train.py", line 86, in
knn_clf = train("knn_examples/train")
File "train.py", line 22, in train
faces_bboxes = face_locations(image)
File "/home/rwilson/.local/lib/python3.5/site-packages/face_recognition/api.py", line 77, in face_locations
return [_rect_to_css(face) for face in _raw_face_locations(img, number_of_times_to_upsample)]
File "/home/rwilson/.local/lib/python3.5/site-packages/face_recognition/api.py", line 66, in _raw_face_locations
return face_detector(img, number_of_times_to_upsample)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
Since everything is Identical I assume that something is wrong with my setup.  Maybe a wrong version of something.
pip3 freeze
apturl==0.5.2
beautifulsoup4==4.4.1
blinker==1.3
Brlapi==0.6.4
chardet==2.3.0
checkbox-support==0.22
Click==7.0
cloudpickle==0.6.0
command-not-found==0.3
cryptography==1.2.3
cycler==0.10.0
dask==0.19.3
decorator==4.3.0
defer==1.0.6
dlib==19.16.0
face-recognition==1.2.3
face-recognition-models==0.3.0
feedparser==5.1.3
guacamole==0.9.2
html5lib==0.999
httplib2==0.9.1
idna==2.0
Jinja2==2.8
kiwisolver==1.0.1
language-selector==0.1
louis==2.6.4
lxml==3.5.0
Mako==1.0.3
MarkupSafe==0.23
matplotlib==3.0.0
networkx==2.2
numpy==1.15.2
oauthlib==1.0.3
onboard==1.2.0
padme==1.1.1
pexpect==4.0.1
Pillow==5.3.0
plainbox==0.25
ptyprocess==0.5
pyasn1==0.1.9
pycups==1.9.73
pycurl==7.43.0
pygobject==3.20.0
PyJWT==1.3.0
pyparsing==2.2.2
python-apt==1.1.0b1+ubuntu<IP_ADDRESS>
python-dateutil==2.7.3
python-debian==0.1.27
python-systemd==231
PyWavelets==1.0.1
pyxdg==0.25
reportlab==3.3.0
requests==2.9.1
scikit-image==0.14.1
scikit-learn==0.20.0
scipy==1.1.0
screen-resolution-extra==0.0.0
sessioninstaller==0.0.0
six==1.11.0
sklearn==0.0
ssh-import-id==5.5
system-service==0.3
toolz==0.9.0
ubuntu-drivers-common==0.0.0
ufw==0.35
unattended-upgrades==0.1
unity-scope-calculator==0.1
unity-scope-chromiumbookmarks==0.1
unity-scope-colourlovers==0.1
unity-scope-devhelp==0.1
unity-scope-firefoxbookmarks==0.1
unity-scope-gdrive==0.7
unity-scope-manpages==0.1
unity-scope-openclipart==0.1
unity-scope-texdoc==0.1
unity-scope-tomboy==0.1
unity-scope-virtualbox==0.1
unity-scope-yelp==0.1
unity-scope-zotero==0.1
urllib3==1.13.1
usb-creator==0.3.0
xdiagnose==<IP_ADDRESS>
xkit==0.0.0
XlsxWriter==0.7.3
What I Did
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

The reason why you can't recognize your face may be that the definition of the picture is not enough.
At 2018-10-10 08:26:35, "Rodger Wilson"<EMAIL_ADDRESS>wrote:
face_recognition version: 1.2.3
Python version: 3.5
Operating System: Ubuntu 16.04
Description
I had been using your virtual machine ... Thank you BTW. Then I modified one of your scripts ever so slightly so that I could separate the training and the recognition. Everything worked wonderfully except the performance. I then purchased a machine with 5 GPUs. I installed Ubuntu 16.04 and tensorflow-gpu. Now when I train I get the following...
image knn_examples/train/SamSecurity/1537462148390.png not fit for training: didn't find a face
image knn_examples/train/SamSecurity/1537462147959.png not fit for training: didn't find a face
image knn_examples/train/SamSecurity/1537462152251.png not fit for training: didn't find a face
Since everything is Identical I assume that something is wrong with my setup. Maybe a wrong version of something.
pip3 freeze
apturl==0.5.2
beautifulsoup4==4.4.1
blinker==1.3
Brlapi==0.6.4
chardet==2.3.0
checkbox-support==0.22
Click==7.0
cloudpickle==0.6.0
command-not-found==0.3
cryptography==1.2.3
cycler==0.10.0
dask==0.19.3
decorator==4.3.0
defer==1.0.6
dlib==19.16.0
face-recognition==1.2.3
face-recognition-models==0.3.0
feedparser==5.1.3
guacamole==0.9.2
html5lib==0.999
httplib2==0.9.1
idna==2.0
Jinja2==2.8
kiwisolver==1.0.1
language-selector==0.1
louis==2.6.4
lxml==3.5.0
Mako==1.0.3
MarkupSafe==0.23
matplotlib==3.0.0
networkx==2.2
numpy==1.15.2
oauthlib==1.0.3
onboard==1.2.0
padme==1.1.1
pexpect==4.0.1
Pillow==5.3.0
plainbox==0.25
ptyprocess==0.5
pyasn1==0.1.9
pycups==1.9.73
pycurl==7.43.0
pygobject==3.20.0
PyJWT==1.3.0
pyparsing==2.2.2
python-apt==1.1.0b1+ubuntu<IP_ADDRESS>
python-dateutil==2.7.3
python-debian==0.1.27
python-systemd==231
PyWavelets==1.0.1
pyxdg==0.25
reportlab==3.3.0
requests==2.9.1
scikit-image==0.14.1
scikit-learn==0.20.0
scipy==1.1.0
screen-resolution-extra==0.0.0
sessioninstaller==0.0.0
six==1.11.0
sklearn==0.0
ssh-import-id==5.5
system-service==0.3
toolz==0.9.0
ubuntu-drivers-common==0.0.0
ufw==0.35
unattended-upgrades==0.1
unity-scope-calculator==0.1
unity-scope-chromiumbookmarks==0.1
unity-scope-colourlovers==0.1
unity-scope-devhelp==0.1
unity-scope-firefoxbookmarks==0.1
unity-scope-gdrive==0.7
unity-scope-manpages==0.1
unity-scope-openclipart==0.1
unity-scope-texdoc==0.1
unity-scope-tomboy==0.1
unity-scope-virtualbox==0.1
unity-scope-yelp==0.1
unity-scope-zotero==0.1
urllib3==1.13.1
usb-creator==0.3.0
xdiagnose==<IP_ADDRESS>
xkit==0.0.0
XlsxWriter==0.7.3
What I Did
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

You are right.  I think cropping unknown faces to train from doesn't quite work.  Thank you!

import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while(True):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()


OpenID Connect

I was looking for a package of Django supporting OpenID Connect.
But because I could not find, I tried to write based on the class of OAuth 2.0.
https://gist.github.com/kakky/6809432
Thank you for the wonderful package.
I hope the acceleration of OpenID Connect support.

@kakky Did you have any luck with python-social-auth?

@onylampada Please see here.
https://github.com/omab/python-social-auth/issues/300
https://github.com/omab/python-social-auth/issues/477

Thanks!


Change MRB_WITH_IO_PREAD_PWRITE configuration name

Change to MRB_USE_IO_PREAD_PWRITE for consistency with mruby configuration macros.
Similarly, MRB_WITHOUT_IO_PREAD_PWRITE is changed to MRB_NO_IO_PREAD_PWRITE.
The previous names are available for compatibility but are deprecated.

This PR needs to be rebased.


License Submission tool: changes to Comments field

the legal team is getting a lot of submissions where the Comments field is empty. This is intended to be more than just a free-form comment field, so we discussed ways to make it more prominent and a better label.  To that end, can we change the following:

move Comments field to be at the top of the form, first field
change name to "Explain why this license meets the license inclusion principles" (instead of Comments) - let us know if that exceeds any character limit

A couple questions:
3) can we make this a required field?
4) can we have an active link in the field name (i.e., a link to the "license inclusion principles")?
thanks!

For @jlovejoy's question 4 above -- the link would go to https://github.com/spdx/license-list-XML/blob/master/DOCS/license-inclusion-principles.md
+1 to making this change, this would be excellent! I don't know the scope involved, but perhaps a good first issue for someone who's looking at contributing to the online tools?

Hey there, I made a pull request:https://github.com/spdx/spdx-online-tools/pull/302
review will be appreciated :)

@jlovejoy @goneall This issue has been resolved in the new upgrade to python3. You can check this out on production - https://tools.spdx.org/.  Thanks @purhan for working on the initial changes.


Fix for failing test-cases on Windows environment

Hi,
I tried to compile and build in a Windows environment but the following tests got failed because of the usage of hard-coded 'newline' and 'path-separator' characters, in assert conditions;
-> CommandlineParserTest -> missingSubCommandShowsErrorAndUsageText
-> CommandlineParserTest.java -> creatingSignerThrowsDisplaysFailureToCreateSignerText
-> FileBasedSubCommandTest.java -> fullyPopulatedCommandLineParsesIntoVariables
-> HashicorpSubCommandTest.java -> fullyPopulatedCommandLineParsesIntoVariables
Fixed them using System.lineSeparator() and Paths.

 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.


add peek/peek_from for UnixDatagram

missing peek/peek_from in UnixDatagram, which exist in standard library. I'm willing to fire a PR for this.

This would be fine, but currently the API in standard library is unstable I see. Currently Mio wraps the std lib types, which could be a bit challenging. We don't really have a good story for additional API added after our minimum rust version, e.g. also see https://github.com/tokio-rs/mio/issues/977. Why we could introduce an "unstable" feature flag or something for this, any ideas?

It's fine to introduce those methods when they become stable. so, close the issue now.

Let's keep the issue open so we can track it.

This depends on https://github.com/rust-lang/rust/issues/76923.


Add Vitor Felix to Contributors.md

Thanks for the tutorial!

Hi  @Vitor-Felix, I'm quite elated about your pull request. I wanna evolve this project to addresses various problems faced by first-time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a pull request and learned that I merged it?
We’ve recently added social share  to our web app. Could you please go to https://roshanjossey.github.io/first-contributions/#social-share and share your first contribution to open source?
Also, check out projects with easy issues while you’re there.

I was very happy! This is a great initiative, it will help a lot of people.

I’d urge you to continue contributing to other open source projects.
We also have a slack team to help/mentor people trying to contribute to open source projects.
You can join the team by going to https://goo.gl/PM1Jdh


docs: (#3137) show 'apply yaml' either from stdin, or from file using…

… tabs
What type of PR is this?

docs: retrofits tasks to provide yaml in two forms, using tabs:  1. a command can be copy-pasted to apply directly with kubectl, and 2. show the yaml, useful for reviewing the configuration and saving to a file.

What this PR does / why we need it:
this is a convenience in the docs.  oftentimes it's really nice to be able to show yaml with code highlighting for ease of legibility, but it's also convenient to provide a kubectl apply -f command that can copy-paste directly into the shell.
Which issue(s) this PR fixes:
Fixes #3137

change applied to just one task: "http request headers".  let me know what you think and i'll start working on retrofitting all other tasks.

LGTM thanks !

i had to push a lint fix.  it looks like it might have invalidated your review?


Incorrect date handling

./phantomjs --version
2.1.1
./phantomjs
phantomjs> new Date()
"2016-01-26T22:23:40.197Z" <-- correct
phantomjs> console.log(new Date())
Wed Jan 27 2016 22:23:55 GMT+2400 <!-- invalid
Why GMT is reported as GMT+2400 ? Correct one should be +0100, but I guess in this case it still should be UTC. I'm having issues with moment library on PhantomJS because of this where moment(new Date()).format("DD.MM.YYYY") returns 27.01.2016 where it should be 26.01.2016 ...

Unfortunately, dates have numerous issues said to have been fixed. I also stumbled upon various dubious things. '10.10.2010' is a valid Date in Chrome. Not so in phantom 2.1.1 That is really annoying if you have Date validation in place!

Duplicate. Please see #11151


Design PCR results view

As a user, I want to be able to track PCR results so I have visibility into a person's full testing history.
Users want full visibility into a person's testing history (PCR and antigen tests) because it can impact what type of test they use next. For example, if someone tests positive on an antigen test, they need to get a PCR test to confirm the positive result.

Closing this as we are not planning to add PCR to SimpleReport


Event api/PanResponder

This is a long overdue PR. The main changes include addition of PanResponder (solving #5) and fixes to the Animated.Event API (#7).
There are few other fixes including:

addition of getters for Animated.ValueXY
Fixes to animated binding implementation
few new styles
The combine function in Style was fixed

Just did the quick fix myself :)


Python 3.9: AttributeError: 'HTMLParser' object has no attribute 'unescape'

unescape has been removed from Python3.9 distlib, causing the installation to fail.
More:
https://bugs.python.org/issue19688

I was just able to install with 3.9.7 via pip, can you post your install error?

Requirement already satisfied: adafruit-circuitpython-dht in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (3.7.1)
Collecting adafruit-circuitpython-scd30
  Using cached adafruit-circuitpython-scd30-2.2.2.tar.gz (30 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [35 lines of output]
      Traceback (most recent call last):
        File "/home/simonerkelens/Projects/environment-readings/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/simonerkelens/Projects/environment-readings/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/simonerkelens/Projects/environment-readings/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 124, in get_requires_for_build_wheel
          backend = _build_backend()
        File "/home/simonerkelens/Projects/environment-readings/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 89, in _build_backend
          obj = import_module(mod_path)
        File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
        File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
        File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
        File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 850, in exec_module
        File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 14, in <module>
          from setuptools.dist import Distribution, Feature
        File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
        File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
        File "/home/simonerkelens/Projects/environment-readings/venv/lib/python3.9/site-packages/_virtualenv.py", line 89, in exec_module
          old(module)
        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 24, in <module>
          from setuptools.depends import Require
        File "/usr/lib/python3/dist-packages/setuptools/depends.py", line 7, in <module>
          from .py33compat import Bytecode
        File "/usr/lib/python3/dist-packages/setuptools/py33compat.py", line 54, in <module>
          unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)
      AttributeError: 'HTMLParser' object has no attribute 'unescape'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Try upgrading pip, setuptools and distlib

Already have done so before that run posted, with no change, sadly :(


PHP requirements don't match Magento 2.4.4

Preconditions

Magento 2.4.4

Steps to reproduce

Run composer require strategery/magento2-infinitescroll

Expected result

No error is thrown
The module is installed

Actual result

The following error is thrown because of PHP <= 7.4 in the composer.json requirements while Magento 2.4.4 requires PHP >= 8.1:

Package strategery/magento2-infinitescroll has requirements incompatible with your PHP version, PHP extensions and Composer version:
    - strategery/magento2-infinitescroll 0.5.2 requires php ~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0 which does not match your installed version 8.1.1.

Hi @Axel29,
Thank you for the report!
Could you try installing the extension with  --ignore-platform-reqs flag and confirm it works?

Hi. We also need support of php 8.1 and magento 2.4.5

Hi,
I am facing the same issue
Package strategery/magento2-infinitescroll has requirements incompatible with your PHP version, PHP extensions and Composer version:                                - strategery/magento2-infinitescroll 0.5.2 requires php ~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0 which does not match your installed version 8.1.1.
Could you please update your module?
Thanks

Hi
I tried to install the extension with --ignore-platform-reqs flag.
It works fine for me.

The issue is fixed in version 0.6.0


useMappedState should have selectors as dependencies

When state is mapped to an object or array like:
const getUsers = useCallback(
    state => {
        const ids = state.userIds;
        return ids.map(id => state.userStore[id]);
    },
    []
);
const users = useMappedState(getUsers);

The returning users can be a new array instance each time this component renders, passing users to a sub component could cause a re-render even userIds and userStore are not modified.
I'd rather to provide a more reselect like API:
const getUsers = useCallback(
    (ids, userStore) => ids.map(id => userStore[id]),
    []
);
const users = useMappedState(
    getUsers,
    [state => state.userIds, state => state.userStore]
);

In which the values returned by the second argument become dependencies to a useMemo call.

I don't want to expand the scope of redux-react-hook to include selectors. Especially since not everyone uses the same selector library or the same configurations of reselect for that matter. This would be a perfect use case for a custom hook.


Error when using StoryShot: Unexpected token import

First thanks for this awesome tool!
I'm trying to setup storyshots and I'm running into issues with jest not liking a certain file in the storybook-readme node module. I tried following the same jest config posted here But i still get the same error:
● Test suite failed to run

    Jest encountered an unexpected token

    This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.

    By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".

    Here's what you can do:
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/en/configuration.html

    Details:

    /Users/<pathToProject>/node_modules/storybook-readme/styles/codeThemeCss.js:28
      import("./prismCodeThemes/".concat(codeTheme, ".css.js")).then(function (t) {
      ^^^^^^

    SyntaxError: Unexpected token import

      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
      at Object.<anonymous> (node_modules/storybook-readme/components/ReadmeContent/index.js:36:44)

jest.config.js
module.exports = {
  browser: true,
  testURL: 'http://localhost',
  transform: {
    '^.+\\.md?$': 'markdown-loader-jest',
    '^.+\\.js?$': 'babel-jest'
  },
  transformIgnorePatterns: ['/node_modules/(?!(@babel/runtime)/).*/']
};

Seems you are running old version try 5.0.3
https://github.com/tuchk4/storybook-readme/issues/134#issuecomment-488839874

🤦♂ Thanks a ton!


[Suggestions] users homebrews order and layout

Hi,
The list of homebrews doesn't seem to have any particular order (currently it's probably by ID or create_data, I presume). I would suggest ordering it by crescent alphabetic order of the Title. It would be more clean and easy to find stuff.
Also, if I may give my opinion, I'm not entirely convinced with the layout of the brews of the user. I have plaied a bit with it and I'm sending 2 suggestions. Maybe they will give some inspiration. I dont know, its just a thought.

http://screencast.com/t/b4BuIcKvat
http://screencast.com/t/NH76iD66

(the highlighted one is when you mouse over it)
Cheers!

I like your ideas. Implemented in v2.6.0


Optimization - unused tasks

Hi!
While searching for some RAM optimization/freeing, I did also some investigation on system tasks. Two things I've recognized:

Can someone explain what rtc_timer_task and pmTask are for? In trace they seem never executed. Also there is no RTC on ESP?

tftp_task for OTA update. Why is this task created on init and not when packet arrives? I think it should be possible to register a udp binding and a callback with lwip. Maybe task can be created and ram allocated on demand, or it is not needed in the end. As it is now, task is only executed once on startup and then uses RAM but is mostly never used. Is there a reason why it is done like this?

Best Regards Simon

@SaimenSays The rtc_timer_task is for the ets_timer, a high priority timer that seems to be used only for sending the beacons, so it might be possible to have it started only when beacons need to be sent. Would anyone know if the beacons need to be sent in a very accurate time slot, or might the use of the ets_timer for these be unnecessary?
The pmTask appears to be for power management. It's not clear if it could be avoided if not shutting down when idle. Might need to wait until we have some code for libpp.
The tftp server OTA does not appear very practical, but if using it on a secure network then perhaps there could be some trigger to enable it. Probably need OTA support that pulls the update from a server using http, with a signature check.

As @ourairquality explained rtc_timer_task is created in ets_timer.c
The name is really misleading. It has nothing to do with RTC. I think we don't need to preserve Espressif legacy naming and name it more sensibly.
If the timer value for sending beacons is multiple of 10 ms, than we can safely use FreeRTOS timer for it. And est_timer.c is not needed in the core.
Nevertheless I think hight precision timer might be useful. We might refactor ets_timer.c into some extra library that would provide such functionality. So, a user would include it only if it is needed.


Nightmode Styles Complete

Fixes #2065
Changes

moved nightmode class from <Layout> to <body>
changed nightmode classname from .dark to .nightmode
added a lot of <Component>-nightmode.less files
all wrapped by the body's .nightmode class
overwrote necessary CSS
imported files at bottom of related <Component>.less

Test plan

[ ] Click through aaaaall the possible views of the application with Nightmode disabled to check for unintended changes in normal styles
[ ] Go to settings and enable Nightmode
[ ] Click through aaaaall the possible views of the application to see the new nightmode, look out for things that I might have forgotten

Demo

Looks very good. Couple thoughts:

I would change colour of avatar borders.
We should change background colour on user profile: https://busy-develop-pr-2094.herokuapp.com/@hellosteem
Nightmode should be applied on the server (now it flashes white layout after page load).

We should change background colour on user profile

What exactly do you mean? It's the same background as everywhere else.

Nightmode should be applied on the server

I think I need some help with that. How can I do that?

Done!
For applying nightmode server-side... do you have any hints for me?

Thanks. I will take a look later today.

I guess somewhere here directly on the template?
https://github.com/busyorg/busy/blob/develop/templates/index.hbs#L21
But how can I access the state var... it is rendered in the script tag "nightmode": true but... well... I'll try to find out myself in the meantime.

@Sekhmet What do you think about my last commit? Works fine for me.

Hey.
What I would try to do is not to append classes to the body using document.classList and instead try to apply dark theme based on dark class on Layout. This way we won't have to modify SSR and avoid manipulating DOM directly.
Have you tried doing something similar?

I agree that the changes in Wrapper.js can now be removed: https://github.com/busyorg/busy/pull/2094/commits/e6800bc092cc0a73a7b9671bec63a08538c53ec1#diff-105a0ee4a79800ce929a0e78481a9286
But what are your concerns with this: https://github.com/busyorg/busy/pull/2094/commits/c3334f51a119dc0a47ae7ed0fcb150ad9e2cfee1

You could probably style everything using dark class on Layout instead of nightmode on body, so those changes in c3334f5 would be unnecessary.

Cmon dude...

Nightmode should be applied on the server (now it flashes white layout after page load).
That's what https://github.com/busyorg/busy/commit/c3334f51a119dc0a47ae7ed0fcb150ad9e2cfee1 does.

I removed those lines, since onMount will be replace by server-side. https://github.com/busyorg/busy/pull/2094/commits/e6800bc092cc0a73a7b9671bec63a08538c53ec1#diff-105a0ee4a79800ce929a0e78481a9286R149
But these lines are necessary to react to changing the settings option immediatly. https://github.com/busyorg/busy/pull/2094/commits/e6800bc092cc0a73a7b9671bec63a08538c53ec1#diff-105a0ee4a79800ce929a0e78481a9286R163
And it's better to apply the class to the body because it gives you more control. I first applied it to the Layout component because it seemed to be easier but also has some drawbacks.
Imho the code is now fine.

I know what c3334f5 does. I know that it solves this problem. But I'm trying to find a good solution, not any solution.
Anything that is inside of server folder should not be concerned by business logic (which nightmode is part of). It is supposed only to render app on the server. This is why I try to avoid modifying this part of code.

Then I don't know how to prevent this flashing of the white layout.

It is supposed only to render app on the server.

Does nightmode not fall in this realm?

Merge this when ready
@cc @gregory-latinier @jm90m

thanks for the PR @mktcode, everything looks fine to me.

Done!
But the back to top button looks ok for me.

I think that's not directly related to nightmode but just not visible on white background.

.BBackTop_button i {
color: #2088ff!important;
font-size: 40px;
line-height: 40px;
background-color: #fff;
border-radius: 50%;
// add this
height: 37px;
display: block;
width: 37px;
}

if I add this it does the trick for me. It reduces the white background so it's behind the icon.
Does it work for you ?

What browser etc. are you using?

Chrome on windows

Well... your CSS doesn't seem to change anything significant on my side so... if it fixes the windows side.... I'll commit! ;)

Thanks! My pleasure to contribute to the project!

@Sekhmet Can you tell when this will be deployed?


[Security Dashboard] ZAP testing - App API endpoints

I want to develop API endpoints that engage with a scheduler task to refresh vulnerability test results.
The specified endpoints include:

Traverse all namespaces to retrieve route data for synchronizing route URLs in the database.
Accept the vulnerability scan results and persist them in the database.

Junmin is waiting for service accounts to be created in Silver and Gold clusters by Ian. Estimated time for this to be completed is next week (by Jan 19).


Please invite me to the Recode-Hive GitHub Community Organization

Name
Kanishk Chhajed
Discord Username (if applicable)
kanishkchhajed
Additional Context
No response

Invitation sent to join the GitHub Organisation. Welcome to the community 🎉
Don't forget after accepting to make it public so it appears on your GitHub profile for everyone else to see. You can do this by finding your name in the GitHub organisation list and change the dropdown to public https://github.com/orgs/recodehive/people


s3exists(NULL) returns TRUE

> s3mpi::s3exists(NULL)
[1] TRUE

(wat)

Oops. Can you help fix?
On Wed, Apr 15, 2015 at 5:12 PM, Peter Hurford<EMAIL_ADDRESS>wrote:

s3mpi::s3exists(NULL)
[1] TRUE

(wat)
—
Reply to this email directly or view it on GitHub
https://github.com/robertzk/s3mpi/issues/22.

--
-Robert Krzyzanowski

https://github.com/robertzk/s3mpi/pull/23


Test with React ^16.0.0

Has anyone tried this?

It seems to be good on a personal project 👍  I am running with:
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-test-renderer": "^16.2.0",
    "react-sketchapp": "1.0.0",

The only issue I ran the script would fail to render if makeSymbol was declared within a shorthand function.
const Document = ()=>{

// this caused it to fail
const generatedSymbols = generateProductBagSymbols();
// end failure

const arraySymbols = Object.values(generatedSymbols.symbols);

  return(<Artboard name="Product Cards">

    <View name="Product Cards"  style={{padding: 48, flexDirection: 'column',flexWrap: 'wrap'}}>
    {
      arraySymbols.map((item,index)=>{
        const ProductCardSymbol = item.symbol;
        return (
          <View key={index} style={{ marginBottom: 24,flexDirection: 'column',flexWrap: 'wrap' }}>
            <ProductCardSymbol />
          </View>
          )
      })
    }
    </View>

  </Artboard>);
};

Moving it out of the Document scope resolved the issue.

Yes, I use React 16.
No Issue ! React-sketchapp Rocks.
My dependencies

"dependencies": {
    "chroma-js": "^1.3.5",
    "react": "^16.2.0",
    "react-primitives": "^0.4.4",
    "react-sketchapp": "^1.0.0",
    "react-test-renderer": "^16.2.0"
 }


lscript: tiny optimize to skip stack.Top()'s nil check

There is no need to recheck the stack.Top() whether is nil value. We had pre-check the stack's depth like the following:
 if stack.Size() < 2 {
    log.Debug("ScriptErrInvalidStackOperation")
    return errcode.New(errcode.ScriptErrInvalidStackOperation)
}
vch1 := stack.Top(-2)
if vch1 == nil {
    log.Debug("ScriptErrInvalidStackOperation")
    return errcode.New(errcode.ScriptErrInvalidStackOperation)
}
vch2 := stack.Top(-1)
if vch2 == nil {
    log.Debug("ScriptErrInvalidStackOperation")
    return errcode.New(errcode.ScriptErrInvalidStackOperation)
}

Tips: click the expand button at the github review menu which can see more contextual code 😄

@fffreedom
Yeah. Pushing nil into the stack is strange but it's okay and I'm not sure what's your meaning for nil  is typed nil or untyped nil
You can find some questions as the following code:
vch2 := stack.Top(-1)
if vch2 == nil {
    log.Debug("ScriptErrInvalidStackOperation")
    return errcode.New(errcode.ScriptErrInvalidStackOperation)
}

The vch2 cannot be untyped nil because it's always be pushed by stack.Push(xx) in lscript.go and unless you invoke it by stack.Push(nil). see below:
package main

import (
	"fmt"

	"github.com/copernet/copernicus/util"
)

func main() {
	s := util.NewStack()
	s.Push(nil)
	v := s.Top(-1)

	var t *int
	s.Push(t)
	k := s.Top(-1)

	fmt.Println(v==nil, k==nil)
}

The typed nil is not equal untyped nil .See https://golang.org/doc/faq#nil_error

And there are some other questions as the following:
func (s *Stack) Top(i int) interface{} {
	stackLen := s.Size()
	if stackLen+i > stackLen-1 || stackLen+i < 0 {
		return nil
	}
	return s.array[stackLen+i]
}

We cannot sure the nil is return via return nil or return s.array[stackLen+i]


Finished proof of braiding coherence lB=r

(Depends on #76, replaces #67.)
I don't know if it's possible to alter a PR by someone else, so I pulled @MirceaS's PR (#67) locally and created a PR based on it.
I left the original parts of the proof by @MirceaS largely unchanged but moved them in a separate module as suggested by @HuStmpHrrr.
I didn't squash the commits, but I can do so if necessary.
Please review @MirceaS and @HuStmpHrrr.

FYI, I'll give @MirceaS a couple more days to say something and, if not, I'll merge this in. Probably Monday/Tuesday next week.

(Depends on #76, replaces #67.)
I don't know if it's possible to alter a PR by someone else, so I pulled @MirceaS's PR (#67) locally and created a PR based on it.
I left the original parts of the proof by @MirceaS largely unchanged but moved them in a separate module as suggested by @HuStmpHrrr.
I didn't squash the commits, but I can do so if necessary.
Please review @MirceaS and @HuStmpHrrr.

I specifically ticked the box on my PR that allegedly enabled maintainers to edit it so I think my original PR is editable but this is also just as good. (For my future PRs feel free to edit them whenever).
As for the changes, it looks good! Thanks for finishing off the proof. I was caught up with other commitments the past week and didn't get around to it myself but I'm looking to get back into it. I was planning to at least add in the stronger non-iso prism for reasoning about regular morphisms.

I just did some substantial restructuring of the proof so that it no longer needs the hexagon lemma and I also added some explanation of how the proof works along a nice drawing so, @sstucki , if you can give me writing access to this branch of your fork, I would like to update this PR with my commit. After this I believe it should be ready to be merged.

@MirceaS: I googled a bit and I don't think I can give you write access to just this branch in my repo in an easy way. After reading your other comment, I found and ticked the "Allow edits from maintainers" box for the PR, but I suspect that's not enough. Maybe it's easier to just merge this PR and then open a new one with your changes?

@MirceaS: I googled a bit and I don't think I can give you write access to just this branch in my repo in an easy way. After reading your other comment, I found and ticked the "Allow edits from maintainers" box for the PR, but I suspect that's not enough. Maybe it's easier to just merge this PR and then open a new one with your changes?

It's a bit annoying that you can't do that in GitHub. I could just raise a new PR but that would involve a lot of git book-keeping and creating a new branch on my fork and all that... I don't suppose you could give me write access to your whole fork, could you? I promise to not push anything without consulting you first :).

I don't suppose you could give me write access to your whole fork, could you?

Done. Have fun :wink:

I don't suppose you could give me write access to your whole fork, could you?

Done. Have fun

I still seem to get Permission Denied...
remote: Permission to sstucki/agda-categories.git denied to MirceaS.
fatal: unable to access 'https://github.com/sstucki/agda-categories.git/': The requested URL returned error: 403

I think you need to accept the invitation first. You probably got an email.

I just pushed my commit.
(I swear the diagram looks better in emacs, haha)
I also made a slack channel for all the contributors to this library so that we’re not spamming so much when discussing administrative stuff like this.
I would suggest that you guys put a link to it on the README if you’re happy to use it :).
https://join.slack.com/t/agda-categories/shared_invite/enQtODE4OTQxOTQ4MzI1LTIzMWVkYzIyNjQ5YjRiYzgxYTRiMThhZGM5YWI3ZWEzYjVhY2Q4ZjViZGU5OGE2Yzk2MjVmMGY0OGFkMTQ0NTc


user12986714: Watch [a-zA-Z0-9]{0,5}.{0,1}insuranceella.com

user12986714 requests the watch of the watch_keyword [a-zA-Z0-9]{0,5}.{0,1}insuranceella\.com. See the MS search here and the Stack Exchange search here.

[a-zA-Z0-9]{0,5}.{0,1}insuranceella\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Err... Please reject. This regex is complex and incomplete...


[NETBEANS-285] Removing javahelp quick search provider

Removing javahelp quick search provider from the layer Lookup, so it won't cause CNFE

I'd rather create one which just catches the CNFE.


fixes for deprecations in MPL 3.6

this should hopefully fix our CircleCI build_docs_main failures du jour.

Failure is unrelated, thanks @drammock


Solutions for directly running rqt_* Python scripts on Windows

We are exploring the solutions in https://github.com/ros/catkin/pull/978 and this issue is meant to track the decision and apply the final solutions to the following commonly seen scripts:
rqt_shell
rqt_plot
rqt_logger_level
rqt_image_view
rqt_graph
rqt_dep
rqt_console
rqt_bag
rqt

Python wrappers are now folded into catkin so we no longer requires per repository changes. Thank @kejxu!
https://github.com/ms-iot/rqt_shell/pull/1
https://github.com/ms-iot/rqt_plot/pull/1
https://github.com/ms-iot/rqt_logger_level/pull/1
https://github.com/ms-iot/rqt_image_view/pull/1
https://github.com/ms-iot/rqt_graph/pull/1
https://github.com/ms-iot/rqt_dep/pull/1
https://github.com/ms-iot/rqt_console/pull/1
https://github.com/ms-iot/rqt_bag/pull/1
https://github.com/ms-iot/rqt/pull/3


get features for each object

Hi, thanks for you'r job!!!
There is an option to get a list of features for each object in the image?
Even features that mean nothin to humen eye, but if the features consistent with to the object.
I mean to somthing like in AlexNet that predict only one object per image, the layer at the top of the network is actually a features for the image, or in AlexNet is features of the object.
there is something similar in you network?
Thanks!

There kinda is:
For bounding boxes, mask coefficients, and class prediction, the 3x3 area of features around each pixel in the last layers of our backbone (similar to the layer at the top of AlexNet that you mentioned) becomes the features for one anchor box (so there are ~19k anchor boxes in total that if predicted as positive turn into a detection). You can find those layers in the prediction head class in yolact.py. This part is the same as any other object detector (with the mask coefficients added in a similar way).
Then YOLACT also has prototype features for masks, which you can visualize in a kind of hacky way if you follow #82.
If you haven't already, I recommend you read our paper, SSD, and RetinaNet (the original object detectors we've based our network on) to get an understanding of how the features are used.

Thanks! i will look into it!

Hi, you writed:

You can find those layers in the prediction head class in yolact.py

I can't find a class named somthing like "prediction head", i think i didn't understood you. can you explain where to find it?

OK, im not shure but i think i found it.
it's in line 530 in yolact.py --> outs = self.backbone(x) ?
outs is the matrix from the backbone?
If so, how can i found the matrix for each object?
Do i need to project each object in the original image to the last layer and "take" each pixel in the object mask in the last layer as me features?
If no, can you please explain how to do it?
Thanks!!!

Nah, you want the code in PredictionHead. Specifically:
https://github.com/dbolya/yolact/blob/f46dc4385a41ed1f2df6716ecf6084081afcbec6/yolact.py#L211
This is a size [batch_size, feature_size, conv_h, conv_w] tensor of features as the last layer before mask coefficient prediction. You can see above the same for the other branches. If you wanted to extract, say, the features for the anchors in the (1, 1) position (1 down, 1 right from the top left), you could go:
mask_x[batch, :, 0:3, 0:3]

In general, it would be:
mask_x[batch, :, y-1:y+2, x-1:x+2]

Though note that objects on the border (e.g., (0, 0)) require padding so you might want to pad it beforehand (which changes the math a little).

OK, thanks.
I guess that (conv_h, conv_w) is not equal to (img_h, img_w). am i right?
If so, should I drop the original image onto mask_x to find the features of each pixel in the original image?

It isn't the original image size, yeah. And dropping the original image onto mask_x won't exactly work either because there are 5 prediction heads, each with a different conv size. All those heads are then merged together into one long list of 19k possible detection locations, and then each is individually considered for confidence / NMS.
So if you want to see the features that fed into a particular detection, you'll have to track that detection back through NMS and that merge to get the prediction head and x,y it came from. If you're instead just wondering what the features look like (and don't care about matching features to detections), you can just map the image size onto that conv_h and conv_w though. If you're doing that, I'd also recommend doing the same for all 5 prediction heads (they get progressively smaller in conv size, so there might be some interesting patterns).
If you haven't already, I really do recommend you read the SSD paper I linked above. It explains all of this in detail (since it was the one to popularize this multiple prediction head approach).

Since this has been open so long, I'm going to close it. Feel free to reopen if you have any updates.

It isn't the original image size, yeah. And dropping the original image onto mask_x won't exactly work either because there are 5 prediction heads, each with a different conv size. All those heads are then merged together into one long list of 19k possible detection locations, and then each is individually considered for confidence / NMS.
So if you want to see the features that fed into a particular detection, you'll have to track that detection back through NMS and that merge to get the prediction head and x,y it came from. If you're instead just wondering what the features look like (and don't care about matching features to detections), you can just map the image size onto that conv_h and conv_w though. If you're doing that, I'd also recommend doing the same for all 5 prediction heads (they get progressively smaller in conv size, so there might be some interesting patterns).
If you haven't already, I really do recommend you read the SSD paper I linked above. It explains all of this in detail (since it was the one to popularize this multiple prediction head approach).

Dear dbolya,
first of all congrats for your great work and code. I am interested in identifying the features for the specific detected objects. The following is what I have done: I have the segmentation masks for each objects at the original image resolution; I resize the masks to the spatial features dimensions (e.g. 69x69 if I consider the first feature head); I take the corresponding features at the 1s location of the mask; I finally average the features at those locations to get a feature vector of 256 dimensions. Does this procedure make sense to you? Are those features the real ones associated to the detected objects? I could probably also do the same for the other 4 heads to get an improved representation.
Thanks a lot!