Add function to identify cpu temperature for unkown sensors

With my setup, the core temperature could not be read correctly which leads to NA as CPU temperature.
I found this discussion of yours and tried to print my temperature via ps.util. The output is the following:
>>> ps.sensors_temperatures()
{'k10temp': [shwtemp(label='', current=22.25, high=70.0, critical=90.0)],
 'f71889a': [shwtemp(label='', current=35.0, high=85.0, critical=100.0),
             shwtemp(label='', current=41.0, high=85.0, critical=107.0),
             shwtemp(label='', current=32.0, high=70.0, critical=85.0)]}

As you can find here the k10temp does not return the real temperature for me, but more of a relative value to control fan speed.
Accordingly, I figured out that 'f71889a'[0] is my "real" cpu temperature which comes from the mainboard. Since 'f71889a' is a completely shitty identifier to search for (and I'm quite certain that it differs when you have a different CPU/Mainboard), I added a function which searches for the same identifier in ps.sensors_fans(). Because usually, your CPU also has a fan which has the same identifier as the temperature sensor.
I know this is kind of a hacky way which may not return the correct core temperature in any case, so I can understand if you don't want to merge this PR. Nevertheless, I think it doesn't really hurt to use this method as a last way if the previous identifiers 'coretemp' and 'k10temp' don't match.
So, here is my setup:
                                     ......            user@rechenknecht
     .,cdxxxoc,.               .:kKMMMNWMMMNk:.        ------------------
    cKMMN0OOOKWMMXo. ;        ;0MWk:.      .:OMMk.     OS: openSUSE Tumbleweed x86_64
  ;WMK;.       .lKMMNM,     :NMK,             .OMW;    Host: MSI 990FXA-GD65 (MS-7640 3.0)
 cMW;            'WMMMN   ,XMK,                 oMM'   Kernel: 5.12.0-1-default
.MMc               ..;l. xMN:                    KM0   Uptime: 1 hour, 36 mins
'MM.                   'NMO                      oMM   Packages: 3201 (rpm), 9 (flatpak)
.MM,                 .kMMl                       xMN   Shell: bash 5.1.4
 KM0               .kMM0. .dl:,..               .WMd   Resolution: 1920x1080, 1920x1080
 .XM0.           ,OMMK,    OMMMK.              .XMK    DE: GNOME 40.0
   oWMO:.    .;xNMMk,       NNNMKl.          .xWMx     WM: Mutter
     :ONMMNXMMMKx;          .  ,xNMWKkxllox0NMWk,      WM Theme: Adwaita
         .....                    .:dOOXXKOxl,         Theme: Adwaita [GTK2/3]
                                                       Icons: Adwaita [GTK2/3]
                                                       Terminal: terminator
                                                       CPU: AMD FX-8350 (8) @ 4.000GHz
                                                       GPU: NVIDIA GeForce GTX 1050 Ti
                                                       Memory: 3225MiB / 15878MiB

And the changes of this PR:

Add function cpuTempByFanMatching to identify cpu temperature by matching cpu name and fan name
Add function helperMatchFirstKey to compare cpu sensor names with fan sensor names
Call cpuTempByFanMatching and add result into temperature label

Hi,
I understood what you have done, but there is a little catch using this approach which flops the whole idea. The API psutil.sensors_fan() doesn't seems to work for all, even on my setup(pop os 20.10) psutil.sensors_fan() returns NONE. And yes it will fail. But need to look at some other approach in the future. Nevertheless thankyou, i will see if I can do anything about it.

 But in case psutil.sensors_fan() returns None, my implementation should just run into the except & not crash the application. So maybe it's still a good approach to identify the CPU temp on setups like my mine.
Otherwise a different library could be a good way or using the lm_sensors system command (although I think it's also not so nice to update the CPU temp every time via a system call).

What about checking which of ps.sensors_temperatures() returns multiple shwtemp objects? CPUs usually have multiple temperature sensors.
Ofc, it would be more of a hack than a confident way to determine the CPU temperature.

What about checking which of ps.sensors_temperatures() returns multiple shwtemp objects? CPUs usually have multiple temperature sensors.
Ofc, it would be more of a hack than a confident way to determine the CPU temperature.

As you can see from #22 many identifiers result in multiple shwtemp objects. I was thinking of working as lm_sensors work, i.e., finding how lm_sensors get all of its data by checking source code. If you check its source code that would be a lot of help.

What do you think about the following?
A. Read /sys/..

Make system call
Read /sys/class/thermal/thermal_zone0/temp

B. Use PySensors (Not actively maintained)

Use this easy-to-implement Python library which is available via pip
Uses lm_sensors data
Code link is not available anymore
Does not seem to be maintained anymore

C. Use PySensors (Actively maintained)

Use this not-so-easy-to-implement Python module which is not available via pip and has the same naming as the previous
Uses lm_sensors data as well
Code is still available and seems to be maintained actively on GitHub

I think option B is the easiest way to get reliable results. We just have to test whether it works fine. Option C would be cool since it is still maintained, but it's far more difficult to implement since we have to build it on our own.

Can you share what you have in the directory: /sys/class/thermal/ ? and also the thermalzone_x/tempandthermalzone_x/type`?
The fact that Option B is not maintained and even the source code is not accessible I don't think this is a good choice.
Option C is a lil difficult but we have access to source code and there are only 4-5 file to search to get the whole idea.
I would like to go with option A for the short term if we can get some similarities and if it is easy to get temperature.
As far as C, that might be a long term solution.
Nevertheless, I have following in /sys/class/thermal/:

Can you share what you have in the directory: /sys/class/thermal/ ? and also the thermalzone_x/tempandthermalzone_x/type`?
Also, Can you run the sample code here and share the output.

Unfortunately, I tested the /sys/class/thermal part on my notebook and not on my PC in the first place. So, when I have a look at the directory on my PC, it just gives me cooling_deviceX instead of thermal_zone:

None of them give me any temperature information:

According to this conversation, another approach is /sys/class/hwmon/hwmonX. This one gives me three devices:

On both of my systems (notebook and PC), the platform-symlink holds the CPU temperature. For my notebook, it is directly: /sys/class/hwmon/hwmon4/temp1_input. On my PC, I have to use the following: /sys/class/hwmon/hwmon2/device/temp1_input.
According to this, one could search for the symlink in /sys/class/hwmon/ which goes to platform and check whether it provides directly temp1_input or via device/temp1_input.
Still, idk how reliable this is. Nevertheless, the PySensors example code leads to the following output on my system:

@KrispyCamel4u what do you think about the hwmon approach?

This one does provide us with temps. But just to be sure, how the temperature label is determined to be of cpu in hwmon directory?

This one does provide us with temps. But just to be sure, how the temperature label is determined to be of cpu in hwmon directory?
By checking the symlink name. If it has platform in its path, it is the CPU.

@KrispyCamel4u shall I provide an implementation?

Hi, first of all sorry for the late reply I was busy with endterms.
I checked what you told me about checking the platform symlink and it works.
Yeah sure, you can implement that it will be a great help. Like as a second pref if already implemented code can't find the temps.

I can totally relate, it will take some time for me to get started with the implementation since I have some upcoming deadlines as well.
I will ping you when I'm done with the implementation - good luck with your endterms :v:

hi,
Are you still interested in providing CPU temperature patch?

Sure! But maybe we should revisit the approach.
I found pyspectator which could be an alternative to reading from hwmon directly. What do you think about it? Does it work for your hardware?

pyspectator uses these files to get temps:
files = [
'/sys/devices/LNXSYSTM:00/LNXTHERM:00/LNXTHERM:01/thermal_zone/temp',
'/sys/bus/acpi/devices/LNXTHERM:00/thermal_zone/temp',
'/proc/acpi/thermal_zone/THM0/temperature',
'/proc/acpi/thermal_zone/THRM/temperature',
'/proc/acpi/thermal_zone/THR1/temperature'
]

Hi,
I have gone through the pyspectotor approach and tried on my system. It works but at the same time, it doesn't.
In my system, from the files that pyspectator looks into only file: /sys/bus/acpi/devices/LNXTHERM:00/thermal_zone/temp' is found. This file show contains temperature related to acpitz(which is basically the CPU socket(or somewhere near on motherboard) sensor's label, but not for actual cpu temperature).
The temperature shown by pyspectator and lm-sensor/psutil differs in light loaded scenarios, when load on cpu rises(it gets hotter) the difference decreases and becomes almost equal to actual cpu package temp because the outside(cpu socket) becomes hot also as the cooling system takes more time to extract large amount of heat and both cpu and socket temperature gets to same value.
If in worst case, we wanna show this psutil is a better option to collect data.
What are the directories that is available on system and can you check what all these temp correspond to?


Issue with using custom templates to convert data in JSON format to FHIR bundle using $convert-data from ADF

Hello experts,
We have created a couple of simple templates that would convert the data in a JSON format to data in FHIR consumable bundle. These templates are loaded to an ACR and we are using the $convert-data feature of the FHIR store in ADF pipeline. The same templates when used locally on the machine with FHIR Converter extension on VS Code are working fine to give us the result but whereas when executed from ADF we get parsing error. Here is screenshot of the error,

Thank you for the support and help.

Hello @swapnilkotimw
A few questions:

Which version of the FHIR service are you using, OSS or Azure Health Data Services?
Are you able to make the convert call to the FHIR service directly?

In general the error indicates the template you are trying to find isn't in ACR you configured for the FHIR service.

Hello @dustinburson

I am using Azure Health Data Services.
I made a convert call from Postman as well but I get the same error message. Is this what you mean by directly? If not please let me know what other ways can I make a convert call on the FHIR Service.

Here is a screenshot of the templates when I pull the ACR image to a folder on my machine.

I have the templates loaded to 3 different artifacts. Neither of them worked for us.
Thank you. Regards,
Swapnil Koti


Tutorial format

Purpose

...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

What to Check
Verify that the following are valid

...

Other Information

Looks like I broke I-Authentication/sign-in during refactor to latest common code, will update here when it works

Looks like I broke I-Authentication/sign-in during refactor to latest common code, will update here when it works

Fixed.

@jeevanbalanmanoj I tried to add you as reviewer

all requested updates done.


Cannot quote None type in SimpleCondorPlugin - CMS_CampaignName

Impact of the bug
WMAgent
Describe the bug
While running a WMAgent release candidate validation, based on 2.2.4rc8, I see that JobSubmitter crashed when trying to cast a NoneType classad:
Python argument types in
    classad.classad.quote(NoneType)
did not match C++ signature:
    quote(std::string input)

This implementation has been recently done to provide the feature requested in this ticket:
https://github.com/dmwm/WMCore/issues/10914
How to reproduce it
>>> import classad
>>> classad.classad.quote(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
    classad.classad.quote(NoneType)
did not match C++ signature:
    quote(std::string input)

Expected behavior
If the value is of None type, we should set it to the undefined condor classad.
Additional context and error message
Full traceback is:
2023-09-29 22:37:59,960:140059245987584:ERROR:BossAirAPI:Unhandled exception while submitting jobs to plugin: SimpleCondorPlugin
Python argument types in
    classad.classad.quote(NoneType)
did not match C++ signature:
    quote(std::string input)
2023-09-29 22:38:00,085:140059245987584:ERROR:BaseWorkerThread:Error in worker algorithm (1):
Backtrace:
  <WMComponent.JobSubmitter.JobSubmitterPoller.JobSubmitterPoller object at 0x7f6222d5e970> <@========== WMException Start ==========@>
Exception Class: BossAirException
Message: Unhandled exception while submitting jobs to plugin: SimpleCondorPlugin
Python argument types in
    classad.classad.quote(NoneType)
did not match C++ signature:
    quote(std::string input)
        ClassName : None
        ModuleName : WMCore.BossAir.BossAirAPI
        MethodName : submit
        ClassInstance : None
        FileName : /data/srv/wmagent/v2.2.4rc8/sw/slc7_amd64_gcc630/cms/wmagentpy3/2.2.4rc8/lib/python3.8/site-packages/WMCore/BossAir/BossAirAPI.py
        LineNumber : 396
        ErrorNr : 0

Traceback:
  File "/data/srv/wmagent/v2.2.4rc8/sw/slc7_amd64_gcc630/cms/wmagentpy3/2.2.4rc8/lib/python3.8/site-packages/WMCore/BossAir/BossAirAPI.py", line 382, in submit
    localSuccess, localFailure = pluginInst.submit(jobs=jobsToSubmit,

  File "/data/srv/wmagent/v2.2.4rc8/sw/slc7_amd64_gcc630/cms/wmagentpy3/2.2.4rc8/lib/python3.8/site-packages/WMCore/BossAir/Plugins/SimpleCondorPlugin.py", line 162, in submit
    (sub, jobParams) = self.createSubmitRequest(jobsReady)

  File "/data/srv/wmagent/v2.2.4rc8/sw/slc7_amd64_gcc630/cms/wmagentpy3/2.2.4rc8/lib/python3.8/site-packages/WMCore/BossAir/Plugins/SimpleCondorPlugin.py", line 684, in createSubmitRequest
    jobParameters = self.getJobParameters(jobList)

  File "/data/srv/wmagent/v2.2.4rc8/sw/slc7_amd64_gcc630/cms/wmagentpy3/2.2.4rc8/lib/python3.8/site-packages/WMCore/BossAir/Plugins/SimpleCondorPlugin.py", line 544, in getJobParameters
    ad['My.CMS_CampaignName'] = classad.quote(job['campaignName'])

@amaltaro Thank you, I suppose this got switched at some point and I did not notice, when I resolving the Merge conflicts with the physics type PR


Adopt mandatory semantic versioning for TUF specification version

*This introduces changes that are backwards incompatible with metadata whose spec_version field does not contain a version number compliant with Semantic Versioning 2.0.0.
Fixes issue #:
Related to https://github.com/theupdateframework/specification/pull/51
Description of the changes being introduced by the pull request:

Changes tuf.formats.SPECIFICATION_VERSION_SCHEMA to require a "Semantic Versioning 2.0"-compliant version string. Before this PR any string was allowed.
Updates tuf.SPECIFICATION_VERSION, i.e. TUF specification compliance, to 1.0.0. Before this PR it was 1.0 which is not a valid version string anymore (see above).
Adopts sample and test metadata accordingly.
Adopts tests accordingly.
Mildly unrelated: Updates link to historical tuf-spec.

Please see commit messages for details, e.g. how the test and sample metadata was re-generated.
For review the repetitive metadata generation commits may be skimmed.
Please verify and check that the pull request fulfills the following
requirements:

[ ] The code follows the Code Style Guidelines
[ ] Tests have been added for the bug fix or new feature
[ ] Docs have been added for the bug fix or new feature

Thanks for the quick review, @JustinCappos and @mnm678! :)


Weird wildcard route behaviour when specifying methods

Hi,
while working on a new personal project, I've noticed a strange behaviour for wildcard routes:
I've configured the following route:
{
    "routes": [
        {
            "route": "/api/*",
            "methods": [
                "PUT",
                "POST",
                "DELETE"
            ],
            "allowedRoles": [
                "admin"
            ]
        }
    ]
}

In addition, in the project I have the following C# API:

GET /api/books (gets all books in Database)
GET /api/books/{id} (gets the book with {id} from the db)
POST, PUT and DELETE for the books are only mocked via proxies.json

The behaviour I'd expect from my understanding is that the GET requests should be available to all users, while POST, PUT and DELETE should require a logged in user with the admin role.
However, when activating this route, I get a 403 error for all methods when I'm unauthenticated.
Once i remove the route again, every method returns their backend success code.
I'm testing on Windows with<EMAIL_ADDRESS>Am I missing something or is there a better way to imlement such a authentication requirement?
I'd appreciate any help!

This should be fixed with #208 and released in v0.5.0.
@manekinekko While the rule now blocks requests correctly, it seems to return the wrong HTTP status code (returns 404 when not authenticated/authorized, instead of 401 or 403).
Repro: https://github.com/anthonychu/20210601-swa-cli-issue-190
swa start --api api
If you click the button and look at the browser dev tools, you'll see the POST request returns 404 instead of 401.

@anthonychu I will check that and update the e2e tests.

I sent a fix in https://github.com/Azure/static-web-apps-cli/pull/221


Use Android Work library for async broadcast handling

Build fails because the android example application also needs changes: https://github.com/UnifiedPush/android-example/pull/59

Closing, we are using a wakelock since v2.0.0. Workers can be used by app once the messages are received


Traversing trees better

now, a way to traverse a tree looks like this:
myTree.traversed.inOrder { it.key }
instead of old:
myTree.traverse(InOrder()) { it.key }
this solves a problem of creating a new instance of traversal each time which was just bad.
adds:

new class BSTTraversed
new property for AbstractBST val traversed: BSTTraversed

fixes:

traversals now accept null type nodes

all changes backward compatible, however i think it is better to get rid of traverse function for the next release, since it is now can be replace by traversed property

Compleletely agree with the sentiment. Reworked tests and removed deprecated traverse method.


Implemented k-NN regressor

Hi,
I created a base class for k-NN methods and derived KNNClassifier and KNNRegressor from there.
The KNNRegressor error is very high on the benchmarks, but it's normal in these kinds of settings.
Bye!

Looks good. Thanks.


nit: about empty log line when starting services

Motivation
nicer logs
Proposal
Add the newline only where it's needed.
Test Plan
cargo test -p linera-service
target/debug/linera --version

During your all-nighter you wrote the following comment:
// Starting with a new line is convenient for the clap annotation:
// `#[command(version = linera_base::VersionInfo::default_str())]`

When I moved the version string into this crate I preserved it because of that — but if you think it should go now I have no objections :)

If default_str is now formatted specifically for clap, maybe we should rename it to something else that makes that association clear?

If default_str is now formatted specifically for clap, maybe we should rename it to something else that makes that association clear?

Maybe default_clap_str then ?


BUG [UI] 'Password' and 'Confirm password' textboxes and 'Sign-in with Google' button size is not matched with the size of 'First name, Last name','Email' textboxes

Steps to reproduce:

Go to https://ita-social-projects.github.io/GreenCityClient/#/auth/sign-up
Verify the size of text boxes on the 'Sign Up' page
Actual result:
'Password' and 'Confirm password' textboxes and 'Sign-in with Google' button size is not matched with the size of 'First name, Last name','Email' textboxes
Expected result:
'Password' and 'Confirm password' textboxes and 'Sign-in with Google' button size is matched with the size of 'First name, Last name','Email' textboxes according to mockup
Environment:
OS: Windows 10
Browser: Mozilla Firefox 72.0.2 (64-біт)
Google Chrome Version 80.0.3987.132(64-bit)
#385

Not relevant


Fix docker images build

Fix docker images build #1778
🗣 Description
updated base images for backed, worker, docs and frontend for consistency (all use node 18) and in order to resolve a lot of vulnerabilities in the previous used images.
updated the version for python in worker dockerfile.
moved the docs to use a dockerfile in the parent folder (see docker-compose.yml).
updated dependencies.
💭 Motivation and context

🧪 Testing
Followed the steps in Quick start guide (https://docs.crossfeed.cyber.dhs.gov/dev/quickstart/#initial-setup) and everything built and ran as expected. Able to see the frontend and docs site.
✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All future TODOs are captured in issues, which are referenced
in code comments.
[ ] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[x] All relevant repo and/or project documentation has been updated
to reflect the changes in this PR.
[ ] Tests have been added and/or modified to cover the changes in this PR.
[ ] All new and existing tests pass.

✅ Pre-merge checklist

[ ] Revert dependencies to default branches.
[ ] Finalize version.

✅ Post-merge checklist

[ ] Create a release.

My local testing got stuck at building pandas in Python.  We will talk at the 10:00 scrum.

Because the context is the parent, it failed to build while building the
docs service, if you want, you can change it to point back to the original,
which I updated, but you will see that it fails
On Mon, Apr 10, 2023 at 6:54 AM Ashwin Ramaswami @.***>
wrote:

@.**** commented on this pull request.
In docker-compose.yml
https://github.com/cisagov/crossfeed/pull/1792#discussion_r1161739576:

@@ -59,7 +59,7 @@ services:
docs:
build:
context: ./

 dockerfile: ./docs/Dockerfile

 dockerfile: ./Dockerfile.docs

Why change this path?
—
Reply to this email directly, view it on GitHub
https://github.com/cisagov/crossfeed/pull/1792#pullrequestreview-1377563887,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATVZG4YQ257DFVD5N5SC2RDXAQGITANCNFSM6AAAAAAWYQYRPY
.
You are receiving this because you authored the thread.Message ID:
@.***>

3.10.10 wasn’t in the image, we have to use the latest image otherwise the
build will fail.
did you try running pip install -r worker/requirements.txt first?
On Mon, Apr 10, 2023 at 6:57 AM Ashwin Ramaswami @.***>
wrote:

@.**** commented on this pull request.
In backend/Dockerfile.worker
https://github.com/cisagov/crossfeed/pull/1792#discussion_r1161742186:

WORKDIR /app
-RUN apk add --update --no-cache wget build-base curl git unzip openssl-dev linux-headers python3=3.10.10-r0 python3-dev py3-pip ruby ruby-dev zlib-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev gcc musl-dev py3-pandas py3-scikit-learn cargo
+RUN apk add --update --no-cache wget build-base curl git unzip openssl-dev linux-headers python3=3.10.11-r0 python3-dev py3-pip ruby ruby-dev zlib-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev gcc musl-dev py3-pandas py3-scikit-learn cargo
Is it possible that it's failing because many packages do not have wheels
already available for Python 3.10.11? (and maybe better to downgrade to a
version of python where these wheels are already available?) just
thinking...
—
Reply to this email directly, view it on GitHub
https://github.com/cisagov/crossfeed/pull/1792#pullrequestreview-1377567993,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATVZG47BXJAMBSQO5LQQFYTXAQGUDANCNFSM6AAAAAAWYQYRPY
.
You are receiving this because you authored the thread.Message ID:
@.***>

Because the context is the parent, it failed to build while building the docs service, if you want, you can change it to point back to the original, which I updated, but you will see that it fails
…
On Mon, Apr 10, 2023 at 6:54 AM Ashwin Ramaswami @.> wrote: @.* commented on this pull request. ------------------------------ In docker-compose.yml <#1792 (comment)>: > @@ -59,7 +59,7 @@ services: docs: build: context: ./ - dockerfile: ./docs/Dockerfile + dockerfile: ./Dockerfile.docs Why change this path? — Reply to this email directly, view it on GitHub <#1792 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVZG4YQ257DFVD5N5SC2RDXAQGITANCNFSM6AAAAAAWYQYRPY . You are receiving this because you authored the thread.Message ID: @.***>

Ok, then in that case we should delete docs/Dockerfile.

Because the context is the parent, it failed to build while building the docs service, if you want, you can change it to point back to the original, which I updated, but you will see that it fails
…
On Mon, Apr 10, 2023 at 6:54 AM Ashwin Ramaswami @.> wrote<EMAIL_ADDRESS>commented on this pull request. ------------------------------ In docker-compose.yml <#1792 (comment)>: > @@ -59,7 +59,7 @@ services: docs: build: context: ./ - dockerfile: ./docs/Dockerfile + dockerfile: ./Dockerfile.docs Why change this path? — Reply to this email directly, view it on GitHub <#1792 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVZG4YQ257DFVD5N5SC2RDXAQGITANCNFSM6AAAAAAWYQYRPY . You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>
Ok, then in that case we should delete docs/Dockerfile.

removed the old docs dockerfile as per comment.

@colin-tim  localhost:4000 (docs site) looks like this for me. It should look like https://docs.crossfeed.cyber.dhs.gov/. Can you check and fix?

Fixed the issues raised by @epicfaace. See my latest push.
Waiting for approval to merge to master.

I'm seeing this same callback response on other builds too.

I'm seeing this same callback response on other builds too.

Do you mean that you're seeing it on the master branch / other branches?

I cloned a new version this morning and had to make the changes that were suggested here in backend/Dockerfile.worker.  We should probably talk tomorrow about this.
Johnng007 commented 3 days ago
updating Python 3 library to 3.10.11 r0 in backend Dockerfile.worker
and also updating FROM node:16.19.0-alpine3.17 as build to FROM node:16-alpine3.14 as build
worked for me. Now its Building.


Ansible backend and module

Still need to fix the behavior when no --hosts is passed.

I've implemented the host pattern matching too, allowing to write:
testinfra --hosts='ansible://web*'


iOS Application Hostname not found

Its Throwing an error saying Hostname method not found.

I added bridging headed file.
Header path set correctly.
For compile i am using Swift 4.
iOS 12.2
XCode 10.2.1 Version

Hostname method?  I'm not sure what you mean by this?  IIRC there isn't anything in this plugin for dealing with "hostname"


Disable hover effect on touch screens

Instead show all card content and make height dynamic.

This may require a js library to detect if on touch screen.


Create example policy data table for OR, VA

other states to consider: CO, OR, WA, CA, NY, VA, IL, TX

We might also want to consider non-tabular data structures to contain the original data if it's pretty heterogeneous. One possibility that might make sense is encoding it as JSON, with an explicit JSON Schema (so, nested dictionaries and lists with a particular overarching structure).


Bluealsa as proxy

Hi, I was curious If and how I can setup that bluealsa would work as proxy.
That I have speaker as sink all the time connected through bluetooth and If I want to play from it from my phone I connect to bluealsa device and it will forward audio to connected speaker.
both devices are paired with bluealsa I just don't know how to route it.
Thanks for advices.

You might try something like this: bluealsa-aplay -d <bluealsa-speaker-pcm> <phone-bt-mac>.  See bluealsa-aplay --help for more info.

Hi, thanks for this advise. Looks like good direction and I was able to route sound. But sometime bluealsa-aplay ends up with segfault or SIGABRT. And it can be laggy. Is there way to optimalize it?
Some error outputs I got
bluealsa-aplay: D: ../../utils/aplay.c:525: Creating PCM worker 38:30:F9:FC:D3:E5
bluealsa-aplay: D: ../../utils/aplay.c:801: Starting main loop
bluealsa-aplay: D: ../../utils/aplay.c:356: Starting PCM loop
D: ../../../src/asound/bluealsa-pcm.c:671: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Setting constraints
D: ../../../src/asound/bluealsa-pcm.c:368: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Initializing HW
D: ../../../src/asound/bluealsa-pcm.c:394: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: FIFO buffer size: 4096
D: ../../../src/asound/bluealsa-pcm.c:400: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Selected HW buffer: 6 periods x 16380 bytes <= 98284 bytes
D: ../../../src/asound/bluealsa-pcm.c:415: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Initializing SW
D: ../../../src/asound/bluealsa-pcm.c:415: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Initializing SW
D: ../../../src/asound/bluealsa-pcm.c:415: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Initializing SW
D: ../../../src/asound/bluealsa-pcm.c:437: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Prepared
D: ../../../src/asound/bluealsa-pcm.c:415: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Initializing SW
D: ../../../src/asound/bluealsa-pcm.c:437: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Prepared
D: ../../../src/asound/bluealsa-pcm.c:285: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Starting
D: ../../../src/asound/bluealsa-pcm.c:143: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: Starting IO loop: 10
ALSA lib ../../../src/asound/bluealsa-pcm.c:244:(io_thread) PCM FIFO write error: Bad addressbluealsa-aplay: malloc.c:2852: mremap_chunk: Assertion `((size + offset) & (GLRO (dl_pagesize) - 1)) == 0' failed.

or
D: ../../../src/asound/bluealsa-pcm.c:111: /org/bluealsa/hci0/dev_00_12_6F_D2_4B_3B/a2dpsrc/sink: IO thread cleanup
Neoprávněný přístup do paměti (SIGSEGV)

There have been many improvements to bluealsa pcm plugin and to bluealsa-aplay since this issue was raised. If possible, can you check whether this issue still exists in the latest code? I am unable to reproduce this, so will close this unless it is confirmed to still be a problem.

Closing as I am unable to reproduce this, and suspect the underlying problem (whatever it was) has now been fixed.


Change delete confirms to use custom dialogs

@rsinghal @beaudet
This pull request adds
Add dialog builder that use bootbox lib
Refactor all native confirm dialogs to use the dialog builder
Add translations
Fix more memory leaks
Add test to check the unsubscription when overlay is about to be destroyed
What I want to disscuss
What text should be shown when the user tries to save annotation without shapes.
What will be done in other pull request
Make the save without shapes option available as part of https://github.com/IIIF/mirador/issues/1028

Coverage increased (+0.3%) to 46.216% when pulling efcf6e29f425d6bb963a1ff74e7d7c855cfe666e on SirmaITT:feature/delete-confirmation-dialogs into 3a3a6af7d80ded15402de238defaaa5e8cf4f2bd on IIIF:annotation-work.

A few notes on the Text/translation file:
You can reuse the cancel key in the translation file, rather than creating another one.
I don't think you need a title (editModalSaveAnnotationWithNoShapesTitle).
And I would change There are no shapes related to this annotation. What shall we do? to There are no shapes related to this annotation. since the buttons explain their choices anyway.  @aeschylus @beaudet any thoughts on the text presented to the user?

Coverage increased (+0.3%) to 46.216% when pulling 103d9b62aed2c6839ea83dfbd83523048ce8b821 on SirmaITT:feature/delete-confirmation-dialogs into 3a3a6af7d80ded15402de238defaaa5e8cf4f2bd on IIIF:annotation-work.

I don't have strong feelings about this.  So long as it's clear to the user what is happening, what their options are, and the language that is selected is consistent with "Mirador vernacular", I think it will be fine.

@rsinghal Shall we merge this if you are okey with it, I look forward to create new pull request with a lot of new things.

Yup, looks good.


Add GenIso.fields

Addresses #295.
Included is a benchmark for comparison with productToTuple.
I also took the liberty of upgrading JMH from 0.2.4 to 0.2.5 while I was there. Hope that's ok.

Benchmark results are in. It's looks to be around 2x ~ 4x faster on average.
Benchmark                            (pIsos)  (pSubject)  Mode  Cnt     Score     Error   Units
ProductIsoBench.get                   fields       mono2  avgt   25    22.314 ±   0.115   ns/op
ProductIsoBench.get                shapeless       mono2  avgt   25    84.764 ±   0.681   ns/op
ProductIsoBench.get                   fields       mono4  avgt   25    32.396 ±   0.644   ns/op
ProductIsoBench.get                shapeless       mono4  avgt   25   144.348 ±   0.753   ns/op
ProductIsoBench.get                   fields       mono8  avgt   25    48.623 ±   0.275   ns/op
ProductIsoBench.get                shapeless       mono8  avgt   25   155.616 ±   6.728   ns/op
ProductIsoBench.get                   fields       poly2  avgt   25    18.467 ±   0.108   ns/op
ProductIsoBench.get                shapeless       poly2  avgt   25    81.660 ±   0.292   ns/op
ProductIsoBench.get                   fields       poly4  avgt   25    23.064 ±   1.233   ns/op
ProductIsoBench.get                shapeless       poly4  avgt   25   130.844 ±   2.786   ns/op
ProductIsoBench.get                   fields       poly8  avgt   25    35.786 ±   0.103   ns/op
ProductIsoBench.get                shapeless       poly8  avgt   25   152.151 ±   0.463   ns/op
ProductIsoBench.reverseGet            fields       mono2  avgt   25    24.791 ±   0.590   ns/op
ProductIsoBench.reverseGet         shapeless       mono2  avgt   25    96.771 ±   1.465   ns/op
ProductIsoBench.reverseGet            fields       mono4  avgt   25    38.037 ±   0.237   ns/op
ProductIsoBench.reverseGet         shapeless       mono4  avgt   25    88.633 ±   0.413   ns/op
ProductIsoBench.reverseGet            fields       mono8  avgt   25    58.138 ±   0.347   ns/op
ProductIsoBench.reverseGet         shapeless       mono8  avgt   25   165.930 ±   0.450   ns/op
ProductIsoBench.reverseGet            fields       poly2  avgt   25    27.232 ±   3.852   ns/op
ProductIsoBench.reverseGet         shapeless       poly2  avgt   25    99.029 ±   0.799   ns/op
ProductIsoBench.reverseGet            fields       poly4  avgt   25    30.926 ±   1.935   ns/op
ProductIsoBench.reverseGet         shapeless       poly4  avgt   25   170.004 ±   1.840   ns/op
ProductIsoBench.reverseGet            fields       poly8  avgt   25    44.156 ±   0.111   ns/op
ProductIsoBench.reverseGet         shapeless       poly8  avgt   25   169.203 ±   7.615   ns/op

It looks great but there seems to be an issue with scala 2.10

Ok, I didn't even realise that Scala 2.10 was choking and vomiting all over itself with the new macro. Lucky for TravisCI, thanks for pointing that out to me.
So, I've made the macros work with Scala 2.10, Travis is green and we should be good now. For reference I also opened a macro-compat ticket: https://github.com/milessabin/macro-compat/issues/25

Thank you very much! :+1:


Issue at the Services button

getting a white box initially, not able to see the text to select

@khushi-joshi-05 please assign me this issue

@sunny0625 , @khushi-joshi-05 please assign me this issue

@sunny0625 , @khushi-joshi-05 please assign me this issue


Feature Suggestion for Code Editor: "Jump to last edit location"

I have a simple feature suggestion, that I've found to be so very useful in another code editor.
Make Ctrl + Shift + Backspace to jump to previously edited location in code.
E.g. you edit some code somewhere... then you scroll/jump to another file, perhaps to simply look at some code for reference. It can be somewhat painful to go back where you were, particularly if you were editing the same file. I've found this shortcut to solve that issue.

@Zylann While those do scroll through the edited files history, it seems that OP is also asking for a feature to do that in the same file.

@YeldhamDev Yes, exactly, which is a major point of this suggestion. In addition, the arrows also don't seem to remember the scroll position based on my quick testing.
Maybe this is one of those things that might be difficult to see the point of (?) depending of personal coding preferences and/or if one simply hasn't used such a feature more.
To clarify:

I add some code to function foobar()
I realize/remember that I need to look somewhere as a reference / copypaste code from somewhere
So I go there, copy/examine some code, and now I need to go back
I either have to use the scrollbar, or CTRL + F to find where I just was editing code, if it was in the same script. And this breaks at least my little "train of thought" quite effectively

This fourth step could be eliminated simply by jumping back to the last edit location via a shortcut
A bonus of this I've found is that if you leave your computer for some time, and then return after a while, possibly having forgotten what you were doing, you can simply tap Ctrl+Shift+Backspace to remind yourself.

You can already do this with Ctrl+Z -> Ctrl+Y.

If this is implemented, this could be bound to supplementary mouse buttons (BUTTON_XBUTTON1 and BUTTON_XBUTTON2), similar to JetBrains IDEs and Web browsers.

So I recently noticed that this is partially implemented (although I guess it's a result of a bug). When you Ctrl+Click a variable, the editor will scroll to it's definition, but you can use the back arrow (the one that returns to last script) and it will return to your previous position. Heh.


How to retry ext_authz gRPC internal request when we retry on a upstream cluster

Title: How to retry ext_authz gRPC internal request when we retry on a upstream cluster
Description:

When I set a retry_policy on a virtual host (or route) to an upstream cluster with an ext_authz filter, I see the retry requests only for the upstream cluster. I would like for each retry that envoy call/retry also the gRPC service of the ext_authz filter. How could we achieve this ? We thought of enabling clear_route_cache to true in the ext_authz filter config but it did not work as expected. We thought of a more complex construction with nested listeners, the retry policy being on the inbound listener and the ext_authz filter being on the outbound listener. Is there another way to achieve the same goal?

Here a repository, reproducing the issue: https://github.com/jeremybaumont/envoy-examples/tree/master/envoy-ext-authz-retry

Start the docker compose in one terminal:

~/code/envoy-examples/envoy-ext-authz-retry > make run

Make request to trigger the retry policy and observer stats:

~/code/envoy-examples/envoy-ext-authz-retry > curl -X POST localhost:8001/reset_counters     λ:master  [   ]
OK

~/code/envoy-examples/envoy-ext-authz-retry > curl -s localhost:8001/stats | grep -e 'cluster.ingress_auth.upstream_rq_total' -e 'cluster.upstream.upstream_rq_total' -e 'cluster.upstream.upstream_rq_retry:'
cluster.ingress_auth.upstream_rq_total: 0
cluster.upstream.upstream_rq_retry: 0
cluster.upstream.upstream_rq_total: 0

~/code/envoy-examples/envoy-ext-authz-retry > curl -v  --header "x-envoy-retry-on: retriable-status-codes" --header "x-envoy-retriable-status-codes: 597" --header "x-auth-scenario-name: allow-and-add-header" --request GET http://localhost:8080/status/597

Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying <IP_ADDRESS>:8080...
* Connected to localhost (<IP_ADDRESS>) port 8080 (#0)
> GET /status/597 HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.85.0
> Accept: */*
> x-envoy-retry-on: retriable-status-codes
> x-envoy-retriable-status-codes: 597
> x-auth-scenario-name: allow-and-add-header
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 597 Unknown
< server: envoy
< date: Thu, 29 Sep 2022 02:47:12 GMT
< content-type: text/html; charset=utf-8
< access-control-allow-origin: *
< access-control-allow-credentials: true
< content-length: 0
< x-envoy-upstream-service-time: 1
<
* Connection #0 to host localhost left intact

~/code/envoy-examples/envoy-ext-authz-retry > curl -s localhost:8001/stats | grep -e 'cluster.ingress_auth.upstream_rq_total' -e 'cluster.upstream.upstream_rq_total' -e 'cluster.upstream.upstream_rq_retry:'
cluster.ingress_auth.upstream_rq_total: 1
cluster.upstream.upstream_rq_retry: 1
cluster.upstream.upstream_rq_total: 2

Envoy logs:
envoy      | [2022-09-29 02:47:12.205][33][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:75] [C20][S6374685493478763648] ext_authz filter calling authorization server
envoy      | [2022-09-29 02:47:12.205][33][debug][router] [source/common/router/router.cc:470] [C0][S10921197175628222986] cluster 'ingress_auth' match for URL '/envoy.service.auth.v3.Authorization/Check'
envoy      | [2022-09-29 02:47:12.205][33][debug][router] [source/common/router/router.cc:673] [C0][S10921197175628222986] router decoding headers:
envoy      | ':method', 'POST'
envoy      | ':path', '/envoy.service.auth.v3.Authorization/Check'
envoy      | ':authority', 'ingress_auth'
envoy      | ':scheme', 'http'
envoy      | 'te', 'trailers'
envoy      | 'grpc-timeout', '5000m'
envoy      | 'content-type', 'application/grpc'
envoy      | 'x-envoy-internal', 'true'
envoy      | 'x-forwarded-for', '<IP_ADDRESS>'
envoy      | 'x-envoy-expected-rq-timeout-ms', '5000'
envoy      |
envoy      | [2022-09-29 02:47:12.205][33][debug][client] [source/common/http/codec_client.cc:57] [C21] connecting
envoy      | [2022-09-29 02:47:12.205][33][trace][router] [source/common/router/upstream_request.cc:256] [C0][S10921197175628222986] buffering 403 bytes
envoy      | [2022-09-29 02:47:12.205][33][debug][client] [source/common/http/codec_client.cc:89] [C21] connected
envoy      | [2022-09-29 02:47:12.205][33][debug][router] [source/common/router/upstream_request.cc:420] [C0][S10921197175628222986] pool ready
envoy      | [2022-09-29 02:47:12.205][33][debug][router] [source/common/router/router.cc:1331] [C0][S10921197175628222986] upstream headers complete: end_stream=false
envoy      | [2022-09-29 02:47:12.205][33][debug][client] [source/common/http/codec_client.cc:126] [C21] response complete
envoy      | [2022-09-29 02:47:12.206][33][debug][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:254] [C20][S6374685493478763648] ext_authz is clearing route cache
envoy      | [2022-09-29 02:47:12.206][33][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:259] [C20][S6374685493478763648] ext_authz filter added header(s) to the request:
envoy      | [2022-09-29 02:47:12.206][33][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:261] [C20][S6374685493478763648] 'authorization':'Basic some-basic-credentials'
envoy      | [2022-09-29 02:47:12.206][33][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:289] [C20][S6374685493478763648] ext_authz filter removed header(s) from the request:
envoy      | [2022-09-29 02:47:12.206][33][debug][router] [source/common/router/router.cc:470] [C20][S6374685493478763648] cluster 'upstream' match for URL '/status/597'
envoy      | [2022-09-29 02:47:12.206][33][debug][router] [source/common/router/router.cc:673] [C20][S6374685493478763648] router decoding headers:
envoy      | ':authority', 'localhost:8080'
envoy      | ':path', '/status/597'
envoy      | ':method', 'GET'
envoy      | ':scheme', 'http'
envoy      | 'user-agent', 'curl/7.85.0'
envoy      | 'accept', '*/*'
envoy      | 'x-auth-scenario-name', 'allow-and-add-header'
envoy      | 'x-forwarded-proto', 'http'
envoy      | 'x-request-id', '9560b3a0-bcce-4dd6-b955-39b291c3a283'
envoy      | 'authorization', 'Basic some-basic-credentials'
envoy      | 'x-envoy-expected-rq-timeout-ms', '15000'
envoy      |
envoy      | [2022-09-29 02:47:12.206][33][debug][client] [source/common/http/codec_client.cc:57] [C22] connecting
envoy      | [2022-09-29 02:47:12.206][33][debug][client] [source/common/http/codec_client.cc:89] [C22] connected
envoy      | [2022-09-29 02:47:12.206][33][debug][router] [source/common/router/upstream_request.cc:420] [C20][S6374685493478763648] pool ready
envoy      | [2022-09-29 02:47:12.206][33][debug][client] [source/common/http/codec_client.cc:126] [C22] response complete
envoy      | [2022-09-29 02:47:12.206][33][debug][router] [source/common/router/router.cc:1331] [C20][S6374685493478763648] upstream headers complete: end_stream=true
envoy      | [2022-09-29 02:47:12.206][33][debug][router] [source/common/router/router.cc:1749] [C20][S6374685493478763648] performing retry
envoy      | [2022-09-29 02:47:12.206][33][debug][router] [source/common/router/upstream_request.cc:420] [C20][S6374685493478763648] pool ready
envoy      | [2022-09-29 02:47:12.207][33][debug][client] [source/common/http/codec_client.cc:126] [C22] response complete
envoy      | [2022-09-29 02:47:12.207][33][debug][router] [source/common/router/router.cc:1331] [C20][S6374685493478763648] upstream headers complete: end_stream=true
envoy      | [2022-09-29 02:47:12.207][33][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:177] [C20][S6374685493478763648] ext_authz filter has 0 response header(s) to add and 0 response header(s) to set to the encoded response:
envoy      | [2022-09-29 02:47:14.208][33][debug][client] [source/common/http/codec_client.cc:107] [C22] disconnect. resetting 0 pending requests

How do you specify ext_auth service? You can configure retries for both envoy_grpc and google_grpc cases.

@yanavlasov Thanks for the quick answer :+1: . We defined the ext_authz filter like the following with envoy_grpc:
                - name: "envoy.filters.http.ext_authz"
                  typed_config:
                    "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
                    grpc_service:
                      envoy_grpc:
                        cluster_name: "egress_auth"
                      timeout: "5s"
                    failure_mode_allow: false
                    status_on_error:
                      code: 502
                    transport_api_version: "V3"

I am reading https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/grpc_service.proto#envoy-v3-api-msg-config-core-v3-grpcservice-envoygrpc but I am not following you :coneofshame:. How would you configure the retries ?

Thanks, that is a good idea of custom filter to perform this kind of retry. And thanks for confirming our thoughts that their were no native way to do what we were trying to do since like you mention "retries are handled by the terminal router filter and on [retries] the filter chain is not traversed again."

I think we can close this issue, if somebody has a better idea, feel free to re-open/comment.


how can i plot the right graph?

hi Mellissa!
I want to plot a different color graph for each day.
So I made two codes.
The first one is

`import pysplit
trajgroup = pysplit.make_trajectorygroup(r'C:\Users\lg\Desktop\trajectory\jeju06*.txt')
with open(r"C:\Users\lg\Desktop\trajectory\jeju060100-500.txt"),open(r"C:\Users\lg\Desktop\trajectory\jeju060200-500.txt"),open(r"C:\Users\lg\Desktop\trajectory\jeju060300-500.txt") as traj:
contents = traj.readlines()
color_dict = {1 : 'red',
2 : 'green',
3 : 'blue'}
for traj in trajgroup :
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = color_dict[day]
mapcorners =  [0, 00, 160, 80]
standard_pm = None
bmap_params = pysplit.MapDesign(mapcorners, standard_pm)
bmap = bmap_params.make_basemap()
for traj in trajgroup[::1]:
print(traj.filename)
bmap.plot(*traj.path.xy, c=traj.trajcolor, latlon=True, zorder=20)`

_
And second one is

`import pysplit
trajgroup = pysplit.make_trajectorygroup(r'C:\Users\lg\Desktop\trajectory\jeju06*.txt')
with open(r"C:\Users\lg\Desktop\trajectory\jeju060100-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'red'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060200-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'orange'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060300-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'yellow'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060400-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'green'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060500-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060600-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'black'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060700-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'purple'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060800-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju060900-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju061000-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju061100-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju061200-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju061300-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
with open(r"C:\Users\lg\Desktop\trajectory\jeju061400-500.txt") as traj:
contents = traj.readlines()
last_timepoint = 9
data = contents[last_timepoint].split()
day  = int(data[4])
traj.trajcolor = 'blue'
mapcorners =  [0, 00, 160, 80]
standard_pm = None
bmap_params = pysplit.MapDesign(mapcorners, standard_pm)
bmap = bmap_params.make_basemap()
for traj in trajgroup:
print(traj.filename)
bmap.plot(*traj.path.xy, c=traj.trajcolor, latlon=True, zorder=20)
`

then Its results are shown in the following figures.

How can I make the right graph?
Best Regards
Chaelin.

Hi Chaelin,
The trajectories loaded in the with open() statements have no connection to the Trajectory objects initiated in trajgroup, despite being derived from the same files.  This is why in the second example none of the colors are applied.  In the first example, you get all blue trajectories because the third file is opened, contents is created and persists, and trajectory color is assigned to all Trajectory objects in trajgroup based on these contents from that one trajectory.
What you need to do is inspect the Trajectory objects in your TrajectoryGroup and assign colors to them, NOT reopen and parse the original files.   To make your second example work:
import pysplit
import pandas as pd

trajgroup = pysplit.make_trajectorygroup(r'C:\Users\lg\Desktop\trajectory\jeju06*.txt')

color_dict = {1 : 'red', 2 : 'orange', 3 : 'yellow', 4 :'green', 6 : 'purple', 7 : 'black'}

for traj in trajgroup:
    try:
        traj.trajcolor = color_dict[pd.to_datetime(traj.data.DateTime[0]).day]
    except KeyError:
        traj.trajcolor = 'blue'

And then plot.  The important bit here is that you can get the start day of a Trajectory object via pd.to_datetime(traj.data.DateTime[0]).
Hope that helps!


[otvar] Rule conditionsets conflict with OT layout (shaping)

Considering this .designspace excerpt:
    <rule name="ra_crossing">
      <conditionset>
        <condition name="weight" minimum="625" maximum="700"/>
      </conditionset>
      <sub name="uni170D" with="uni170D.avar"/>
    </rule>

And this OTLayout feature:
# Ra to archaic Ra
feature hist {
  lookup hist_1 {
    sub uni170D by uni171F;
  } hist_1;
} hist;

Why, when hist is active, does a wght ≥ 625 cause uni170D, shaped to uni171F, to become uni170D.avar?
To confirm that this bug exists, open https://ctrlcctrlv.github.io/baybayin/ , type ra as input, tick "Archaic ra" checkbox, and increase weight above 625.

because the rules in rvrn are processed first before any others, that's how rvrn works. You should add processing="last" attribute to your <rules>  element, this will make fonttools use a different feature tag (rclt) that respects the lookup order and will be applied last.
https://fonttools.readthedocs.io/en/latest/designspaceLib/readme.html#rules-element

Thank you :-) I was having trouble figuring out if this was a bug, or intended behavior I wasn't understanding.

By the way @anthrotype , part of the reason this is not intuitive is that it's on the <rules> element and not the conditionsets. Just something to think about: it seems strange that either all the rules must be processed last or none of the rules must be; unless there can be multiple <rules>? 🤔  But designspaceLib doesn't support that.

What .designspace supports is a high level simplification of what is theoretically possible with FeatureVariations, based on use cases we were aware of at the time. While what you suggest is possible, it would make everything a lot more complex.
Do you have a specific use case in mind where this could be handy?

@justvanrossum Thanks for replying. Not at present, but I reserve the right to think of one!
🤔 💭
🤔 💭
🤔 💭


refactor: fix typo in repo.py

successfull -> successful

Thanks!

Codecov Report

Merging #349 (b265885) into main (1c8413c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #349   +/-   ##
=======================================
  Coverage   94.31%   94.31%
=======================================
  Files          75       75
  Lines        3078     3078
=======================================
  Hits         2903     2903
  Misses        175      175

Flag
Coverage Δ

unittests
94.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

ggshield/scan/repo.py
100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Invite links give blank gray screen if viewed when unauthenticated

Sample link (open in session that is not authenticated):
http://email.mail.lbry.com/c/eJx1jsEKgzAQRL8m3irbJCbmkIMg_Q1J4oopiUqMLf37Ki32VFgWdngzO71mMBiKhdcUKAAHtm_JeXktW9FywSiFqhGtEkA4RONDGWx6lW6OxailBQd1X3NujZNSVGLgVlmllKjUUMki6DHnZSWsIfS2z7zgdAYcErv56eEzEtYSKrYcu4i93-J-4_HtK67zltwBfegu4dOkvnPB-GhswCLpOyaMr73k2S_rjHEJJuPln-2HvAHQM1ZY

Probably same as  https://github.com/lbryio/lbry-desktop/issues/3861...


Repository management paths (new download url)

When I turn on repo management, I get the following error:
Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install elasticsearch' returned 1: No Presto metadata available for elasticsearch

Error downloading packages:
  elasticsearch-1.6.0-1.noarch: [Errno 256] No more mirrors to try.
Wrapped exception:
Execution of '/usr/bin/yum -d 0 -e 0 -y install elasticsearch' returned 1: No Presto metadata available for elasticsearch

I believe, that the download site has changed, somehow this would need to be adjusted in 'repo.pp'
(https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html)
[elasticsearch-1.6]
name=Elasticsearch repository for 1.6.x packages
baseurl=http://packages.elastic.co/elasticsearch/1.6/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

That's weird since the old stuff still works for me and in my acceptance tests.
That said i do need to update it in the repo file :-)
Thanks for reminding me.

I believe that 'yum repolist' works.
I believe that 'yum install elasticsearch' doesn't work.
Of course, there is the same problem with the logstash 1.5 repo.

@driegel i do use the repo's as install source so its very weird its not working for you.
In any case i'm changing it now so should be working soon in the master branch.

I just downloaded the puppet module this morning.  I get the exact same error when running within vagrant (vagrant provision):
==> default: Wrapped exception:
==> default: Execution of '/usr/bin/yum -d 0 -e 0 -y install elasticsearch-1.6.0-1' returned 1: Error Downloading Packages:
==> default:   elasticsearch-1.6.0-1.noarch: failure: elasticsearch-1.6.0.noarch.rpm from elasticsearch: [Errno 256] No more mirrors to try.
When I enter the vagrant box (vagrant ssh) and search for it in yum, it exists:
[vagrant@hydrabox ~]$ sudo yum list | grep elasticsearch
elasticsearch.noarch                    1.6.0-1                     elasticsearch
The only way to install it is to install without a version:
sudo yum install elasticsearch
So this issue still exists.


Fixes to WFC Video Metadata

Fixed some missing/irrelevant links.
You might also want to update the description (timestamps and links): (also added gh repo link which isn't added by the script)
Straight out of quantum mechanics, Wave Function Collapse is an algorithm for procedural generation of images. In this video (recorded over 3 live streams) I attempt the tiled model and explore a variety of solutions to the algorithm in JavaScript with p5.js. https://thecodingtrain.com/challenges/171-wave-function-collapse

💻 Github Repo: https://github.com/CodingTrain/Wave-Function-Collapse
🕹 p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/_kbz6Xq7l

🎥 Previous video: https://www.youtube.com/watch?v=0zac-cDzJwA&list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

Links discussed in this video:
🔗 Original Github WFC: https://github.com/mxgmn/WaveFunctionCollapse
🔗 WFC in Processing: https://discourse.processing.org/t/wave-collapse-function-algorithm-in-processing/12983

Other videos mentioned in this video:
🎥 Solving Wordle with Information Theory: https://youtu.be/v68zYyaEmEA
🎥 Pixel Array: https://youtu.be/nMUMZ5YRxHI
🎥 Arrow Function: https://youtu.be/mrYMzpbFz18
🎥 Higher Order Array Functions: https://youtu.be/H4awPsyugS0
🎥 Transformations in p5.js: https://youtu.be/o9sgjuh-CBM
🎥 Oskar Stalberg - Wave Function Collapse in Bad North: https://youtu.be/0bcZb-SsnrA

Timestamps:
0:00 Wave Function Collapse
2:00 Entropy in sudoku
5:41 Mapping sudoku to WFC
9:24 Starting the code
11:05 Manual collapsing
13:30 Collapse least entropic cell
18:47 Update entropy after collapse
22:45 Setting up neighbor rules
24:50 Implementing rules for next collapse
36:28 Explain neighbor rules
39:26 Redefine tiles as a class
44:57 Generate rules from tiles
55:40 Using new circuit board tileset
1:00:40 Day 2: assymetrical tiles
1:01:56 Redefining value for edges
1:06:53 Adding edges to code
1:10:05 Change adjacency for assymetry
1:12:06 First assymetric WFC image
1:12:40 Restart if no valid cell found
1:15:48 Suggestions for future continuations
1:18:05 Outro

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://discord.gg/hPuGy2g
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
📚 Books: https://www.amazon.com/shop/thecodingtrain
🖋 Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/

🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org

📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

Thanks for this! I'm planning to go through the whole video later tonight and add a lot more links, etc. This is super helpful!!


Clients not receiving group messages, yet they're reported to be group members

Describe the bug
We have a front-end web server that negotiates with SignalR for users and manages their group memberships. We also have a back-end service that is blindly firing events to various groups based on external events.
While everything is running, if I use the API to check if a test user is in a group that they should be in, SignalR says they are a member however they never receive messages sent to the group. But if I manually add the user using the MessagePublisher sample project, the client automatically starts receiving messages properly.
Are there any situations where SignalR would say a user is a member and yet they wouldn't receive messages?
To Reproduce
Setup

Use Azure SignalR in Serverless mode.
Use Microsoft.Azure.SignalR.Management to manage hubs.
Have a client already connected with the userId and listening for messages.return ServiceManager.GenerateClientAccessToken(hubName, userId);

Steps

Add user to UserGroup.await hub.UserGroups.AddToGroupAsync(userId, groupName, ct);

Send message to Group from the backend.await hub.Clients.Group(groupName).SendCoreAsync(methodName, args, ct);

Client doesn't receive the message.

However, if I add the user to the group via a debug app or something else then the user starts receiving messages.
Further technical details

Microsoft.Azure.SignalR v1.5.1
Microsoft.Azure.SignalR.Management v1.5.1
@microsoft/signalr v3.1.10

UserGroups.AddToGroupAsync is a fire-and-forget operation and await it does not guarantee the action is completed. If you need to do some thing right after the AddToGroupAsync, please use Groups.AddToGroupAsync() to add the connection to group.
@wanlwanl @vwxyzh I think we can re-implement UserGroups.AddToGroupAsync to spin-check if UserGroups.IsUserInGroup so that it completes only when the user is added to the group, thoughts?

No matter how long I wait, the clients will not receive messages. Also, the IsUserInGroup function is returning true which is extra confusing.

I'm really at a loss for how to continue debugging this since there is so little insight into what is going on.
Besides any suggestions for this issue at hand, do you have any general advice for how to debug issues with this management package and Azure SignalR in serverless mode? I haven't been able to find any real info. I've seen mentions of diagnostic clients but all the docs say is "TODO".

await hub.UserGroups.AddToGroupAsync(userId, groupName, ct);

When is this get called? Right after negotiation?
I tried this Management sample with some minor changes but failed to repro the issue, would you mind providing a minimum repro-able project?
My steps trying to repro but not:

Update the [NegotiationServer] with one more step before response to add the user to group1:

 var hubContext = await _serviceManager.CreateHubContextAsync(hub);
 await hubContext.UserGroups.AddToGroupAsync(user, "group1");

https://github.com/vicancy/AzureSignalR-samples/blob/8232f3625598cc4cfb75b8e4419bf099c8f1537f/samples/Management/NegotiationServer/Controllers/NegotiateController.cs#L33

Follow the instructions to start the NegotiationServer, the SignalRClient, and the MessagePublisher

In MessagePublisher, send to the group using: send group group1 hello

The client received the message successfully

Hi @BryceBarbara
We just updated the documentation for diagnostic logs, you can find the doc for diagnostic client inside it.
To mark a client as diagnostic client, the current way is to use Microsoft.Azure.SignalR packge, you can make it as a negotiate server like this (workaround)  https://github.com/Azure/azure-signalr/issues/1115#issue-745419640,
Or please wait for a few days, I will make a preview version of Microsoft.Azure.SignalR.Management SDK to mark diagnostic client as soon as possible.
To troubleshoot, you can

enable the message log

if you are in production environment, uncheck Messaging in diagnostic settings blade (enable collect-partial behavior), and use diagnostic client
if you are in development environement, check Messaging in diagnostic settings blade (enable collect-all behavior)

enable logging in Management SDK (pass ILoggerFactory to Task<IServiceHubContext> CreateHubContextAsync(string hubName, ILoggerFactory loggerFactory = null, CancellationToken cancellationToken = default))
check logs

if the particular user joins the particular group
if the group message is sent to the right group
if the particular user joins the particular group before sending group messages

If you still have other questions, please send you resource ID of SignalR service and problem start time and end time (it's better less than 10 minutes) to wanl [at] microsoft.com, I will help you to troubleshoot.

Repro repo: https://github.com/BryceBarbara/AzureSignalRUserGroupsIssue
The readme in the repo should walk you through how to reproduce this issue. While testing this on my end, I was only able to reproduce it when using our Prod Azure SignalR service which is on the Standard pricing tier. Our dev SignalR service on the Free tier did not display this odd behavior.
To summarize what I had to do to cause the issue:

Switched NegotiationServer to using Persistent transport.
NegotiationServer removes user from all groups prior to assigning groups
Add an endpoint that manages groups after the client connects

Thanks for your repo. For now, the operations about user join/leave group are fire-and-forget. Too soon operation of leave then join group will cause the wierd status of the user in/out of some group. For now the workaround is to to wait a little time (maybe one second) to between user-group action operations (user join/leave group) and wait a short time before sending message to group. We are trying to fix this issue. Another workaround is to use connection-group operations as @Liangying<EMAIL_ADDRESS>mentioned.
Thanks,
Wanpeng Li

From: Bryce Barbara<EMAIL_ADDRESS>Sent: Wednesday, November 25, 2020 2:57:57 AM
To: Azure/azure-signalr<EMAIL_ADDRESS>Cc: Wanpeng Li<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-signalr] Clients not receiving group messages, yet they're reported to be group members (#1125)
Repro repo: https://github.com/BryceBarbara/AzureSignalRUserGroupsIssuehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBryceBarbara%2FAzureSignalRUserGroupsIssue&data=04|01|Wanpeng.Li%40microsoft.com|d4f78d1cac6c47d49dc908d890aadbdb|72f988bf86f141af91ab2d7cd011db47|1|0|637418410796494128|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=OH5Vk3dgy8zmg0PONX4tfsINk0bcTvz61ndIxyJBey0%3D&reserved=0
The readme in the repo should walk you through how to reproduce this issue. While testing this on my end, I was only able to reproduce it when using our Prod Azure SignalR service which is on the Standard pricing tier. Our dev SignalR service on the Free tier did not display this odd behavior.
To summarize what I had to do to cause the issue:

Switched NegotiationServer to using Persistent transport.
NegotiationServer removes user from all groups prior to assigning groups
Add an endpoint that manages groups after the client connects

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-signalr%2Fissues%2F1125%23issuecomment-733171278&data=04|01|Wanpeng.Li%40microsoft.com|d4f78d1cac6c47d49dc908d890aadbdb|72f988bf86f141af91ab2d7cd011db47|1|0|637418410796504087|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=89Pyx2VTjZREuOZ%2B%2F2bOWFfvtykCQ0uMr4XjDD%2BdukQ%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJDW7OLLEJ6JQAQRX44TF63SRP63LANCNFSM4UACEC4Q&data=04|01|Wanpeng.Li%40microsoft.com|d4f78d1cac6c47d49dc908d890aadbdb|72f988bf86f141af91ab2d7cd011db47|1|0|637418410796504087|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=Qu2G2oUZdi5nJnu3%2BwTlGD%2FcmrpG8duuAwGR3ub5XsU%3D&reserved=0.

Is it for the group name to contain “*”?
Thanks,
Liangying

From: Wanpeng Li<EMAIL_ADDRESS>Sent: Wednesday, November 25, 2020 7:18:50 PM
To: Liangying Wei<EMAIL_ADDRESS>Azure/azure-signalr<EMAIL_ADDRESS>Azure/azure-signalr<EMAIL_ADDRESS>Cc: Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-signalr] Clients not receiving group messages, yet they're reported to be group members (#1125)
Thanks for your repo. For now, the operations about user join/leave group are fire-and-forget. Too soon operation of leave then join group will cause the wierd status of the user in/out of some group. For now the workaround is to to wait a little time (maybe one second) to between user-group action operations (user join/leave group) and wait a short time before sending message to group. We are trying to fix this issue. Another workaround is to use connection-group operations as @Liangying<EMAIL_ADDRESS>mentioned.
Thanks,
Wanpeng Li

From: Bryce Barbara<EMAIL_ADDRESS>Sent: Wednesday, November 25, 2020 2:57:57 AM
To: Azure/azure-signalr<EMAIL_ADDRESS>Cc: Wanpeng Li<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-signalr] Clients not receiving group messages, yet they're reported to be group members (#1125)
Repro repo: https://github.com/BryceBarbara/AzureSignalRUserGroupsIssuehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBryceBarbara%2FAzureSignalRUserGroupsIssue&data=04|01|lianwei%40microsoft.com|b48ee3a158004299942d08d89133e2c3|72f988bf86f141af91ab2d7cd011db47|1|0|637418999341943724|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=W5%2F6K2wnTl1T%2FaN4NeNQGv544mwA4VTbwAhlKNWC50A%3D&reserved=0
The readme in the repo should walk you through how to reproduce this issue. While testing this on my end, I was only able to reproduce it when using our Prod Azure SignalR service which is on the Standard pricing tier. Our dev SignalR service on the Free tier did not display this odd behavior.
To summarize what I had to do to cause the issue:

Switched NegotiationServer to using Persistent transport.
NegotiationServer removes user from all groups prior to assigning groups
Add an endpoint that manages groups after the client connects

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-signalr%2Fissues%2F1125%23issuecomment-733171278&data=04|01|lianwei%40microsoft.com|b48ee3a158004299942d08d89133e2c3|72f988bf86f141af91ab2d7cd011db47|1|0|637418999341943724|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=ZDKRDVcLjA03%2BjBCrg1GFh73UHIpQxQV23OXd6HdpBs%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJDW7OLLEJ6JQAQRX44TF63SRP63LANCNFSM4UACEC4Q&data=04|01|lianwei%40microsoft.com|b48ee3a158004299942d08d89133e2c3|72f988bf86f141af91ab2d7cd011db47|1|0|637418999341953723|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=USpT%2B%2Fyxg8M4CxjkkPJW5WZnHcbFVtrM4%2FWYYjAlTY0%3D&reserved=0.

No, in the repo, message publisher sends group message to "group1" "group2"...
Thanks,
Wanpeng Li

From: Liangying Wei<EMAIL_ADDRESS>Sent: Wednesday, November 25, 2020 9:18:13 PM
To: Wanpeng Li<EMAIL_ADDRESS>Azure/azure-signalr<EMAIL_ADDRESS>Azure/azure-signalr<EMAIL_ADDRESS>Cc: Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-signalr] Clients not receiving group messages, yet they're reported to be group members (#1125)
Is it for the group name to contain “*”?
Thanks,
Liangying

From: Wanpeng Li<EMAIL_ADDRESS>Sent: Wednesday, November 25, 2020 7:18:50 PM
To: Liangying Wei<EMAIL_ADDRESS>Azure/azure-signalr<EMAIL_ADDRESS>Azure/azure-signalr<EMAIL_ADDRESS>Cc: Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-signalr] Clients not receiving group messages, yet they're reported to be group members (#1125)
Thanks for your repo. For now, the operations about user join/leave group are fire-and-forget. Too soon operation of leave then join group will cause the wierd status of the user in/out of some group. For now the workaround is to to wait a little time (maybe one second) to between user-group action operations (user join/leave group) and wait a short time before sending message to group. We are trying to fix this issue. Another workaround is to use connection-group operations as @Liangying<EMAIL_ADDRESS>mentioned.
Thanks,
Wanpeng Li

From: Bryce Barbara<EMAIL_ADDRESS>Sent: Wednesday, November 25, 2020 2:57:57 AM
To: Azure/azure-signalr<EMAIL_ADDRESS>Cc: Wanpeng Li<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-signalr] Clients not receiving group messages, yet they're reported to be group members (#1125)
Repro repo: https://github.com/BryceBarbara/AzureSignalRUserGroupsIssuehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBryceBarbara%2FAzureSignalRUserGroupsIssue&data=04|01|Wanpeng.Li%40microsoft.com|a5c71660484b4bd7849208d89144907c|72f988bf86f141af91ab2d7cd011db47|1|0|637419070964586794|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=ytiRyDP1CpI%2B6oSrwTlteHWClDAgjbv%2F9c8LI5Dd4CQ%3D&reserved=0
The readme in the repo should walk you through how to reproduce this issue. While testing this on my end, I was only able to reproduce it when using our Prod Azure SignalR service which is on the Standard pricing tier. Our dev SignalR service on the Free tier did not display this odd behavior.
To summarize what I had to do to cause the issue:

Switched NegotiationServer to using Persistent transport.
NegotiationServer removes user from all groups prior to assigning groups
Add an endpoint that manages groups after the client connects

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-signalr%2Fissues%2F1125%23issuecomment-733171278&data=04|01|Wanpeng.Li%40microsoft.com|a5c71660484b4bd7849208d89144907c|72f988bf86f141af91ab2d7cd011db47|1|0|637419070964596787|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=gMQOxKbuwgZhoBxinny9ALgqcW38%2B65cecI3pghspkU%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJDW7OLLEJ6JQAQRX44TF63SRP63LANCNFSM4UACEC4Q&data=04|01|Wanpeng.Li%40microsoft.com|a5c71660484b4bd7849208d89144907c|72f988bf86f141af91ab2d7cd011db47|1|0|637419070964596787|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=kvT5pirvdqW6FnEHZT6898dAuRx0SlrlxXD2belUJsg%3D&reserved=0.

I'm not really sure what the question is? I apologize

Cleaning issues. Sorry there's no conclusion to this issue, but this issue is  too old, and the repro project is 404 now.
Please update the SDK to the latest one, it uses ack message which will wait for the service confirm the message is handled.
If you still get this issue, please feel free to reopen it.

Hi @wanlwanl,

Please update the SDK to the latest one, it uses ack message which will wait for the service confirm the message is handled.

Is the ack also added in .NET core version of SignalR?


Added support for srem

Hi,
This adds some basic support for srem. It passes through your current testing infrastructure. Fair warning unless you remove the sdiffstore in commands_test.go it will just get passed without actually completing due to the deadlock.

Thanks Peter, I don't really intend to maintain this package as this was more an (interesting) experiment than anything else (I'll update the readme to reflect that), but it doesn't hurt to add this command.

Great thank you. We were using it for testing and wanted srem so we added it. No worries I appreciated being able to use it.

👍 gotcha, yeah it's not going to disappear, just no more evolution (from me anyway). I can give you collaborator access if you'd like?

Yeah that'd be great.


Make address click and copy

I would be nice to implement the address as in memamask: slightly increase of font-size, add a copy to clipboard icon and put the address  in the format "0x9BB...e888".
Instead of so:

so:


Please Add zIndex for android option on CardStack.js

Elevation is not supported for API < 25, please add zIndex on CardStack.js for android options,
Thank you

You can use setZ instead (for API > 21)


Variable Response based on user role/claims/permissions

Grettings:
First of all and as I said months ago, congratulations for this superb library that I have been using for a while now. After more than 150 endpoints implemented, today I had to add security into the api and encountered a problem I don't know how to resolve.
A bit of context first. I am programing an API that mostly do CRUD operations to an Angular frontend. In this frontend we have dozens of lists and then details for every entity we manage. For example, you access the employee list and then click on one of them to access his details. All data needed for the employee detail is sent to the frontend in one API call by just one endpoint, for example:
https://localhost:5001/employees/{id}
with the following response:
public sealed record GetEmployeeResponse
{
    // Base Employee Data

    public string Code { get; init; }
    public string Name { get; init; }
    public string Surname { get; init; }
    public string Email { get; init; }
    public DateTime? BirthDate { get; init; }

    // Much more stuff....

   //Employee Bank Details

    public string BankName { get; init; }
    public string BankAddress { get; init; }
    public string BankAccount { get; init; }

    // Much more stuff....

    public DateTime CreatedAt { get; init; }
    public DateTime? DeletedAt { get; init; }
    public DateTime? ArchivedAt { get; init; }
}

Entity's details can be very complex, and the frontend break down all that information into visual pieces like tabs, so the user can understand better how they are organized.
Now I have to implement a configurable security system over this already made endpoints and they want to filter parts of the GetEmployeeResponse based on Roles/claims/permissions, so a user with "Admin" role can see everything and another user with "Human Resources" role cannot see the bank details section. So now I have to change the response structure, data or both on users role, for example.
I dont see a way to do this without rewriting the existings endpoints and without making new endpoints every time a role is added which imho is cumbersome and time consuming. So the question is if this possible at all or what ways are there to get around this problem and meet the new security requirements. If I didn't explained the issue properly and need more information, feel free to ask.
Thanks for your time and response, kind regards.

maybe something like this:
//assign individual permissions to each user type on login
public class UserLogin : EndpointWithoutRequest
{
    public override Task HandleAsync(CancellationToken ct)
    {
        var permissionCodes = new[] {
            Allow.User_Create,
            Allow.Account_Create,
            Allow.Account_View,
            Allow.Account_View_Balance
        };
        //admin login would have all permissions like so:
        //var permissionCodes = new Allow().AllCodes();

        var jwtToken = JWTBearer.CreateToken(
            signingKey: "secret token",
            permissions: permissionCodes);

        var permissionSet = new Allow().NamesFor(permissionCodes);

        Response = new
        {
            AccessToken = jwtToken,
            PermissionSet = permissionSet //ui can use these to show hide elements based on permissions
        };
    }
}

public class GetAccount : EndpointWithoutRequest
{
    public override void Configure()
    {
        Get("account/{id}");
        Permissions(
            Allow.Account_View,
            Allow.Account_View_Balance);
    }

    public override Task HandleAsync(CancellationToken ct)
    {
        //do stuff differently based on the permissions of the current user

        if (User.HasPermission(Allow.Account_View_Balance))
        {
            //retrieve account balance from db and set on response dto
        }

        //or do stuff based on a role
        if (User.IsInRole("Admin"))
        {
            //whatever
        }

        //these checks can also be auto bound to the request dto using [HasPermission(...)] attribute:
        //https://fast-endpoints.com/docs/model-binding#has-permissions
    }
}

Good to know that I was missing nothing and there is no way around this. I have to modify the endpoint's logic. Thanks for the response.


Error in connection

I always get this error when I'm try to connect.
What should I do to investigate more?
Details: "The field 'X-WP-TotalPages' of the record wasn't found."

Marco! :(
Could you please check the WooCommerce version that you're using? Depending on the WooCommerce version that you have installed we'd have to use a different endpoint:

Let me know what version of WooCommerce you're using.
Thanks for trying out the connector!

Just uploaded a new .mez file. Hopefully you're using WooCommerce 2.6.x as I've just tested this with a site that is using it and it works perfectly.

I have v 2.6.14 - just tried and I have the same error. I suspect there is something I should do on our side? Or maybe that the URL should be different because of the particular configuration we might have?

ok, you're on wordpress 4.8 (according to this https://www.sqlbi.com/wp-login.php), you're using WC v2.6.14 and you entered the link to your site in the .mez file. The only thing that I could think of is either that the API is not enabled yet and you need to enable it on your WooCommerce:

or the credentials entered are incorrect
Can you confirm that the API is enabled for your WooCommerce?

Yes, it's enabled and the credentials are correct.
I will be out of office a few days, I'll investigate more when I'll be back.

You'd need to get Fiddler and check out the response that you're getting from your server.
Here's an example from me trying to access your site and getting denied:

You should get a 200 response, but an error might give you a 300 response. Let me know what you get when you have time.

Hey Marco!
I just published a new version of the connector. All you need to do is download the new .mez file and that's it. No need to edit the file at all. I even went ahead and set up a testing environment so you can try and use the connector against some dummy data.
Let me know if this new version works for you.

Miguel,
using your .mez file and the data provided I have the same problem as Marco.
"The field 'X-WP-TotalPages' of the record wasn't found."
Result=401

Hey Frank!
You might be getting that error if you're using the url as http instead of https. Can you confirm that you're using https?
I can def repro if the url is in http, but can't repro if the url is in https.

@Miguel,
you are right! One has to use https.
I guess you should adjust your instructions accordingly.
"Here's the data of our testing environment:
•Url for the Store = http://woocommerceconnector.azurewebsites.net
•API Version = v2
•API_username: ck_00c9112a8aee53ed8ea2484922630372003f96bc
•API_password: cs_e51db59027ec9f985c22e86e802eba3fdd51c9f6"

just checked. You are right about that. I used the http on the readme file of this repo. Just changed it to the https.
Thanks for it!

@FrankFromGermany don't forget to place a few orders on the site just for testing! :) you can even leave some notes on the order

I have a good news: it works on our production site, too!
The bad news is that it could be very heavy... we implemented a more sophisticated incremental export that allow us to run several refreshes over a day without impacting the web site performance. I measured the impact of an export, and if you have a certain volume of data the workload could impact the performance of the web site.
However, it's very useful! You can navigate in all the information of the orders!
One suggestion: in the documentation you should clarify that username and password correspond to API Keys that you have to generate in order to enable the access (maybe I missed this step a few days ago!!).
Great job!

nice, Marco! And yeah, absolutely something to take in consideration. I'm trying to compare the impact of going through the API vs doing native queries against the wordpress MySQL database, but hosting the testing environment on azure hasn't been so great so far =/

oh btw, as a comment, custom connectors will become available under the TOM, so you can imagine that one day you'll be able to automatically create partitions with a custom connector like this one so you don't have to rely on the exports :)  - the WooCommerce API already has some parameters so you can do the partitions quite easily.
Getting the full data every single time you refresh could be quite expensive, so a custom connector under the TOM or under the incremental refresh of Power BI would be the way to go, once it becomes available

I agree, with partitions it will be another story!


Update csi_cephfs_vmware.yaml to remove use of arg warn

warn has been deprecated in ansible-core 2.14. For this task to work with later versions we need to remove this.
Fix tested using ansible 2.13 (6.7.0) and 2.14 (7.4.0).
This was the error:
Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, stdin_add_newline, strip_empty_ends

@stevenschader @gmarcy Could you please take a look at reviewing this change? We're currently having to fork this repo for our pipeline which uses the newer Ansible.

@websterc87 this look pretty simple change.  Do you have any other thoughts on it?


ARM template property hbi_workspace is not correct

ARM template property hbi_workspace is not correct. The correct property is hbiWorkspace.

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

ID: 6bb762e3-f0ac-c0de-baaf-393093c4ff69
Version Independent ID: 35020248-277f-167b-9ff4-ed8ca8cc4478
Content: Create a workspace with Azure Resource Manager template - Azure Machine Learning
Content Source: articles/machine-learning/how-to-create-workspace-template.md
Service: machine-learning
Sub-service: core
GitHub Login: @Blackmist
Microsoft Alias: larryfr

@slavizh Thanks for the feedback. We are investigating the issue and will update you shortly.

@Blackmist Could you please review and update the property in ARM template? It looks like the property is supposed to be  hbiWorkspace: Boolean for ARM templates?
hbi_workspace is used as a property if used from the SDK.
@slavizh Thanks for pointing this out.

@Blackmist also make a note that this can be set on initial deployment. If you set it to false, deploy and set it to true and re-deploy it will not even give error but the value will stay false.

Thanks @slavizh for reporting and providing additional info. I've asked the engineering team to take a look at this also. Waiting on their feedback now.

Hi @slavizh
The document has been updated to use hbiWorkspace when setting the value. The change will be live later today. I've also added a note that it's expected that, once created, you cannot change these settings for the workspace.

thanks!

Hi @Blackmist, while testing I noticed that updating hbiWorkspace on on existing workspace doesn't work (which is expected given the other comments), but what was unexpected is that it still fails silently. Other resources return an error at ARM template deployment time when you try to change a property that can't be changed. Is it expected to fail silently when trying to change the value of hbiWorkspace? (And if yes, where can I send the request for this to be changed to a deployment error? :) )

@jurjenoskam It is not that property only. I have noticed it with others as well. For me this is a bug as if you cannot change a property proper error message should be thrown.

Hi @jurjenoskam and @slavizh, I will ping the engineering team to ask on this. If they're able to provide feedback, I can document the behavior. But I cannot request any changes for this behavior. GitHub issues in the azure-docs repo are for documentation feedback only, not break/fix or feature requests.
If you want to provide feedback on the product, use https://feedback.azure.com/forums/257792-machine-learning. If you are blocked and need more urgent service, contact Microsoft support using the information at https://azure.microsoft.com/en-us/support/options/.


Create commonjs package scope for the package.json#main file

fixes https://github.com/thysultan/stylis.js/issues/247
I totally forgot that this thing was an issue - I have totally forgotten that there are versions of node that:

have experimental (!) but unflagged (!) ESM support
do not have support for conditional exports (at least not an unflagged one)

We already had this problem which got fixed here: https://github.com/thysultan/stylis.js/pull/228 🤦
I've also attempted this exact thing before in https://github.com/thysultan/stylis.js/commit/eb58ad5549af328a361464f86864eb75a4c73a3b which was part of https://github.com/thysultan/stylis.js/pull/207 but we have settled on the alternative solution there so this hasn't ever been merged to the master branch.

Pull Request Test Coverage Report for Build 96d0468949971f22bc01840085d84fa4287bb481-PR-248

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 99afc806acf31a2b9a82d2d5439bba819e35eca6:
0.0%

Covered Lines:
236

Relevant Lines:
236

💛  - Coveralls

Thanks millions @Andarist ! What a speed :1st_place_medal:


Trouble understanding interface

In https://github.com/HazyResearch/flash-attention/blob/main/flash_attn/flash_attention.py#L32, the comment says
            qkv: The tensor containing the query, key, and value. (B, S, 3, H, D) if key_padding_mask is None
                if unpadded: (nnz, 3, h, d)
            key_padding_mask: a bool tensor of shape (B, S)

Is it possible to call this function with a tensor of shape  (B, S, 3, H, D)  which IS padded? If so, how should the arguments be structured? Thanks!

Yes, it would then call unpad_input, which removes the padding tokens, then call flash-attention for unpadded inputs.
This pytorch module is meant to be a light wrapper around the interface, which then call into the CUDA functions.

Thanks, I don't get the expected results when using this Pytorch module. Consider the following code:
import torch
from flash_attn.flash_attention import FlashAttention

def flash_attn(qkv, bs, sq, num_heads, sm_scale, mask=None):
    attn = FlashAttention(softmax_scale = sm_scale)
    out = attn(qkv, key_padding_mask=mask)[0]
    return out.view(bs, sq, -1)

def std_attn_forward(qkv, B, N, num_heads, scale, mask=None):
    qkv = qkv.permute(2, 0, 3, 1, 4) # (3, bs, nhead, sq, hdim)
    q, k, v = qkv[0], qkv[1], qkv[2]   # (bs, nhead, sq, hdim))
    q = q * scale
    attn = (q @ k.transpose(-2, -1)) # (bs, nheads, sq-q, sq-k)
    if mask is not None:
        mask = mask.bool()
        attn = attn.masked_fill(~mask[:, None, None, :], float("-inf"))
    attn = attn.softmax(dim=-1).type_as(q)
    x = (attn @ v)
    x = x.transpose(1, 2).reshape(B, N, -1)
    return x

if __name__ == '__main__':
    bs, sq, fdim, nheads, scale = 16, 256, 1024, 16, 0.1
    qkv = torch.randn(bs, sq, fdim*3).half().cuda()
    qkv = qkv.view(bs, sq, 3, nheads, -1)

    mask = None
    out1 = flash_attn(qkv, bs, sq, nheads, scale, mask=mask)
    out2 = std_attn_forward(qkv, bs, sq, nheads, scale, mask=mask)
    print('same with mask off:', torch.allclose(out1, out2, atol=1e-3))

    mask = (torch.arange(sq) < sq//2).unsqueeze(0).repeat(bs, 1).cuda()
    out1 = flash_attn(qkv, bs, sq, nheads, scale, mask=mask)
    out2 = std_attn_forward(qkv, bs, sq, nheads, scale, mask=mask)
    print('same with mask on:', torch.allclose(out1, out2, atol=1e-3))

From this I get
same with mask off: True
same with mask on: False

Is this how the pytorch module should be used with key masks? Thanks!

This is meant for self-attention so when you apply the key mask it also masks out the query.
It means that, for this case, the first 128 rows of the output from FlashAttention (out1[:, :128]) matches the first 128 rows of the reference (out2[:, :128]), while the remaining 128 rows are set to zero (you can print it out to check).
If you want to do cross attention (where q and k don't have the same length, and they could have different masks), then you would want to call flash_attn_unpadded_func.

Ah, got it, thanks for the clarification!!
I am however still having issues even after this fix, consider the following code:
import torch
from flash_attn.flash_attention import FlashAttention

def flash_attn(qkv, bs, sq, num_heads, sm_scale, mask=None):
    attn = FlashAttention(softmax_scale = sm_scale)
    out = attn(qkv, key_padding_mask=mask)[0]
    return out.view(bs, sq, -1)

def std_attn_forward(qkv, B, N, num_heads, scale, mask=None):
    qkv = qkv.permute(2, 0, 3, 1, 4) # (3, bs, nhead, sq, hdim)
    q, k, v = qkv[0], qkv[1], qkv[2]   # (bs, nhead, sq, hdim))
    q = q * scale
    attn = (q @ k.transpose(-2, -1)) # (bs, nheads, sq-q, sq-k)
    if mask is not None:
        mask = mask.bool()
        attn = attn.masked_fill(~mask[:, None, None, :], float("-inf"))
    attn = attn.softmax(dim=-1).type_as(q)
    x = (attn @ v)
    x = x.transpose(1, 2).reshape(B, N, -1)
    return x

if __name__ == '__main__':

    for nheads in [8, 16]:

        bs, sq, fdim, scale = 8, 256, 1024, 0.1
        qkv = torch.randn(bs, sq, fdim*3).half().cuda()
        qkv = qkv.view(bs, sq, 3, nheads, -1)

        mask = None
        out1 = flash_attn(qkv, bs, sq, nheads, scale, mask=mask)
        out2 = std_attn_forward(qkv, bs, sq, nheads, scale, mask=mask)
        print('nheads', nheads, 'same with mask off:', torch.allclose(out1, out2, atol=1e-3))

        mask = (torch.arange(sq) < sq//2).unsqueeze(0).repeat(bs, 1).cuda()
        out1 = flash_attn(qkv, bs, sq, nheads, scale, mask=mask)
        out2 = std_attn_forward(qkv, bs, sq, nheads, scale, mask=mask)

        fmask = mask.float().unsqueeze(2)
        out1 = out1 * fmask
        out2 = out2 * fmask
        print('nheads', nheads, 'same with mask on:', torch.allclose(out1, out2, atol=1e-3))

I get
nheads 8 same with mask off: False
nheads 8 same with mask on: False
nheads 16 same with mask off: True
nheads 16 same with mask on: True

So the masking seems to work correctly with some number of heads, but the attention does not seem to work with just 8 heads. A head dimension of 1024/8 = 128 seems to be supported here https://github.com/HazyResearch/flash-attention/blob/main/flash_attn/flash_attention.py#L88 ?


Add "RESEARCH DATA MANAGEMENT on Campus and in NFDI4BIOIMAGE"

https://zenodo.org/records/13684187

Done in #482


[stable/sonarqube] Default plugins are not installed

Looks like running helm install stable/sonarqube without any custom value will install sonarqube without the default plugins.

Removing the following in deployment.yaml fixes the problem:
            - mountPath: /opt/sonarqube/extensions/plugins
              name: sonarqube
              subPath: plugins

It works if you don't care about installing custom plugins.

See also https://github.com/helm/charts/issues/18931

Yep, that's a duplicate.