Change Tomcat Valve to servlet Filter

GitHub Issue: https://github.com/Islandora-CLAW/CLAW/issues/736
Depends on: https://github.com/Islandora-CLAW/islandora/pull/73
Depends on: https://github.com/Islandora-CLAW/Crayfish-Commons/pull/15
What does this Pull Request do?

Converts the Tomcat Valve to a Filter
Replaces the XML configuration with a YAML one.
Changes some of the JWT claims to use standard ones.
Makes the SettingsParser parse the config only once and then supply the 3 maps from the internal Config object.

What's new?

The servletfilter will fail to initialize if it can't access it's settings file or the settings file is invalid.

In theory this filter should work on non-Tomcat container, but I haven't tried that.

The claim changes are

id -> webid
name -> sub
url -> iss

Does this change require documentation to be updated? Documentation has been updated

Does this change add any new dependencies? no

Does this change require any other modifications to be made to the repository (ie. Regeneration activity, etc.)?

Could this change impact execution of existing code?

How should this be tested?
There is no easy way to test this, it will require uninstalling Islandora. But this should hopefully work.

Make sure you have a current version of master from claw-playbook.
Delete your roles/external directory if it exists.
Download this patch to the main claw-playbook directory and apply with git patch <patchfile>.
Run ansible-galaxy install --role-file=requirements.yml --roles-path=roles/external
Now for some manual editing in roles/external/Islandora-Devops.fcrepo-syn

defaults/main.yml change fcrepo_syn_version: 0.1.0 to fcrepo_syn_version: 0.1.1
tasks/install.yml change url: https://github.com/Islandora-CLAW/Syn/releases/download/v{{ fcrepo_syn_version }}/islandora-syn-{{ fcrepo_syn_version }}-all.jar to url: https://github.com/whikloj/Syn/releases/download/v{{ fcrepo_syn_version }}/islandora-syn-{{ fcrepo_syn_version }}-all.jar

Run vagrant up
Once the VM is up and running, log in vagrant ssh
Download and run this script.
When it tells you its ready for testing. Then please test.

You should be able to create a collection or image in Drupal and have it sync to Fedora.
But you should not be able to PUT/POST to fedora without a valid JWT or token. Like
ubuntu@claw:~$ curl -i -XPUT http://localhost:8080/fcrepo/rest/breaking
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1068
Date: Tue, 23 Jan 2018 16:51:21 GMT

<!DOCTYPE html><title>Apache Tomcat/8.0.32 (Ubuntu) - Error report</title>
HTTP Status 401 - Token authentication failed.

type Status report

message Token authentication failed.

description This request requires HTTP authentication.

Apache Tomcat/8.0.32 (Ubuntu)

Additional Notes:
Any additional information that you think would be helpful when reviewing this PR.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora-CLAW/committers

@Natkeeran this is ready when ever you are.

@whikloj
While trying to do the setup to test this, on Step 8, I get the following:
Username for 'https://github.com': Natkeeran
Password for<EMAIL_ADDRESS>
remote: Repository not found.
fatal: repository 'https://github.com/whikloj/islandora-1.git/' not found
error: pathspec 'whikloj/issue-736' did not match any file(s) known to git.

@Natkeeran sorry I was cleaning up for Islandora 7.x-1.x stuff and I deleted my repository. We should probably stop making repos with the name of the whole stack. Anyways I recreated it, so you should be good to go.

@whikloj
I followed the test instructions, still able to PUT without authorization.  Since this PR is dependent on two others, I assume those two have to go in first before this can be tested.

@whikloj
I followed your steps.  But, I am still able to put without the token.
 curl -i -XPUT http://localhost:8080/fcrepo/rest/breaking
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
ETag: W/"8d19d54852223328f4cf9fff4b394c758cb16863"
Last-Modified: Mon, 02 Apr 2018 14:41:07 GMT
Location: http://localhost:8080/fcrepo/rest/breaking
Content-Type: text/plain
Content-Length: 42
Date: Mon, 02 Apr 2018 14:41:07 GMT

Are there specific things I can check to make sure I have your changes?

I'll try this again and see if I can see what is happening.

@Natkeeran Can you give this another shot?  If you don't think you'll have the time, let me know and I'll see if someone else can hop on it.  This has popped back up in https://github.com/Islandora-CLAW/CLAW/issues/966.

@dannylamb @Natkeeran I'll try to get this rebased quickly

@whikloj I can test when this is ready.

Crayfish doesn't seem to survive the script in the testing instructions, which is back from when we didn't use features.  I'm going to be smart next time and make a snapshot before running the script :man_facepalming:  I should just be able to strip out most of it and get it working.

@whikloj Success!    Everything wound up in Gemini.
mysql> select * from Gemini;
+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------+---------------------+
| fedora_hash                                                                                | drupal_hash                                                                                | uuid                                 | drupal_uri                                                                                | fedora_uri                                                                          | dateCreated         | dateUpdated         |
+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------+---------------------+
| 398a2e1c7f6121ffd18a1b5d25fefa134882281ea03bab177a0da342d5f1406fb2cef5d53858ddc4c7790ab7c3c825d186a533c4442e8741605066a941916576 | c792276ca856e53356f65cd8372f1ade6acfaba0da47004db00e5ebf40c482d6bd0130a7b82c6ebb7dd929d02bfa8c9eb41a91546afff509304db80dc5c31ddf | 1d88ce00-7eb3-48b4-bc4a-12b61c2da73a | http://localhost:8000/_flysystem/fedora/2018-11/animal-blurred-background-cat-1521305.jpg | http://localhost:8080/fcrepo/rest/2018-11/animal-blurred-background-cat-1521305.jpg | 2018-11-21 11:35:16 | 2018-11-21 11:35:16 |
| 3fab6c2f7946039b738ce3a2499158068c601e1c6280d44254c9fe476e4ebafda11c30edb472a1afd997b0de5c6784f1281d5641ce4e52c718bc4748c1483a9d | 88e848e9c1c047924e469c5e81f6b23c263a60c1309033c549cd7fd152bfd5996ab498d4ebdd192b749e4659dc335b6745d0c715d19e1a9e2a0f7b6650596891 | 3f2d95ea-a672-4ff7-9dc9-dc6665b3553d | http://localhost:8000/media/2?_format=jsonld                                              | http://localhost:8080/fcrepo/rest/3f/2d/95/ea/3f2d95ea-a672-4ff7-9dc9-dc6665b3553d  | 2018-11-21 11:35:29 | 2018-11-21 11:35:29 |
| b6a0c584eca4d755615a4121e4074ad47c867f6beabb5bd581aee30dcd2134c51ad7fa54f03720d3fc9f5c8363781ab92b8a55fb3ec7a325ff82152dbf18eb9b | fd48cd549436ffe733c96db6c990e780b602d036d8ebecfc95dcbbaaa0ae63bc5b2a9c1e51194b294dbffa8d1ee258cd95cace5dc125e5482aa12bc58c91468c | 5fca55ea-6060-400d-b7c8-10812c4ffa9c | http://localhost:8000/media/3?_format=jsonld                                              | http://localhost:8080/fcrepo/rest/5f/ca/55/ea/5fca55ea-6060-400d-b7c8-10812c4ffa9c  | 2018-11-21 11:35:31 | 2018-11-21 11:35:31 |
| 360e3c746aa4144cb24e2b968a9b136f0713e373549b74b0b704ef529c4f1cf023f5cb180b1271f230a08b5a7c29aa9986621a94e27f05592850cd9d286fc886 | 9e3a4d05bd0bbd6d558bffe43759511425096412ef0ba523201a82b2a0fbf934ecb84d011d01f3866187387135f567b9e82e0dd19bb2ae35407e17814fbe771a | e0d24dd0-45f6-4f74-97a7-9cc3c23ab83e | http://localhost:8000/node/1?_format=jsonld                                               | http://localhost:8080/fcrepo/rest/e0/d2/4d/d0/e0d24dd0-45f6-4f74-97a7-9cc3c23ab83e  | 2018-11-21 11:34:41 | 2018-11-21 11:34:41 |
+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------+---------------------+

Then I confirmed I can't write as anonymous
vagrant@claw:~$ curl -i -XPUT http://localhost:8080/fcrepo/rest/breaking
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1068
Date: Wed, 21 Nov 2018 17:38:55 GMT

<!DOCTYPE html><title>Apache Tomcat/8.0.32 (Ubuntu) - Error report</title>
HTTP Status 401 - Token authentication failed.

type Status report

message Token authentication failed.

description This request requires HTTP authentication.

Apache Tomcat/8.0.32 (Ubuntu)

But can when authenticated
vagrant@claw:~$ curl -i -XPUT -H "Authorization: Bearer islandora" http://localhost:8080/fcrepo/rest/nonbreaking
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
ETag: W/"df48a41106b5c2710de69b35616c42a5ce257122"
Last-Modified: Wed, 21 Nov 2018 17:39:23 GMT
Location: http://localhost:8080/fcrepo/rest/nonbreaking
Content-Type: text/plain
Content-Length: 45
Date: Wed, 21 Nov 2018 17:39:23 GMT

http://localhost:8080/fcrepo/rest/nonbreaking


API health endpoint and solution monitoring

Description
As a TRE Administrator, I want to know the status of my TRE solution so that I can address potential issues with its components.
As an App Gateway, I want to know if the API is healthy so that I can forward it requests.
The current use of the API health endpoint to do both is causing issues and we need to figure out what requirements are important for us and how to address them.
Acceptance criteria
TBD

My preference:
We need a "system health" - which provides full system health as at present. It is important this does not always return 200 so can be used by external monitoring systems. However I do think we need to auth on this endpoint as is there not a risk of DDoS on downstream services.
Then for the app gateway API health probe we should probe a basic "api health" endpoint. Be that a simple ping, or actually includes cosmos health too is open to discussion.

This sounds like we just need to move back to 2 health endpoints:

"api-health": ping response, used solely for APPGW health probe
"!system-health": query of services, return 503 if any are down

Could even tidy the routing such /api/health/ping and /api/health/status
Think that covers it?

If Application Gateway probes a simple ping endpoint, it has little value (IMO) since the only thing it "saves" the external party is getting a timeout when the API application is actually down. All other malfunction cases aren't covered.
IMO, the API isn't operational if it doesn't have access to Cosmos or Service Bus so this might be a case to have Application Gateway return a 503.
The RP is just an FYI as it doesn't impact the ability to do "online" interaction with the system (although no changes could probably be made).
I don't understand the notion of an api exposing the whole health of the system. If this is meant for a developer / admin then it's not something I'd have liked to use... If an external system wants to know the full state of the system then maybe we should provide that by other means (azure metrics, app insights, etc.)

I'm probably wrong but I thought the point of the health probe was to stop app gateway forwarding requests to bad nodes, in the case that the API app service is on more than one node - which it presumably would be in a prod scenario? If that's the case I think there probably is a value in it.
The cosmos and service bus calls are synchronous, so will return 503 to the user if those calls fail - so I don't think we want app gateway getting in the way there to shut down the API?
I agree in terms of system health - I can see a simple endpoint would be useful for a dashboard but really we must want some 'real' monitoring too - maybe this is down the line?

From: Tamir Kamara @.>
Sent: Monday, April 11, 2022 5:53:59 PM
To: microsoft/AzureTRE @.>
Cc: David Moore @.>; Comment @.>
Subject: Re: [microsoft/AzureTRE] API health endpoint and solution monitoring (Issue #1673)

If Application Gateway probes a simple ping endpoint, it has little value (IMO) since the only thing it "saves" the external party is getting a timeout when the API application is actually down. All other malfunction cases aren't covered.
IMO, the API isn't operational if it doesn't have access to Cosmos or Service Bus so this might be a case to have Application Gateway return a 503.
The RP is just an FYI as it doesn't impact the ability to do "online" interaction with the system (although no changes could probably be made).
I don't understand the notion of an api exposing the whole health of the system. If this is meant for a developer / admin then it's not something I'd have liked to use... If an external system wants to know the full state of the system then maybe we should provide that by other means (azure metrics, app insights, etc.)

—
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FAzureTRE%2Fissues%2F1673%23issuecomment-1095299625&data=05|01|Moore.David%40microsoft.com|8341cd904ddf4212596c08da1bdbe037|72f988bf86f141af91ab2d7cd011db47|1|0|637852928435207533|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=UIrugglGrez%2FgIW8Rcjo5ig2bJdsZg3x6K71NZuB7TM%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIQK5HJP5263DGNG5CHQLK3VERKKPANCNFSM5TAP3PTA&data=05|01|Moore.David%40microsoft.com|8341cd904ddf4212596c08da1bdbe037|72f988bf86f141af91ab2d7cd011db47|1|0|637852928435207533|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=A46dN%2FLCcq1t4ARxWeMmP6sueYZ3aMxCL%2FfLh3WeYMw%3D&reserved=0.
You are receiving this because you commented.Message ID: @.***>

Could we add a requirement so you could GET on api/version and return the version of the API and/or any downstream systems (Cosmos, RP, Core)


Add .gitignore

Ignoring haskell build files.
Duplicate of #54, but this time it's on its own branch (whoops)

Duplicated in #62


Writing Readme about maintenance

When users want to use their own data, there are a few steps for re-deploying app, such as modifying config files , need to improve the readme to address this.

this is done in https://github.com/InstituteforDiseaseModeling/PACE-HRH-UI/blob/main/Configuration.md


add synthetic cluster-wide host support to ops-zagg-client

also add synthetic host metadata to zagg_client.yaml
Example registering and sending synthetic host data:
ops-zagg-client --send-heartbeat --synthetic
ops-zagg-client --synthetic -k heartbeat.ping -o 1

:+1: (x2!) #908 in stg


pass error

keep the UI classes unchanged

https://www.google.co.uk/search?q=dash%3AXcxjrkwwNayx51pujr8SYyvmci5qXeBctg%3Famount%3D100000%26currency%3DUSD%26local%3D9562360.00&ie=UTF-8&oe=UTF-8&hl=en-gb&client=safari


Update github.com/Microsoft/go-rustaudit to have correct capitalization

fixes #2026

I'm not certain I see the reason for this change, see https://github.com/anchore/syft/issues/2026#issuecomment-1690518945

Closing this PR now as we cannot reproduce the issue on our end and have validated that the casing for this is correct at the moment - https://github.com/anchore/syft/issues/2026#issuecomment-1690518945


x/build: all darwin builders are missing

# "macs" status: MacStadium Mac VMs
# Notes: https://github.com/golang/build/tree/master/env/darwin/macstadium
Warn: macstadium_host01a missing, not seen for 2h25m12s
Warn: macstadium_host01b missing, not seen for 2h56m50s
Warn: macstadium_host02a missing, not seen for 2h57m1s
Warn: macstadium_host02b missing, not seen for 2h57m2s
Warn: macstadium_host03a missing, not seen for 2h56m53s
Warn: macstadium_host03b missing, not seen for 2h32m5s
Warn: macstadium_host04a missing, not seen for 2h56m52s
Warn: macstadium_host04b missing, not seen for 2h57m2s
Warn: macstadium_host05a missing, not seen for 2h36m27s
Warn: macstadium_host05b missing, not seen for 2h57m1s
Warn: macstadium_host06a missing, not seen for 2h32m2s
Warn: macstadium_host06b missing, not seen for 2h57m1s
Warn: macstadium_host07a missing, not seen for 2h56m56s
Warn: macstadium_host07b missing, not seen for 3h3m55s
Warn: macstadium_host08a missing, not seen for 2h56m51s
Warn: macstadium_host08b missing, not seen for 2h41m2s
Warn: macstadium_host09a missing, not seen for 2h56m49s
Warn: macstadium_host09b missing, not seen for 2h56m48s
Warn: macstadium_host10a missing, not seen for 3h11m1s
Warn: macstadium_host10b missing, not seen for 2h56m54s
Error: 20 machines missing, 100% of capacity
Error: makemac daemon: failed to fetch status: Get http://macstadiumd.golang.org:8713: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

/cc @andybons @dmitshur @toothrot

MacStadium's status page is reporting a CenturyLink/Level 3 outage.

The builders are back. I will keep this open until the MacStadium status changes.

MacStadium's status page is reporting a CenturyLink/Level 3 outage.

From https://news.ycombinator.com/item?id=24323521, the latest update is "We are able to confirm that all services impacted by today’s IP outage have been restored. We understand how important these services are to our customers, and we sincerely apologize for the impact this outage caused."


opencv2/core/version.hpp: No such file or directory

OS Platform and Distribution
Linux4Tegra, based on Ubuntu 18.04
Compiler version
gcc / g++ 8
Programming Language and version
Python 3.6.9
Installed using virtualenv? pip? Conda?(if python)
No response
MediaPipe version
0.8.9
Bazel version
4.2.1
XCode and Tulsi versions (if iOS)
No response
Android SDK and NDK versions (if android)
No response
Android AAR (if android)
None
OpenCV version (if running on desktop)
4.5.0 - Build
Describe the problem
I'm trying to build MediaPipe frombazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu
Complete Logs
jv@jv-desktop:~/mediapipe-0.8.9$ bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'com_google_benchmark' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'xctestrunner' because it already exists.
DEBUG: /home/jv/.cache/bazel/_bazel_jv/60c21662ba14e54423ed5cde1c698284/external/org_tensorflow/third_party/repo.bzl:122:14:
Warning: skipping import of repository 'pybind11' because it already exists.
WARNING: /home/jv/mediapipe-0.8.9/mediapipe/framework/tool/BUILD:182:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: /home/jv/mediapipe-0.8.9/mediapipe/framework/BUILD:54:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
INFO: Analyzed target //mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu (70 packages loaded, 5287 targets configured).
INFO: Found 1 target...
ERROR: /home/jv/mediapipe-0.8.9/mediapipe/framework/formats/BUILD:178:11: Compiling mediapipe/framework/formats/image_frame_opencv.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 61 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from ./mediapipe/framework/formats/image_frame_opencv.h:20,
from mediapipe/framework/formats/image_frame_opencv.cc:15:
./mediapipe/framework/port/opencv_core_inc.h:18:10: fatal error: opencv2/core/version.hpp: No such file or directory
#include <opencv2/core/version.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Target //mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1876,709s, Critical Path: 1216,06s
INFO: 1383 processes: 293 internal, 1090 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

I'm attempting to build MediaPipe from source using Bazel on the Jetson Nano, and I'm following the tutorial provided by @AndreV84 (https://github.com/AndreV84/mediapipe).
here are the full steps I've done so far:

editing file WORKSPACES in the mediapipe folder:

new_local_repository(
name = "linux_opencv",
build_file = "@//third_party:opencv_linux.BUILD",
path = "/usr",
)

editing opencv_linux.BUILD file in the third_party folder in the mediapipe folder:

cc_library(
name = "opencv",
hdrs = glob([
"include/opencv2/**/.h",
]),
includes = [
"include",
],
linkopts = [
"/lib/aarch64-linux-gnu/libopencv_core.so",
"/lib/aarch64-linux-gnu/libopencv_calib3d.so",
"/lib/aarch64-linux-gnu/libopencv_features2d.so",
"/lib/aarch64-linux-gnu/libopencv_highgui.so",
"/lib/aarch64-linux-gnu/libopencv_imgcodecs.so",
"/lib/aarch64-linux-gnu/libopencv_imgproc.so",
"/lib/aarch64-linux-gnu/libopencv_video.so",
"/lib/aarch64-linux-gnu/libopencv_videoio.so",
],
visibility = ["//visibility:public"],
)
I've built OpenCV 4.5.0 following this tutorial: https://qengineering.eu/install-opencv-on-jetson-nano.html.
I'm encountering an issue identifying "version.hpp". I found this file in two locations: /home/jv/opencv/modules/core/include/opencv2 and /home/jv/opencv/modules/dnn/include/opencv2.
The folder containing opencv.hpp is /home/jv/opencv/include/opencv2, and the path to the ".so" libraries is /usr/lib/aarch64-linux-gnu.
I've reviewed issues #603, #656, #666, and #764 on the MediaPipe repository, but I haven't been able to resolve my problem.

Do you know why the headers aren't located in /usr/include/ somewhere? The locations you list (/home/jv/opencv etc) look more like the repository for opencv rather than where opencv was installed. On my system opencv2/core/version.hpp is located in /usr/include/opencv4/opencv2/core/version.hpp. But I'm obviously on a slightly different platform and I installed opencv via APT rather than build.

Hi @stephematician!
Thanks for your quick reply.
I'm sorry for any mistakes; I'm just starting programming now.
After reading your message, I think I might have taken the wrong location. I searched for /usr/include/opencv4/opencv2/core/version.hpp and found it on my Jetson Nano.
Now, where can I use this location?

Hi @stephematician! ...I'm sorry for any mistakes; I'm just starting programming now.

@VieiraJardel No worries. I'm a mathematician, not a programmer (I'm not even a googler), learning this stuff is hard work! Good luck with the nano

It is better to use installation method using Dockerfile.
To fix the issue, complete these steps before make a build:

add to the end of Dockerfile line:
RUN ln -s /usr/include/opencv4/opencv2/ /usr/include/opencv2 && apt-install libopencv-contrib-dev

uncomment opencv2 in hdrs and includes section in file "mediapipe/third_party/opencv_linux.BUILD" like this:

hdrs = glob([
    "include/opencv4/opencv2/**/*.h*",
]),
includes = [
    "include/opencv4/",
    "include/opencv2/",
],


fix(ui): Use proper URL fragments ("#tab=…", not "#tab%3D…")

Kind: bugfix (workaround)

Close #539

Description
Fix #539 while the upstream patch https://github.com/ocsigen/js_of_ocaml/pull/1497 is not used.

Make sure the PR has a milestone.
Assign yourself before merging.
[ ] Either do a regular merge:

for PRs containing several commits following conventional-commits,
or for PRs containing 1 commit shared with a later PR (to preserve the SHA1)

[ ] Or do a squash-merge:

for PRs containing only 1 commit (not shared with a later PR),
or for PRs containing several commits that need not be kept in the history;
→ Update the commit message header with a conventional-commit type,
→ Add a footer Close #… if a related issue exists.

LGTM.


Merge changes needed for Gnat 12.1.1

This PR covers changes to the library, build and performance tests needed to compiler with FSF GNAT 12.1.1 (from the Alire repository) on both MacOS and Linux.

Hopefully no diffs are required but just to let you know that Gnat 13.2 landed in Alire last week.

I just did a build and test with GNAT 13.2.0 on x86_64 Linux, and all good.


Multiplayer

wait, wat

@ForNeVeR http://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Processes.html

@rexim if you're planning writing dedicated server for this, I'd suggest use of common lisp for this task.

@ForNeVeR, awesome idea! Thanks!

In the comments of #108 was suggested to use Emacs Lisp for server side stuff via its Batch Mode. I think it's the best option for the multiplayer feature because we could easily reuse most of the our client code on the server side.

Well, that is really interesting idea.


Adds functionality to get kafka config from env

Copied from gcn-classic-to-kafka

The type annotations have to be changed so that the tests pass on Python 3.7 and 3.8.


How to clean host_regex dropdown menu

Hi,
I have open-nti installed as per procedure http://open-nti.readthedocs.io/en/latest/install.html
I'm trying to delete hostnames/devices from the host_regex dropdown menu in Grafana:
~/open-nti/data/hosts.yaml file is now empty.
I deleted the influx DB via CLI...

:~/open-nti$ sudo make cli
docker exec -i -t opennti_con /bin/bash
root@a7bd80d8e60b:/# for i in $(influx -database=juniper -execute="SHOW MEASUREMENTS" | grep ptx)
root@a7bd80d8e60b:/# do
root@a7bd80d8e60b:/# noterminal=$(influx -database=influxdb -execute="drop measurement "$i"")
root@a7bd80d8e60b:/# echo "$i = $?"
root@a7bd80d8e60b:/# done

... also tried to delete from InfluxDB , port 8083 using the DROP MEASUREMENT procedure (https://docs.influxdata.com/influxdb/v0.13/query_language/database_management/#delete-measurements-with-drop-measurement), and reboot the entire VM.
The hostnames I initially had into the ~/open-nti/data/hosts.yaml file won't disappear from the host_regex dropdown menu.
Please advice on how to clean this up.
Thanks,
Carlos

Hi Carlos,
The hosts dropdown takes the information from influxdb, and depending of how is your dashboard configured, that list is updated each time the dashboard is reloaded, or it could even never being refreshed.
If you already delete all measurements from influxdb, and the dropdown lists is still there, please try to go through the grafana dashboard settings -> templating -> edit the host_regex variable -> select update.
Let me know if this works for you
Regards
Efrain

Checking your database the query for SHOW TAG VALUES WITH KEY = "device" returns some values coming from "open-nti-stats" measurement, so after removing that measurement from your database with  DROP MEASUREMENT "open-nti-stats", the host_regex dropdown is empty.


__dirname in schema + typegen paths not settable in lambda environments

I have set up Nexus Prisma in a Zeit Now environment which I am running locally using now dev.
This creates a local lambda running in the /private/var folder.  Unforutnately, __dirname points to this folder and not my local project folder when it is executed inside of the lambda.
This makes my typegen and schema inaccessable to my local project folder.  The only workaround I have found to run a separate ts-node process to generate a new typegen + schema every time I update my code.
I believe this may be the cause of https://github.com/prisma-labs/nexus-prisma/issues/382 as well.

Moved to the Nexus epo:
https://github.com/prisma-labs/nexus/issues/270


Bulk operation doesn't raise an exception as a mongod instance would.

This code is wrong, i don't neet to set the _id again in the update document:
bulk = col.initialize_unordered_bulk_op()
bulk.find({"_id": {"a": 1, "b": 2}}).upsert().update({"$set": {"field": "value", "_id": {"a": 1, "b": 2}}
bulk.execute()

Mongomock doesn't complain about it, and does as it is requested. However, a real mongod instance throws this:
{'writeErrors': [{'index': 0, 'code': 66, 'errmsg': "Performing an update on the path '_id' would modify the immutable field '_id'", 'op': SON([('q', {'_id': {'a': 1, 'b': 2}})

This isn't really a big deal, but it will make mongomock closer to the original.

Hi @thestick613 , thanks for reporting. It's a bug indeed and mongomock should yell early on, otherwise it keeps its store in an inconsistant state.

Actually your code revealed a bug (that you can change the ID). I'm not sure I'll be able to detect the problem when you're trying to set the ID by the same value. MongoDB is complaining probably because your two dicts don't have the keys in the same order (order of keys in dict is not stable).

I think I'm only going to fix the bug where you want to change the ID and I can detect that it's a different value. In your example, it's not obvious why MongoDB detects a different value.


Interfering with Jetpack Activation.

On a new site i activated slack-wordpress first and then i tried to activate jetpack but every time jetpack returned me to my site it took me to the slack-wordpress settings instead. De-activating slack-wordpress allowed me to activate jetpack.

@wormeyman Thank you for report. Bug solved in v1.6.1 you can download it from here. Or wait for WordPress.org release.


Consider auto-excluding files matched by gitignore files

Patterns would need to be read from:

.gitignore file in the same directory as the path, or in any parent directory (the latter allows tools to put a .gitignore file with * in the directory they create to auto-exclude themselves)
patterns read from $GIT_DIR/info/exclude (allows user-specific patterns for a specific repository)
patterns read from the file specified by Git's configuration variable core.excludesFile (allows global user-specific patterns, I personally use this one)

Reference: https://git-scm.com/docs/gitignore
This might come at a performance cost but it definitely would be a useful feature.

Hi! I thought using ignore crate instead of walkdir+gitignore can be an option. The crate is used inside very popular and performant tools such as ripgrep and fd so we can expect reliability and performance at the same time. It also allow us to choose UNLICENSE so you will have no license conflicts. Could you consider using it?

+1 for this.
As for using the ignore crate, IMO it should work generally, but be aware that it's not 100% compatible with git ignore, see https://github.com/PyO3/maturin/issues/885#issuecomment-1112108447

I like that the ignore crate has all of the functionality I described in the issue description built-in - it supports .gitignore files at all directory levels of the repository, supports .git/info/exclude, and supports global gitignore!

There are many rules that influence whether a particular file or directory is skipped by this iterator. Those rules are documented here. Note that the rules assume a default configuration.
[...]

Second, ignore files are checked. Ignore files currently only come from git ignore files (.gitignore, .git/info/exclude and the configured global gitignore file), plain .ignore files, which have the same format as gitignore files, or explicitly added ignore files. The precedence order is: .ignore, .gitignore, .git/info/exclude, global gitignore and finally explicitly added ignore files. Note that precedence between different types of ignore files is not impacted by the directory hierarchy; any .ignore file overrides all .gitignore files. Within each precedence level, more nested ignore files have a higher precedence than less nested ignore files.
[...]

https://docs.rs/ignore/latest/ignore/struct.WalkBuilder.html#ignore-rules
(reading of .ignore files can be disabled separately from the other functionality in case it's something you don't want)

Definitely happy to support this! I just haven't personally prioritized the work since most exclusions are doable with the current configuration settings, even if less convenient. But we should do it.

Personally I'm mostly missing a way to ignore files only on my system, in projects where I don't have significant enough stake to change the exclusions they've set up. At best I could maybe make alias ruff to ruff --extend-exclude files,folders or something like that but that probably overrides the configuration from the pyproject.toml so it wouldn't really work universally across all projects. Meanwhile with ignore files I can either put a file/directory in global gitignore, make sure that there's .gitignore with * in a directory I want to ignore, or I can put a file/directory in .git/info/exclude.

Just a slight bump on this, we've had some issues sneak in with the pyproject.toml and .gitignore lists getting out of sync which caused us to accidentally lint a GB or so of third party code, would be convenient if those automatically sync'd.

(I still want to explore this, and do so via the ignore crate. Just need to find time.)

I'll give this a try (but my newborn just came home today so bear with me :))

@charliermarsh 1.  We're not blocked on this by any means so take care of yourself!

@jhallard - Thank you so much! I just couldn't help but share :)

This is going out in the next release: https://github.com/charliermarsh/ruff/pull/1234.
The behavior is documented in the README (and in BREAKING_CHANGES.md), and there's an opt-out setting (respect-gitignore = false).


fix(auth:basic): Basic auth exception handling improvement

Currently passing an invalid Basic auth header (random string base64 encoded) would result in an exception being raised due to a username, password = auth_header.split().
Similary passing a Digest authentication type would result in an exception as there is no :.
Thirdly passing invalid base64 encoded UTF-8 code sequences would result in exceptions as this issue (#1424).
I added code to check explicitly that we are doing basic authentication then by checking the number of entries returned by the split.
I also added exception handling for invalid UTF-8 code sequence exceptions.
Tested with a fuzzer.
Tested with valid and invalid credentials.
This fixes #1424.

@AzorianMatt can you review and merge? :)

@nkukard I sure will! I should have some time tomorrow hopefully to circle back and work on reviews. Thank you for your work on this!


Adding issues, wiki page to the organisation

This is a feature request.
I think it would be nice to have an issue page as same as repositories have, but for the whole organization. Now I need to split one product issue between several repositories because the feature must be partially developed in many of repositories, not only one. This is not really convenient and useful. Also, it would be nice if an organization had milestones as well. Or just the same issues page as repositories do.
I propose either to create a "product" type of thing which has all of that or add all of this to the "organization" type.

the feature must be partially developed in many of repositories, not only one.

Same situation here, another solution would be to keep issues at the repository level, but add a dashboard to organizations, that shows all issues for repositories inside the organization (this is what Gitlab does).
Organization-level milestones would be really nice though.

It would also be nice to have projects for the whole organization


Update cassandra config and marathon.json to use cluster name to build zk URL unless zk url is specified.

@jsancio please review and merge


JSC block syntax for global functions is not supported

Are you still around and open to pull requests?
I've added support for block-based function assignments.
I've also fixed issue #2 by simply adding an array to JSContext that holds all objects (and made sure they're getting released when JSContext is released). Crude but works with the least amount of change to the otherwise well-working code.

I’m generally not working on it myself due to my current employment contract. But, yes, I am around and happy to accept PRs!

Okay, hope you like my changes. (This workings of your code are quite impressive, BTW).


Support paging of stack frames

Currently we show only a fixed number (20) of frames of a stack trace.
We should improve this in the following way:

in the CALLSTACK view show a 'more' affordance at the bottom of the stack trace if there are more frames available than the PAGESIZE specifies.
pressing 'more' loads another PAGESIZE frames.
if there are no frames available no 'more' affordance is shown.
the PAGESIZE value can be configured in the debug settings.

@isidorn I've added paging support to the debug protocol, vscode and node-debug.

@isidorn backward compatibility: if StackTraceResponse has no totalFrames attribute, fall back to old semantics, that is do not show 'more' button.

@weinand check it out and let me know what you think.
I will also create a test plan item for this.

@isidorn I suggest to show the 'Load more stack frames...' in italic to make it look different than normal frames.

Is there a cost to loading the additional stack frames? If not, I wondered if it might be worth loading the additional stack frames automatically when the user scrolls to the bottom of the call stack?
If there is a cost I would do a little clean up:

Remove the '...' as this is used to indicate that a dialog or more information will be requested upon clicking.
Consider one or more of the following
2a. Centre the text to make it even clearer that it is not a frame.
2b. Add a highlight on hover that differs from the list and that only spans the text, not the full width of the control
Don't allow the text to be selected the same way that a frame can be selected - I noticed that when the stack frame contains two pages worth of stack frames that the 'Load more stack frames' button is selected when viewing the second page (i.e., I clicked the button twice in succession after loading two pages worth of stack frames).

@stevencl thanks, these are great suggestions.
Loading stack frames might be expensive. It depends on the debug adapter, so we don't really know in the frontend.

@stevencl great suggestions, thanks!
@weinand @stevencl I was also thinking of loading more stack frames once the user scrolls all the way down (similar to how Joao is loading more extensions on scroll down in quick open). As Andre pointed out we do not know how expensive this operation can be. But let me know your preference if I should try to load more on scroll down or go with the current solution + Steven's suggestions

@isidorn @weinand Assuming that automatically loading the additional stack frames doesn't freeze the UI, I think it would be worth trying.

@isidorn Because loading those frames is expensive we would have to make sure not to load more than the 20 frames initially (even if more than these 20 would fit into the view). So only scrolling should trigger loading more.
But the user experience for this would be strange: the view shows 20 but there is already room for more. But why would the user then start scrolling in this situation?

@weinand yes I agree the solution is not so nice in that case. We would always have to load as much as the view can show to make the user experience nice. However since this operation is expensive I would go with the explicti load more action as we have it today + polish from Steven.

Good point @weinand I didn't think of that. It makes more sense then to go with the load more button at the bottom of the list.

@isidorn lets go with the "more action" for now.
Here is more detail about the underlying node.js problem: dependent on what version of node the user is running, it actually could make node.js totally unresponsive because node.js tries to move tons of datastructures over the wire in an uncontrollable way. For newver version of node, VS Code is able to inject code that prevents this, but in older versions it cannot. In this case the UI would not freeze, but the debugging could grind to a halt.
To reduce the likelihood of this, we only show 20 frames (that's even more than node's default of 10).

@stevencl I addressed your feedback with the exception that I still allow the 'Load more stack frames' to be selectable since it has to be keyboard accessible like all our other actions. I just now nicely clear the selection and focus upon clicked.
Try it out and let me know what you think


Add differentiable_loss to Trace_ELBO

This PR adds differentiable_loss to infer.Trace_ELBO as proposed in e.g. #1227 and done for TraceEnum_ELBO in #1243.  It is necessary for #1250

LGTM @eb8680 - should we add a test comparing Trace and DiffTrace where one raises a pytorch error and the other doesn't?


link-PR-to-issue

Codecov Report

Merging #2337 into develop will decrease coverage by 2.25%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #2337      +/-   ##
=============================================
- Coverage      66.13%   63.87%   -2.26%
- Complexity      2355     2356       +1
=============================================
  Files            937      732     -205
  Lines          31164    22689    -8475
  Branches        3813     2644    -1169
=============================================
- Hits           20610    14493    -6117
+ Misses          8924     6998    -1926
+ Partials        1630     1198     -432

Impacted Files
Coverage Δ
Complexity Δ

...uetstore/operation/handler/GetElementsHandler.java

...q/gaffer/parquetstore/query/ParquetEntitySeed.java

...er/accumulostore/AccumuloSerialisationFactory.java

...store/data/element/AccumuloElementValueLoader.java

...tore/partitioner/NegativeInfinityPartitionKey.java

...re/operation/handler/utilities/SortGroupSplit.java

...store/operation/handler/GetAllElementsHandler.java

...tore/key/core/impl/CoreKeyBloomFilterIterator.java

...asestore/operation/handler/GetElementsHandler.java

...tore/retriever/impl/AccumuloSingleIDRetriever.java

... and 196 more

Continue to review full report at Codecov.

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

To avoid confusion, it may be better to change the name of this workflow to something like link-issue.yaml


INPUT_POINTER_TYPE

We have the nice constant __INPUT_TOUCH_PRIMARY to decide whether to do touch or do mouse stuff internally.
Since doing touch or doing mouse stuff involves a bit more hands-on from the library user beyond initial setup than keys or buttons, perhaps a constant similar to this value should be public, eg. INPUT_POINTER_TYPE (probably independent from INPUT_TOUCH_IS_MOUSE, this is implementation semantics).
Beyond pointer implementation differences, this might be useful information for device-specific interface language eg. click, touch, press.
A reason we might not want to do this is to encourage a check to player source instead, since player using touch is a similar test to player using gamepad.

Where would the prospective library use INPUT_POINTER_TYPE to control behaviour? I'd imagine mostly around cursor handling.

library doesn't need to, just mouse, touch, or none for user
alternatively, if you wanted to use it..
__INPUT_TOUCH_PRIMARY -> (!INPUT_TOUCH_IS_MOUSE && (INPUT_POINTER_TYPE == "touch"))

Sorry, *prospective library user use i.e. what's a use case

device-specific interface language eg. click, touch, press

on a rebinding screen with categories per device, selective display of mouse button category
INPUT_TOUCH remaps to INPUT_MOUSE, for the cursor feature but I don't want to draw a pointer in the former case

Merged, add docs

https://github.com/JujuAdams/Input/commit/6fa5f5705ff1213b0219c7cf23cc50033e665c46


AutoMap Files Cannot Use AMP Defined Variables

Bug Report
System Information

Windows 11 Pro 22000 64-bit
AMP v<IP_ADDRESS>
CI_Build

I confirm:

[x] that I have searched for an existing bug report for this issue.
[x] that I am using the latest available version of AMP.
[x] that my operating system is up-to-date.

Symptoms

What are you trying to do?
The Space Engineers generic template is attempting to place the $ApplicationPort1 and others into the game's config file using automap, but fails.
What are you expecting to happen?
XML automap files should function the same as standard kvp files. FieldName should be $ApplicationPort1 and ParamFieldName should be /MyConfigDedicated/ServerPort/text()
What is actually happening? ('Nothing' is not an acceptable answer!)
The value cannot be found in the XML type config file.

Reproduction
Enter reproductions steps here.
Use the following in the existing SE generic config:
    {         "DisplayName": "Server Port",         "Category": "Server Settings",         "Description": "Must match AMP's Application Port 1",         "Keywords": "Application Port Server",         "FieldName": "$ApplicationPort1",         "InputType": "hidden",         "IsFlagArgument": false,         "ParamFieldName": "/MyConfigDedicated/ServerPort/text()",         "IncludeInCommandLine": false,         "DefaultValue": "27017",         "EnumValues": {}     },

This was determined to not be implemented yet.

Should be implemented now in Nightly.


Multiple errors with test dataset

Hi Lauren,
Unfortunately, I cannot process the test data, as I receive the following errors (lines 123, 154 and 185 in the attached log file).
2023-10-10T074310.401559.snakemake.log

Hi! Can you also attach the log file test_out/logs/host_removal/uhgg.out?


Upgrade Scala to 2.13.1

This gives us access to the unused annotation. There are legitimate cases where it's impossible to avoid a warning from Ywarn-unused, which is elevated to an error by Xfatal-warnings, so this annotation lets us write such code without needing to outright disable otherwise-helpful warnings.

Due to the lack of support from the (apparently abandoned) scoverage plugin, I'm tabling this work in favor of redesigning my PR to not require the @nowarn or @unused annotations. Adding a tech debt ticket to replace scoverage with an actively maintained library to circumvent this.

Due to the lack of support from the (apparently abandoned) scoverage plugin, I'm tabling this work in favor of redesigning my PR to not require the @nowarn or @unused annotations. Adding a tech debt ticket to replace scoverage with an actively maintained library to circumvent this.


bump openshift version to 4.12.1 and update bundle hash

4.12.1 bundles are mirrored, https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/bundles/openshift/4.12.1/

/hold

/retest

/retest

Certificate rotation test is failing consistently, but merging since the bundles have certs with 1 year validity


Add metadata script for locking order

Hi!
We think that the lock scripts need to run before CC and UAA are locked - we see failures without this, as the pre-restore-lock  and pre-backup-lock scripts may attempt to cf auth after the CC and UAA have been stopped.
Thanks,
Chunyi && @henryaj

@henryaj @ChunyiLyu We will be working on this tomorrow morning. We are awaiting write access to this repo (as we are a new team taking over).


Update makepattern.py for python3 and modern nxo64

Ok it's broken, will reopen once it works

Well it was actually working, I was looking at the wrong file... Sorry about that

Is your applypattern-ghidra.py script able to handle these as well?

Yes, as far as I understand (didn't look too deep), it's because the py3 produces a bytestring vs a normal string with py2, with has to get escaped (so with a lot more backward slashes)


Look into leveraging a devicelogin code for authentication

This shouldn't be a priority, but it could be nice to leverage a devicelogin code that can be used to authenticate to a desired tenant. If the person has multiple browser profiles (I have personal, work, and test tenant profiles), it would allow them to choose which one they would like to authenticate on.

What I currently do to work around this is to make sure whichever one I intend to use is active on my machine, then run the scripts. When I don't get it right, I copy and paste the URL from one browser profile into the other, and then authenticate, since the redirect information is all present in the URI as opposed to relying on some cookie mechanism or launch data to the browser.
We can look at this, but my preference would be to make it an option as opposed to default behavior. Thoughts?

This may be eliminated partially by PR #80 on the Tenant side, but work will still be needed for the Azure side.

I didn't know that all of the needed information was in the URL, allowing it to be copied over to a new browser. This makes it much easier. If that's the case, I don't think there's a big need to address it in the Azure side. Feel free to close this issue if you agree.


Generate userstate.emotes (or emotes-raw) for self messages

When listening to https://docs.tmijs.org/v1.0.0/Events.html#chat the userstate object won't contain any emotes for self messages.
Today we have the technology to make it happen!
I wanted to make a PR but I'm too newb to figure out where things are in the codebase...
Here's the unoptimized function I'm using to generate them, if you need inspiration:
function generateEmotesProperty(message, twitchEmotes) {
  const sets = twitchEmotes.emoticon_sets;
  const emotes = {};
  Object.keys(sets).forEach(setId => {
    sets[setId].forEach(emote => {
      message.replace(new RegExp(emote.code, 'g'), (match, index) => {
        const start = index;
        const end = index + match.length - 1;
        emotes[emote.id] = emotes[emote.id] || [];
        emotes[emote.id].push(start + '-' + end);
        return match;
      });
    });
  });
  return emotes;
}

twitchEmotes being the data from this endpoint using the current user's emote sets.

The BetterTTV extension has code for this as it completely takes over the chat. Perhaps we could learn from how it's set up there.

Another issue with my implementation, twitch seems to assume the string has already been html escaped... Not sure if you took that into account in the commit
{
  id: 9,
  code: "\&lt\;3"
},

Oh, right.. I will fix this :+1:

Except it's not that simple, the character ranges should be for the unescaped version of the message. Realizing these things as I try to fix my code :cry:

Hmm, if I try to send test <3 Kappa.. the ranges seem to be okay:
{ badges: { broadcaster: '1' },
  color: '#FFFFFF',
  'display-name': 'Schmoopiie',
  'emote-sets': '0,27',
  mod: true,
  subscriber: false,
  turbo: false,
  'user-type': 'mod',
  'badges-raw': 'broadcaster/1',
  username: 'schmoopiie',
  emotes: { '9': [ '5-6' ], '25': [ '8-12' ] },
  'emotes-raw': '9:5-6/25:8-12',
  'message-type': 'chat' }

Cool, yours works :+1: Time for me to pull from @next

:+1:

Added in v1.0.1 and v1.1.0
Thanks :smile:


Fix duplicate call of webhook

Try to fix #7702

Codecov Report

Merging #7821 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7821      +/-   ##
==========================================
- Coverage   41.42%   41.41%   -0.02%
==========================================
  Files         474      474
  Lines       63876    63807      -69
==========================================
- Hits        26460    26425      -35
+ Misses      33971    33942      -29
+ Partials     3445     3440       -5

Impacted Files
Coverage Δ

modules/repofiles/upload.go
0% <ø> (ø)
:arrow_up:

models/webhook.go
56.51% <ø> (ø)
:arrow_up:

modules/repofiles/update.go
38.41% <ø> (-2.1%)
:arrow_down:

modules/repofiles/delete.go
48.43% <ø> (-3.89%)
:arrow_down:

models/unit.go
62.16% <0%> (-5.41%)
:arrow_down:

modules/log/event.go
64.61% <0%> (-1.03%)
:arrow_down:

models/repo_indexer.go
66.53% <0%> (+1.22%)
:arrow_up:

Continue to review full report at Codecov.

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

@sapk It seems it still have two webhook event when merged.

Please backport


stuck at "INFO:list for subsample is not initialized. Initializing now" for about a day

info:
SRR10520596.fastq is ~3 GB in size
command:
python longQC.py sampleqc -x pb-rs2 -o /data/out_dir /data/SRR10520596.fastq
logs:
longQC:2020-12-30 16:26:53,142:169:INFO:Cmd: longQC.py sampleqc -x pb-rs2 -o /data/out_dir /data/SRR10520596.fastq
longQC:2020-12-30 16:26:53,143:233:INFO:Preset "pb-rs2" was applied. Options --pb(--ont) is overwritten.
longQC:2020-12-30 16:26:58,169:306:INFO:Computation of the low complexity region started for a chunk 0
lq_mask:2020-12-30 16:27:13,623:111:INFO:New job was submitted: in->/data/out_dir/analysis/tmp_0.fastq, out->/data/out_dir/analysis/tmp_0.txt
longQC:2020-12-30 16:27:13,630:311:INFO:Adapter search is starting for a chunk 0.
longQC:2020-12-30 16:27:13,635:327:INFO:Computation of the GC fraction started for a chunk 0
lq_utils:2020-12-30 16:27:21,706:380:INFO:list for subsample is not initialized. Initializing now.
It freezed here for a day that I had to force quit.

Hello @gimnec,
I'll try to reproduce the error with that SRA fastq.
At present, the problem looks to be related to your file system.
Are you using some computer cluster?
If so, could you try again to see if the same issue happens?
Yoshinori

@yfukasawa
I was not using any computer cluster, just a Mac.
I'm now running on another Windows 10 pc, and it went further than on Mac. But it has been freezing at "longQC:2020-12-31 13:54:53,592:327:INFO:Computation of the GC fraction started for a chunk 1" for an hour now.
Prior to that, I've modified the original Dockerfile because it gave me errors that the pysam and edlib versions are not compatible with others. Here's the modified version.
build minimap2-coverage
FROM continuumio/miniconda3
MAINTAINER
MAINTAINER Yoshinori Fukasawa<EMAIL_ADDRESS>RUN apt-get clean all &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y
git
build-essential
libc6-dev
zlib1g-dev &&
apt-get clean &&
apt-get purge
ENV VARS
ENV USER user
ENV HOME /home/${USER}
LABELS
LABEL base_image="miniconda3"
LABEL software="LongQC docker"
LABEL software.version="1.2"
add a general user account
RUN useradd -m ${USER}
define a password for user
RUN echo "${USER}:test_pass" | chpasswd
ADD https://api.github.com/repos/yfukasawa/longqc/git/refs/heads/minimap2_update version.json
RUN git clone https://github.com/yfukasawa/LongQC.git $HOME/LongQC
RUN cd $HOME/LongQC/minimap2-coverage && make
install dependency
RUN conda update -y conda
RUN conda config --add channels defaults
RUN conda config --add channels bioconda
RUN conda config --add channels conda-forge
RUN conda config --add channels anaconda
RUN conda config --add channels r
RUN conda install -y numpy
RUN conda install -y pandas'>=0.24.0'
RUN conda install -y scipy
RUN conda install -y jinja2
RUN conda install -y h5py
RUN conda install -y matplotlib'>=2.1.2'
RUN conda install -y scikit-learn
RUN pip install pysam
RUN pip install edlib
RUN conda install -y -c bioconda pysam
RUN conda install -y -c bioconda edlib
RUN conda install -y -c bioconda python-edlib
change user to "user" defined above
USER ${USER}
define a working dir
WORKDIR $HOME

Thanks.
Then, adapter seq alignment using edlib might be causing issues in your env.
I'll try to reproduce the issue with the same dataset.
In the meantime, may I ask versions for pysam, edlib, and python-edlib?
Best,
Yoshinori

Thanks.
Then, adapter seq alignment using edlib might be causing issues in your env.
I'll try to reproduce the issue with the same dataset.
In the meantime, may I ask versions for pysam, edlib, and python-edlib?
Best,
Yoshinori

@yfukasawa
Thank you in advance.
Those versions are:
pysam <IP_ADDRESS>
edlib 1.3.8.post2
python-edlib 1.3.8.post2

@yfukasawa
Thank you in advance.
Those versions are:
pysam <IP_ADDRESS>
edlib 1.3.8.post2
python-edlib 1.3.8.post2

Hi @gimnec,
I've tried to build Docker file (Dockerfile.txt) with your modifications after removing all of containers, images and caches on my Mac.

I still can't reproduce pysam/edlib incompatible errors (installation through conda worked ok), and the conflicting might have been caused by pre-existing Docker image/caches in your environment. If you try to cleanly install, the error may disappear. otherwise, kindly let me know.
python-edlib version 1.3.8.post2 worked fine in my env.

To pinpoint the issue, could you try test the adapter module? If this is ok, I can narrow down issues.
For this, I found some minor bugs in the code, and fixed and commit the patch just before.
In Docker, please clone the latest repo.
then, please change the path for the input in the file.
In my case, the file was put under /data/.
Then run just this module as follow, and it should finish quickly (~ a few mins).
time python LongQC/lq_adapt.py
lq_adapt:2021-01-03 14:36:09,659:119:INFO:Input file: /data/SRR10520596.fastq
lq_adapt:2021-01-03 14:37:14,474:121:INFO:File was loaded.
lq_adapt:2021-01-03 14:37:25,144:77:INFO:9074 reads were skipped due to their short lengths.
lq_adapt:2021-01-03 14:37:25,145:90:INFO:Adapter Sequence: ATCTCTCTCAACAACAACAACGGAGGAGGAGGAAAAGAGAGAGAT, max identity:1.000000 and the number of trimmed reads: 502
lq_adapt:2021-01-03 14:37:37,344:42:INFO:9074 reads were skipped due to their short lengths.
lq_adapt:2021-01-03 14:37:37,345:92:INFO:Adapter Sequence: ATCTCTCTCAACAACAACAACGGAGGAGGAGGAAAAGAGAGAGAT, max identity:1.000000 and the number of trimmed reads: 1290

real	1m36.976s
user	0m55.044s
sys	0m14.878s

If this doesn't finish, python-edlib or something related to this behaves oddly in your env. if works fine, kindly let me know.
Yoshinori

Hi @gimnec,
I've tried to build Docker file (Dockerfile.txt) with your modifications after removing all of containers, images and caches on my Mac.

I still can't reproduce pysam/edlib incompatible errors (installation through conda worked ok), and the conflicting might have been caused by pre-existing Docker image/caches in your environment. If you try to cleanly install, the error may disappear. otherwise, kindly let me know.
python-edlib version 1.3.8.post2 worked fine in my env.

To pinpoint the issue, could you try test the adapter module? If this is ok, I can narrow down issues.
For this, I found some minor bugs in the code, and fixed and commit the patch just before.
In Docker, please clone the latest repo.
then, please change the path for the input in the file.
In my case, the file was put under /data/.
Then run just this module as follow, and it should finish quickly (~ a few mins).
time python LongQC/lq_adapt.py
lq_adapt:2021-01-03 14:36:09,659:119:INFO:Input file: /data/SRR10520596.fastq
lq_adapt:2021-01-03 14:37:14,474:121:INFO:File was loaded.
lq_adapt:2021-01-03 14:37:25,144:77:INFO:9074 reads were skipped due to their short lengths.
lq_adapt:2021-01-03 14:37:25,145:90:INFO:Adapter Sequence: ATCTCTCTCAACAACAACAACGGAGGAGGAGGAAAAGAGAGAGAT, max identity:1.000000 and the number of trimmed reads: 502
lq_adapt:2021-01-03 14:37:37,344:42:INFO:9074 reads were skipped due to their short lengths.
lq_adapt:2021-01-03 14:37:37,345:92:INFO:Adapter Sequence: ATCTCTCTCAACAACAACAACGGAGGAGGAGGAAAAGAGAGAGAT, max identity:1.000000 and the number of trimmed reads: 1290

real	1m36.976s
user	0m55.044s
sys	0m14.878s

If this doesn't finish, python-edlib or something related to this behaves oddly in your env. if works fine, kindly let me know.
Yoshinori

@yfukasawa
I think I solved this problem now. By trying many ways from the start, I eventually found out that there are 2 main errors solved by modifying Dockerfile as follows.

Anyway, I'm coming up with the new issues. I'll post it in another thread.
And thank you so much for your help!

@yfukasawa
I think I solved this problem now. By trying many ways from the start, I eventually found out that there are 2 main errors solved by modifying Dockerfile as follows.

Anyway, I'm coming up with the new issues. I'll post it in another thread.
And thank you so much for your help!

On my PC, I modified Dockerfile like the above comment, then built and ran it, and it went farther than "INFO:list for subsample is not initialized. Initializing now", although did not finish because of another error.
I then saved a docker image of LongQC, and loaded it on Mac at my working place. It was stuck at "INFO:list for subsample is not initialized. Initializing now", unlike on my PC that it went further this point.
I think the root cause of this strange problem could be the strict proxy of my working place, so I'll have to continue working on my PC for now.

On my PC, I modified Dockerfile like the above comment, then built and ran it, and it went farther than "INFO:list for subsample is not initialized. Initializing now", although did not finish because of another error.
I then saved a docker image of LongQC, and loaded it on Mac at my working place. It was stuck at "INFO:list for subsample is not initialized. Initializing now", unlike on my PC that it went further this point.
I think the root cause of this strange problem could be the strict proxy of my working place, so I'll have to continue working on my PC for now.


How is it different from https://github.com/ziglibs/known-folders?

I guess the main difference being that I didn't know that package existed when I started working on this lmao
As far as use-case, basedirs-zig has a very simple codebase and I intend to keep it that way, but I presume zigdirs conforms to Windows and macOS spec a lot better (this package only currently conforms to XDG and basic Windows and macOS conventions). This package has very little testing, besides a game I've been making (which is in very early development yabg.
If you're interested in a well-tested package, I'd definitely go with known-folders, but if you're feeling adventurous, feel free to try this package.


Roll moneta-alpha and moneta-beta into a single upgrade handler

As moneta-alpha required a no-op handler, I think this might be all that is needed to merge -alpha and -beta into a single handler. We should probably not merge this yet though until we're 100% on how we should test it. I'm sort of erring towards relaunching uni at the moment.

u also need to update here
https://github.com/CosmosContracts/juno/blob/6d8f7f5354b4b7924d3ba162a5c70cc6e835c682/app/app.go#L554

D'oh, yeah, you're right. Serves me right for quickly grepping through the file in between meetings.


Create Nutch dashboards

Visualization ideas:

[ ] Pages crawled over time

Still have not got analytics information out of Nutch.

We should review what we want to do here.


build: enable esModuleInterop for build

This enables the esModuleInterop flag in the tsconfig.  Doing this for a few reasons:

I don't believe we export d.ts types, which can cause problems downstream
It's the default for TypeScript's out of the box config
It's about to be the default for gts

@alexander-fenster I am having a ton of trouble debugging this :( AFAICT using esModuleInterop like this shouldn't break webpack.  Any chance you could take a peek?

Good that we have tests! :)  I will take a look on Monday when I get back from a small vacation.

@JustinBeckwith  Can you assign this to me so that it appears on my radar? I don't have rights to do that :)

@alexander-fenster I invited you to the repo :)

@JustinBeckwith It went mad trying to use fetch from node-fetch in webpack bundle. It should not, since window.fetch exists, so I fixed it with this commit. Works now!

upd. node-fetch has browser key in its package.json and it just used its node_modules/node-fetch/browser.js so it all should have worked but did not :)

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


WSL2: Cisco anyconnect not connecting after running  wsl --update

Hi,
I have been using wsl2 for several months now on windows 11 and my guest OS is Ubuntu (Linux <IP_ADDRESS>-microsoft-standard-WSL2)
I recently got a prompt when starting Ubuntu console about WSL now being available on Microsoft Store and the prompt indicated I can simply run wsl --update to update to the new WSL. So all I did was to run this command. After performing this update, I can no longer connect to VPN using Cisco Anyconnect. I did not change anything else (like updating Ubuntu or Cisco Anyconnect client) Now I am getting this error:
VPN establishment capability for a remote user is disabled. A VPN connection will not be established
I have verified that I can connect to same VPN portal using both Windows and other stand alone Linux laptop, and even another Ubuntu running using Virtual box, So the VPN server is working fine for other Linux and windows clients.
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
anyconnect-linux64-4.10.06079
Windows version: 10.0.22621.1105

I have a similar issue.
After I did the wsl --update prompt to use the Store version, my VS Code no longer see any distro dans doesn't work in WSL mode anymore.
And today after I did a Docker Desktop update to the latest version, it refused to start so I had to competely reset it; it works on Windows, but on the WSL Integration page, it also says that I don't have any WSL 2 distro installed. (which is not true, I have Ubuntu 22.04 installed and it's working fine).
So after the wsl --update, there are two different programs which say that I don't have any WSL 2 distro installed.

@frivard-coveo, What version of wsl are you running wsl --version?

What version of wsl are you running wsl --version?

❯ wsl --version
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1105

Same issue here on WSL <IP_ADDRESS>

Just experienced the exact same issue because I set up a new laptop where I installed WSL via the store.

However, this only occurs when I enable systemd in the wsl.conf file. Whenever I disable it and start a few services manually it connects fine again.

@MirChamb3r
I tried this too by setting the systemd config in /etc/wsl.conf to false.
Unfortunately, this did not fix it for me.
Is there anything else you changed?


"Failed to deserialize info of file compiled with Scala.js 0.6.6"

Using import
libraryDependencies += "com.github.japgolly.scalacss" %%% "core" % "0.4.0"
Fails with $ sbt fastOptJS
[error] (compile:fastOptJS) org.scalajs.core.ir.IRVersionNotSupportedException: Failed to deserialize info of file compiled with Scala.js 0.6.6 (supported: 0.6.0, 0.6.3, 0.6.4, 0.6.5): C:\Users\Carl.ivy2\cache\com.github.japgolly.scalacss\core_sjs0.6_2.11\jars\core_sjs0.6_2.11-0.4.0.jar#scalacss/DslMacros$MStyleF$class.sjsir

It looks like you're using Scala.JS version 0.6.5. Try updating your plugins.sbt to use 0.6.6 or 0.6.7.


standalone tracing modules

this makes it possible to trace trampolines without getting weird

closing as duplicate of #132


Submitting same attendance code

Describe the bug
Members can submit the same attendance code multiple times.

EDIT: counting of total attendances which are possible for the student to have gone to is CORRECT, only issue with allowing attendances to be logged which they shouldn't be able to submit

Expected behavior
Should get error message stating that attendance code was already submitted.

Closed by #45


Update and fixes to part 1 of How to bake an Ortelius Pi

Hi Tracy,
Please review and apply.
Thank you.

Check now - I ran a comparison and added the missing section.

I going to fix the merge conficts. Sorry about this.

Keep in mind that there are coding changes on the images. I sent you the markdown.


In dev mode are loaded all css files through link tags

During development, all style files are loaded through the link tag,
and immediately after them, style tags with the same content are loaded

Why load the same styles twice?
When using, for example, tailwindcss along with postcss-import, this leads to an error, since all css files are loaded onto the page separately with @import, although they are only needed at the build stage via postcss-import and should result in only one file
Without vite-plugin-ssr in development mode, vite only loads style tags without copies as link tags
How can I turn it off?

This is by design, in order to avoid the style flashing between the browser receiving the HTML and the browser receiving the JS bundle that will inject the CSS.

When using, for example, tailwindcss along with postcss-import, this leads to an error, since all css files are loaded onto the page separately with @import, although they are only needed at the build stage via postcss-import and should result in only one file

Can you elaborate?

This is my style.css

As a result, after the postcss-import plugin has run, you should get one file
But

And result after refreshing page

if you block the download of these files in the network tab in the browser, then everything works fine. So my question is - how can I disable the loading of these files during development?

https://github.com/brillout/vite-plugin-ssr/issues/262 will enable you to do that.

Marking this as a feature request since most Tailwind users don't have this problem. It's probably something specific to your setup.

Closing this in favor of https://github.com/brillout/vite-plugin-ssr/issues/300.


Inaccessible host: XXX.s3.eu-west-1.amazonaws.com' at port undefined'

Hi everybody,
I developed an express API to upload multiple files to s3. locally, the api works successfully, but I get the following error ones the api on ec2 (with kubernetes) is deployed:
 "error": {         "status": 503,         "message": "Error during storage upload",         "error": {             "message": "Inaccessible host:XXX.s3.eu-west-1.amazonaws.com' at port undefined'. This service may not be available in the eu-west-1' region.",
"code": "UnknownEndpoint",
"region": "eu-west-1",
"hostname": "XXX.s3.eu-west-1.amazonaws.com",
"retryable": true,
"originalError": {
"message": "getaddrinfo EAI_AGAIN XXX.s3.eu-west-1.amazonaws.com",
"errno": -3001,
"code": "NetworkingError",
"syscall": "getaddrinfo",
"hostname": "XXX.s3.eu-west-1.amazonaws.com",
"region": "eu-west-1",
"retryable": true,
"time": "2022-02-14T10:39:00.378Z"
},
"time": "2022-02-14T10:39:00.378Z",
"storageErrors": []
},`
Pls note that, The bucket is reachable from my EC2. I read bucket content using aws cli.
Environment
Node 12
Express4
EC2 with Kubernetes( Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:03:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"})
It seems the issue with port is related.
Thanks in advance,
Simone

Dear All,
I solved the issue. My problem on Kubernetes pods internet access was related.
Simone


Feature: support filtering on dateUpdated

TL;DR
Even though images might be old (created a long time ago), they might have been updated recently, so it would be handy to make the difference between dateCreated vs dateUpdated when checking the grace period.
Proposed behavior
Introduce a new flag: useDateUpdated.
When setting the flag useDateUpdated to true, images are filtered against dateUpdated instead of dateCreated (or dateUploaded as mentioned in the code):
https://github.com/GoogleCloudPlatform/gcr-cleaner/blob/main/pkg/gcrcleaner/cleaner.go#L335

How are you running gcr-cleaner?
CLI
gcr-cleaner version
Latest
Environment
Using Cloud Run and Cloud Scheduler on GCP.

Hi all - users should prefer the native Google Artifact Registry functionality instead of gcr-cleaner. We are only fixing bugs and security issues in gcr-cleaner now that there's a native (and free) feature in the Google Cloud product.


.gitignore and CMake

I noticed a few legacy references in the README.md that refer to the old make test syntax. It would be great to update these sentences with the correct line of command when using CMake.
Should we keep the old Makefile? The good side is that it permits to keep the same compilation workflow for whoever used it so far. The bad part is that it's clearly depreciated if we adopt CMake as a standard for this project.

I will replace make test with cmake.
It seems you are using Makefile for CI Actions now. Let's just leave Makefile there for now.  When the library version is available, I think we can write some better testing codes and better CI actions based on those.

When some additional changes are required in a PR, you can just leave it without merging it until all issues are resolved.  If I make some new changes to resolve such issues, this PR will be automatically updated.
Once you merged the PR, we need to create a new PR (like #9).  Just something to consider in the future :)

Thank for the tip!


XGLM Example does not run

🐛 Bug
The XGLM example has several issues: https://github.com/pytorch/fairseq/tree/main/examples/xglm: 1) fairseq.models.build_model fails because the model_type (transformer_lm_gpt2_big_wide) does not exist on the registered models, 2) the issue in #4209.
To Reproduce
Steps to reproduce the behavior (always include the command you ran):

Run the examples on  https://github.com/pytorch/fairseq/tree/main/examples/xglm
You'll see an error complaining "_name" does not exist, which comes from the fact the model object in the build_model function is None. This can be worked around by hardcoding model_type = 'transformer_lm'.
With the workaround in 2), you'll see the issue on #4209. This can be mitigated by removing the pad_length arguments to PadDataset in build_dataset_for_inference.

With this I'm able to run, however it's unclear if this hacks guarantee the correctness of the model.
Stack trace for error in 2):
Traceback (most recent call last):
  File "go.py", line 55, in <module>
    lm = TransformerLanguageModel.from_pretrained(model_dir, bpe='sentencepiece')
  File "/home/ancruzsa/fairseq/fairseq/models/fairseq_model.py", line 267, in from_pretrained
    x = hub_utils.from_pretrained(
  File "/home/ancruzsa/fairseq/fairseq/hub_utils.py", line 73, in from_pretrained
    models, args, task = checkpoint_utils.load_model_ensemble_and_task(
  File "/home/ancruzsa/fairseq/fairseq/checkpoint_utils.py", line 469, in load_model_ensemble_and_task
    model = task.build_model(cfg.model, from_checkpoint=True)
  File "/home/ancruzsa/fairseq/fairseq/tasks/multilingual_language_modeling.py", line 260, in build_model
    model = super().build_model(args, from_checkpoint)
  File "/home/ancruzsa/fairseq/fairseq/tasks/fairseq_task.py", line 671, in build_model
    model = models.build_model(args, self, from_checkpoint)
  File "/home/ancruzsa/fairseq/fairseq/models/__init__.py", line 102, in build_model
    f"Could not infer model type from {cfg}. "
KeyError: "'_name'"

Stack trace for error 3):
Traceback (most recent call last):
  File "go.py", line 75, in <module>
    predict = COPA_eval(example["premise"], example["choice1"], example["choice2"])
  File "go.py", line 69, in COPA_eval
    lprob1 = get_logprobs(prompt + "\n" + alternative1).sum()
  File "go.py", line 63, in get_logprobs
    return lm.score(prompt, replace_newlines_with_eos=True)['positional_scores']
  File "/home/ancruzsa/fairseq/fairseq/hub_utils.py", line 139, in score
    return self.score(
  File "/home/ancruzsa/fairseq/fairseq/hub_utils.py", line 153, in score
    for hypos in self.generate(
  File "/home/ancruzsa/fairseq/fairseq/hub_utils.py", line 187, in generate
    for batch in self._build_batches(tokenized_sentences, skip_invalid_size_inputs):
  File "/home/ancruzsa/fairseq/fairseq/hub_utils.py", line 275, in _build_batches
    dataset=self.task.build_dataset_for_inference(tokens, lengths),
  File "/home/ancruzsa/fairseq/fairseq/tasks/multilingual_language_modeling.py", line 533, in build_dataset_for_inference
    "src_tokens": PadDataset(
TypeError: __init__() got an unexpected keyword argument 'pad_length'

Code sample
from fairseq.models.transformer_lm import TransformerLanguageModel

data_samples = {
    'en': [
        {
            "premise": "I wanted to conserve energy.",
            "choice1": "I swept the floor in the unoccupied room.",
            "choice2": "I shut off the light in the unoccupied room.",
            "question": "effect",
            "label": "1"
        },
        {
            "premise": "The flame on the candle went out.",
            "choice1": "I blew on the wick.",
            "choice2": "I put a match to the wick.",
            "question": "cause",
            "label": "0"
        }
    ],
    'zh': [
        {
            "premise": "我想节约能源。",
            "choice1": "我在空着的房间里扫了地板。",
            "choice2": "我把空房间里的灯关了。",
            "question": "effect",
            "label": "1"
        },
        {
            "premise": "蜡烛上的火焰熄灭了。",
            "choice1": "我吹灭了灯芯。",
            "choice2": "我把一根火柴放在灯芯上。",
            "question": "cause",
            "label": "0"
        }
    ],
    'hi': [
        {
            "premise": "M te vle konsève enèji.",
            "choice1": "Mwen te fin baleye chanm lib la.",
            "choice2": "Mwen te femen limyè nan chanm lib la.",
            "question": "effect",
            "label": "1"
        },
        {
            "premise": "Flam bouji a te etenn.",
            "choice1": "Mwen te soufle bouji a.",
            "choice2": "Mwen te limen mèch bouji a.",
            "question": "cause",
            "label": "0"
        }
    ]
}

model_dir = # replace here with the path to xglm.564M.tar.gz
lm = TransformerLanguageModel.from_pretrained(model_dir, bpe='sentencepiece')
lm = lm.eval()
lm = lm.half()
lm = lm.cuda()

def get_logprobs(prompt):
    import re
    prompt = re.sub('\n+' , '\n', prompt)  # collapse repeated newlines, which indicate separate documents
    return lm.score(prompt, replace_newlines_with_eos=True)['positional_scores']

# Zero-shot evaluation for the Choice of Plausible Alternatives (COPA) task.
# A return value of 0 indicates that the first alternative is more plausible,
# while 1 indicates that the second alternative is more plausible.
def COPA_eval(prompt, alternative1, alternative2):
    lprob1 = get_logprobs(prompt + "\n" + alternative1).sum()
    lprob2 = get_logprobs(prompt + "\n" + alternative2).sum()
    return 0 if lprob1 > lprob2 else 1

for lang in ['en', 'zh', 'hi']:
    for idx, example in enumerate(data_samples[lang]):
        predict = COPA_eval(example["premise"], example["choice1"], example["choice2"])
        print(f'{lang}-{idx}', predict, example['label'])

Expected behavior
Model should be able to load and run correctly as trained.
Environment

fairseq Version (e.g., 1.0 or main): main
PyTorch Version (e.g., 1.0): 1.10.2
OS (e.g., Linux):
How you installed fairseq (pip, source):
Build command you used (if compiling from source):
Python version:
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information:

Additional context

It looks that this has been resolved in the latest main branch!

@afcruzs-ms Would you please close this issue if the problem has been solved? Thanks!


Excel export: Filters not applied

When exporting a table to Excel (csv) the current text filter is not applied.
The downloaded file always includes the full table.
Neither the column filter is applied nor the "full table search filter"
In an older Version (v2.1.4 / TableTools.min.js) in combination with jquery.dataTables.columnFilter.js (v 1.5.0) by Jovan Popovic the filter was applied to the excel list.
Is this a bug or a feature? How can I apply the filter to the excel file too?
This occurs with the latest version of TableTools and with client side filtering.
To reproduce you can use this page https://datatables.net/extensions/tabletools/ enter something into "search" and download the Excel file - it will contain the whole table.

Use the oSelectorOpts option to tell TableTools what to export.
Can you post future support requests in the DataTables forums please?


Reorganize With Diataxis

Description
Reorganised the docs following https://diataxis.fr
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Documentation Enhancement

How Has This Been Tested?
Tested the local wiki build.
You can also just run https://gitpod.io/#https://github.com/Dr-Electron/hornet/tree/docs/feat/reorg
Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have tested my code extensively
[ ] I have selected the develop branch as the target branch

@iotaledger/tech-writers ready for your review

Structure-wise it looks great :) , but we'd need to update the links in the files which were renamed without changes. I'd add them as suggestion, but as they have no changes I can't suggest

There are broken links? Shouldn't they then break the test? sweat_smile

according to my local build:

Error: Docs markdown link couldn't be resolved: (hornet_apt_repository.md) in /home/lucas/Documents/IOTA/coworkers/drelectron/hornet/documentation/docs/getting_started/getting_started.md for version current
    at Array.forEach (<anonymous>)
Error: Docs markdown link couldn't be resolved: (../post_installation/post_installation.md) in /home/lucas/Documents/IOTA/coworkers/drelectron/hornet/documentation/docs/how_tos/hornet_apt_repository.md for version current
    at Array.forEach (<anonymous>)
Error: Docs markdown link couldn't be resolved: (faq.md) in /home/lucas/Documents/IOTA/coworkers/drelectron/hornet/documentation/docs/troubleshooting.md for version current

Structure-wise it looks great :) , but we'd need to update the links in the files which were renamed without changes. I'd add them as suggestion, but as they have no changes I can't suggest

There are broken links? Shouldn't they then break the test? sweat_smile

according to my local build:

Error: Docs markdown link couldn't be resolved: (hornet_apt_repository.md) in /home/lucas/Documents/IOTA/coworkers/drelectron/hornet/documentation/docs/getting_started/getting_started.md for version current
    at Array.forEach (<anonymous>)
Error: Docs markdown link couldn't be resolved: (../post_installation/post_installation.md) in /home/lucas/Documents/IOTA/coworkers/drelectron/hornet/documentation/docs/how_tos/hornet_apt_repository.md for version current
    at Array.forEach (<anonymous>)
Error: Docs markdown link couldn't be resolved: (faq.md) in /home/lucas/Documents/IOTA/coworkers/drelectron/hornet/documentation/docs/troubleshooting.md for version current

Damn, good catch. I think I know what's wrong. Let me fix it

Do you use the same version of docs template as @lucas-tortora ? He has more files in his PR.

What do you mean with he has more files? Isn't that dependent on the docs how many files there are?

I was talking about files like documentation/docs/getting_started/_README.md in https://github.com/iotaledger/stronghold.rs/pull/377/files

I was talking about files like documentation/docs/getting_started/_README.md in https://github.com/iotaledger/stronghold.rs/pull/377/files
Do we want to keep them or omit them?

Perhaps it's better to omit them, though they won't change often if we just keep an intro in the main readme and a link to the repo it'll be much less maintenance.

I was talking about files like documentation/docs/getting_started/_README.md in https://github.com/iotaledger/stronghold.rs/pull/377/files
Do we want to keep them or omit them?

Perhaps it's better to omit them, though they won't change often if we just keep an intro in the main readme and a link to the repo it'll be much less maintenance.

As it seems we agree on that let's not add the _md files and one everything into the wiki guide. And add the https://wiki.iota.org/participate/contribute-to-wiki/for_devs/developer_guide link to the docs README


Second PanResponder when activated disables first

This happens on both android and ios, react-native 0.26.0.
I have a screen where I have a draggable view using PanResponder and Animated as per the example in the docs.
There is also a slider which uses PanResponder to work.
If I use the slider after dragging the draggable view the draggable view becomes undraggable.

Hmm, when I implemented the movement myself WITHOUT Animated as per the example, simply by sitting top and left values based on gesture.dx and gesture.dy it works just fine.


[Feature] Making FAQs questions as dropdown to show ans.

Description
here , all the faqs and thier answers are also visible that to inorder form . I add boundry aand set the font and add a button to toggel show answer
Motivation
It is showing all the answers to the questions .We should provide a dropdown Button to show answer only if the user want
Screenshots

My solution :

like this
Additional Context
No response
Checklist

[X] I have checked the existing issues.
[X] I have read the Code Of Conduct.
[X] The changes don't break the code.
[X] I will attach screenshots and videos of the development work once it is done.

Priority
Medium

Please assign it to me under gssoc-exnt. and Hacktoberfesst


MySQL5 one-to-one table operations are not supported

Given:
type User {
  id: ID! @id
  settings: Settings @relation(name: "Settings")
}

type Settings {
  id: ID! @id
  user: User @relation(name: "Settings", link: TABLE)
}

You'd expect:
model Settings {
  id   String @default(cuid()) @id
  user User?
}

model User {
  id         String    @default(cuid()) @id
  settingsId String?   @unique
  settings   Settings? @relation(fields: [settingsId], references: [id])
}

But you get:
model Settings {
  id   String @default(cuid()) @id
  User User[] @relation("Settings", references: [id])
}

model User {
  id       String     @default(cuid()) @id
  Settings Settings[] @relation("Settings", references: [id])
}

Unfortunately we don't have the bandwidth to fix this, but in Postgres the upgrade looks like this:
ALTER TABLE "User" ADD COLUMN "settingsId" CHARACTER VARYING(25) unique;
UPDATE "User" SET "settingsId" = "_Settings"."A" FROM "_Settings" WHERE "_Settings"."B" = "User"."id";
ALTER TABLE "User" ADD FOREIGN KEY ("settingsId") REFERENCES "Settings"("id");
DROP TABLE "_Settings";

I was able to squeeze this one in with #66


Fix empty list

Hi, @nikitavoloboev  i make pr for issues #13
Summary
Fix issues #13 cause by sindresorhus/awesome repo change default branch
Changes
I have add go module for tracking dependency, and change name master -> main branch

Awesome, it works 🎊


APK

Hey, could you provide an apk in the releases area? Thanks!

I don't think he will read issues/add releases, this project is not actively developed

@Vincysuper07 I do read these, actually. I'm not working on Boardwalk (and there are no releases) currently, since other devs have created the Boat/MCInABox launcher, and that's much better than Boardwalk.

@Vincysuper07 I do read these, actually. I'm not working on Boardwalk (and there are no releases) currently, since other devs have created the Boat/MCInABox launcher, and that's much better than Boardwalk.

Ah, didn't know that, sorry.

If you read this message , pls send me the release apk

@honee935 can't you use MCinaBox instead?

Hey, could you provide an apk in the releases area? Thanks!

https://github.com/PojavLauncherTeam/PojavLauncher

You could find it on uptodown now close the issue


Bug in MQTT-SN Logging

Describe the bug
The MQTT-SN library is using the wrong printing format specifier at the following locations:
https://github.com/zephyrproject-rtos/zephyr/blob/f90ce01d4ac507c99e3cddcaba6fd13239b06034/subsys/net/lib/mqtt_sn/mqtt_sn.c#L187
https://github.com/zephyrproject-rtos/zephyr/blob/f90ce01d4ac507c99e3cddcaba6fd13239b06034/subsys/net/lib/mqtt_sn/mqtt_sn.c#L245
Tests pass on native_sim but fail on bcm958402m2/bcm58402/a72.
Environment:

OS: Linux
Toolchain Zephyr SDK
Commit SHA: b1def71

There is a fix for this in #81803


Fixed link to bootstrap theme

What kind of change does this PR introduce? (check one with "x")

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Other... Please describe: Demo fix

What is the current behavior? (You can also link to an open issue here)
http://swimlane.github.io/ngx-datatable/#bootstrap Source link naviagates to 404 page
What is the new behavior?
Link navigates to the correct *.ts file
Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:

Thanks!


Roll out web worker tokenization

Status update:

I fixed some bugs that might explain the error telemetry we get
~Rolled out to 5% stable users~
~Rolled out to 20% stable users~
~Rolled out to 40% stable users~

Blockers:

~https://github.com/microsoft/vscode/issues/186915~

Done, as there are no issues known.


⚠ ClamAV has degraded performance

In c9bbc56, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 55 ms

Resolved: ClamAV performance has improved in 4ad6d82 after 6 minutes.


Cannot debug rails with overmind

When try to debug my rails app with overmind it does not stop at the line of code where debugger has been specified. This is a Rails 7 app (Jumpstart Pro). Here is a short video I made of the steps I am performing. Can anybody tell me what am I doing wrong?
https://www.loom.com/share/313fb00197904bba9127d8562fbc99f6?sharedAppSource=personal_library

Hi @navjeetc! Overmind can't affect Ruby breakpoints, so it doesn't look like an Overmind issue.

You are correct @DarthSim . The issue was one modification I had made to puma.rb stdout_redirect "log/puma.stdout.log", "log/puma.stderr.log" which now makes sense. Once I comment that line all is good.


http::parse_error

This should be a separate category with a get function for the category parse_error.hpp or maybe parser.hpp and documentation, parser errors are non-recoverable. The recoverable errors can stay in http::error (which also needs a name and a getter for the category).

See https://akrzemi1.wordpress.com/2017/08/12/your-own-error-condition/#comment-6954


Add a target for C++ with profile guided optimisation (autoPGO)

Add a C++ target with profile guided optimisation enabled
Reduce significantly execution time ( < 0.29s locally )
Language      | Simple | Optimized | Notes
------------- | ------ | --------- | -----
Forth         |   0.00 |      0.00 |
`grep`        |   0.04 |      0.04 | `grep` baseline; optimized sets `LC_ALL=C`
`wc -w`       |   0.24 |      0.17 | `wc` baseline; optimized sets `LC_ALL=C`
C++ (autoPGO) |   0.29 |           | by Adev
C             |   0.80 |      0.35 |
Nim           |   0.83 |           | by csterritt and euantorano
Go            |   1.12 |      0.36 |
Rust A        |   1.20 |      0.31 | by Andrew Gallant
Rust B        |   1.24 |      0.28 | also by Andrew: bonus and custom hash
C++           |   1.44 |      0.35 | optimized by Jussi Pakkanen
Python        |   1.71 |      1.06 |
Perl          |   1.72 |           | by Charles Randall
JavaScript    |   2.44 |      1.81 | by Dani Biro
Ruby          |   2.57 |      2.02 | by Bill Mill
AWK           |   2.90 |      0.94 | optimized uses `mawk`
Julia         |   3.53 |           | by Alessandro Melis
C#            |   3.76 |           | original by John Taylor
Shell         |  12.48 |      1.56 | optimized does `LC_ALL=C sort -S 2G`

Thanks for your contribution. I think I'll leave this as is for now. PGO is an interesting technique, but seeing none of the other versions use it, I'd like to avoid it for C++ too. Plus, it's not too much different (0.29s vs 0.35s). Thanks anyway!


Request to bring back horizontal line effect in novelist scheme

The chime is so incredibly beautiful and well-designed. The variety of color schemes is a real highlight and I've been thoroughly enjoying experimenting with them. But I just noticed that the horizontal line effect that was previously present in the novelist scheme has been removed in the latest update. I was wondering if it would be possible to bring this feature back as it added a unique touch to the scheme and complemented it well. Thank you for considering the request.

I'm glad you've been enjoying my theme! I'll change the novelist divider back and update the theme sometime tomorrow--I'll let you know in a reply here when I finish. I removed the special divider for novelist because it wasn't rendering properly on mobile, but now that I know how to target mobile specifically in CSS I think I'll have it show up normally on desktop and be a normal divider on mobile.

Thank you so much for your prompt response and for your hard work on the theme. I really appreciate it! I am excited to see the updates.

The novelist divider has been added back in the latest update! Thank you for bringing it up, too. I am also very fond of the divider and nearly forgot that I removed it in the first place.


[feature request] Add MSI support in Azure

It would be great to have MSI support for Azure.
Official installed acs-engine supports MSI for VM authentication in Azure API. It would be great to have this support in external-dns too.
Code changes:

add new config option UseManagedIdentityExtension in azure provider
add following code block

PR https://github.com/kubernetes-incubator/external-dns/pull/578