[camera] Add web support

This PR implements the web support for the camera plugin ( https://github.com/flutter/flutter/issues/45297 ), it is not yet complete.
I tested (this sample) both in chrome and firefox in desktop and mobile and the implementation worked fine.
What's implemented:

Available cameras.
Camera video preview.
Initialize and create camera APIs,
Exposure offset API. This uses capabilities.exposureTime and I'm not sure if this is the correct implementation or can be implemented at all.
Set/Get zoom level.
Lock/Unlock capture orientation. This uses the Screen API which locks the orientation of the whole screen AFAIK.
Video recording.
onCameraInitialized, onVideoRecordedEvent
Set flash mode.

What's missing:

onCameraClosing, onCameraError, onCameraResolutionChanged, onDeviceOrientationChanged. (The latest two are implemented but don't ever yield any value).
Exposure mode and Focus mode. (Not sure if these can be implemented in web).
enableAudio and resolutionPreset in createCamera have no effect.
Integration tests. I'm not really into writing tests, especially on web, so any help would be appreciated.

A few caveats:

window.navigator.mediaDevices({'video': true, 'audio': false}) should be included before using any function provided from the plugin to request the camera access.
The analyzer returns an error on ui.platformViewRegistry.registerViewFactory due to https://github.com/flutter/flutter/issues/41563 . (Also does the view need to be disposed/is there any way to do so?)
Only in chrome and when testing the build (flutter build) video.play() throws this error: AbortError: the play() request was interrupted by a call to pause() (Line 270 camera_web.dart). Simply catching that error seem to solve the issue.
settings.exposureMode and settings.focusMode might be used to fetch the right ExposureMode and FocusMode (Line 268 camera_web.dart).
The takePicture supports only the image/png media type.
The recording currently only supports the video/webm;codecs=VP8. Probably it would be a good idea to use MediaRecoreder.isTypeSupported() to check if the media type is supported in the current browser. The downloaded file has no video length tough so it not possible to navigate around the video, I'm not sure there is a fix at the moment.
The MediaTrackCapabilities class is just an utility to parse all the video capabilities, it the future it can be stripped out the APIs that are not needed.
Calls to video.play() fail on iPhone devices with the following error: NotAllowedError: The request is not allowd by the user agent or the platform in the current context, possibly because the user denined permission..

There are serveral TODOs around the code you might want to checkout as well.
Pre-launch Checklist

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format. See plugin_tool format)
[x] I signed the [CLA].
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I listed at least one issue that this PR fixes in the description above.
[ ] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
[ ] I updated CHANGELOG.md to add a description of the change.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
[ ] All existing and new tests are passing.

The sample app in the gist  works perfectly @Hexer10  .  But the sample app that is already there in example folder.
I think you should add this code in availableCameras function .
await window.navigator.mediaDevices!           .getUserMedia({'video': true, 'audio': false});

The sample app in the gist  works perfectly @Hexer10  .  But the sample app that is already there in example folder doesnt.
Adding this code in availableCameras function  solves the overconstraint error that i was getting in the sample.
await window.navigator.mediaDevices!           .getUserMedia({'video': true, 'audio': false});

Yeah, I haven't updated the sample, so you need to add that like do request the camera access, and be able to get all available cameras

Seems like it might have some problems on iOS.
Testing on Chrome and Safari on iOS throws the same error:
NotAllowedError: the request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

Expect it might be due to the camera being initialized from flutter which off the top of my head, I don't know if it would use user events like onTap. So the security policies block it from use. Might be wrong on this though.
Any ideas? Its urgent for me as dropping a POC soon which needs this! :)

This is the project I was talking about, sorry for being secretive but it hadn't been announced yet by the time this PR came in:
https://photobooth.flutter.dev
There's a "making of" here:
https://medium.com/flutter/how-its-made-i-o-photo-booth-3b8355d35883
Right now, it's built into the Photobooth repo itself, but @felangel has an implementation of the Camera plugin for web that works, maybe @Hexer10 and @felangel want to work together on landing one of the two versions (or a mix of them?).

This is the project I was talking about, sorry for being secretive but it hadn't been announced yet by the time this PR came in:
https://photobooth.flutter.dev
There's a "making of" here:
https://medium.com/flutter/how-its-made-i-o-photo-booth-3b8355d35883
Right now, it's built into the Photobooth repo itself, but @felangel has an implementation of the Camera plugin for web that works, maybe @Hexer10 and @felangel want to work together on landing one of the two versions (or a mix of them?).

Definitely! You can check out the camera_web implementation used by Photo Booth. If there's anything I can do to help progress this PR please let me know 😄

@SKLn-Rad I had issues as well making this work on an iPhone, thanks for sharing your solution!
@felangel I had a quick look around the camera's photobooth implementations, and the the moment that version exposes a lot less APIs rather than my implementation (most likely a lot of features weren't needed in that proejct). The main differences that I could find were:

Photobooth uses a difference platform interface rather the one currently in use by the plugin.
In Photobooth you must manually call camera.play() whereas in my implementation that is done automatically when calling camera.initialize() (there are some other differences as well).
The VideoElement which holds the MediaStream source is not styled at all, and it is not a child of a DivElement .
Your implementation includes some platform specific got, whereas mine didn't include any platform specific code (however it worked fine in chrome/firefox on Android, Linux and Windows, I didn't get to test it on OSX, iOS yet).
Currently my implement doesn't expose anyway to pass custom constraints  to the getUserMedia function.

From those points these questions may arise:

Should I include the styling on the VideoElement and make it child to a DivElement?
Which change do I need to make into the camera_platform_interface? Should the video.play() call be done manually or can it be called inside the camera.initialize() function? How should I edit the interface to pass custom constraints to the getUserMedia? It is needed?
What platform(browser/os) specific code should I include?

@SKLn-Rad I had issues as well making this work on an iPhone, thanks for sharing your solution!
@felangel I had a quick look around the camera's photobooth implementations, and that version exposes a lot less APIs rather than my implementation (most likely a lot of features weren't needed in that proejct). The main differences that I could find were:

Photobooth uses a difference platform interface rather the one currently in use by the plugin.
In Photobooth you must manually call camera.play() whereas in my implementation that is done automatically when calling camera.initialize() (there are some other differences as well).
The VideoElement which holds the MediaStream source is not styled at all, and it is not a child of a DivElement .
Your implementation includes some platform specific got, whereas mine didn't include any platform specific code (however it worked fine in chrome/firefox on Android, Linux and Windows, I didn't get to test it on OSX, iOS yet).
Currently my implement doesn't expose anyway to pass custom constraints  to the getUserMedia function.

From those points these questions come to mind:

Should I include the styling on the VideoElement and make it child to a DivElement?
Which change do I need to make into the camera_platform_interface? Should the video.play() call be done manually or can it be called inside the camera.initialize() function? How should I edit the interface to pass custom constraints to the getUserMedia? It is needed?
What platform(browser/os) specific code should I include?

@Hexer10 yeah photobooth uses a different interface currently but I think we can adapt the implementation to the current interface if we want to go down that path 👍
I'm wondering what everyone's thoughts are on closing this PR in favor of multiple smaller PRs to incrementally add bits of functionality.
For example:

Web Plugin Scaffold
Camera Permissions + Access
Capture Photo
Record Video
etc...

This would allow us to break this PR down into more digestible pieces and would give us the opportunity to discuss the approach (we can use photobooth as well as the existing PR for inspiration and take bits and pieces from each).
What do you all think? @Hexer10 @ditman

@felangel @Hexer10 +1, I think smaller PRs are easier to understand, review and merge!

@Hexer10 What's status on this. Would be great to finish it, adding better camera support on web is 🔥 . I'm available to help :)

@Hexer10 What's status on this. Would be great to finish it, adding better camera support on web is  . I'm available to help :)

I'm sorry I haven't made any progress on this. If you want to try this out it should be already in a kinda working state. Tough to make it official as discussed this would need to be split into several PRs so the flutter team can better review the code.

@felangel @Hexer10 @felangel i have started with split with small PR #4139

Sorry and @ditman :)

How should the plugin implementation process be handled? Do we want to make some sort of roadmap and make a pull request of each step? Somewhat like:
[ ] Web interface implementation.
[ ] Implement the getAvailbleCameras API. ( What @ryzizub did )
[ ] Implement the initializeCamera API.
[ ] Implement the camera preview APIs.
[ ] Implement the takePicture API.
[ ] Implement the camera recording APIs.
[ ] Implement the various events (onCameraInitialized, onCameraClosing, ...)
[ ] Implement exposure offsets, flashlight, focus, zoom and screen APIs.
(The task don't need to be necessarily to be implemented in that order.)
Am I missing something? Would that work for you?
@ditman @felangel

@bselwe is going to put some hours into this, from VGV.
I think we can start with the photobooth's well tested (but not feature complete) code as the starting point for the web implementation, and then keep adding features as needed!
From @Hexer10's list, I think photobooth already has the init camera, camera preview and take picture (and possibly the events, or something similar); their code just needs to be adapted to the current platform_interface API.
I think the photobooth implementation does NOT have the concept of "recording video", so that's something that probably could be contributed from the community, if anybody has any ideas!
I'm not sure that the last item is implementable on web ("manual" controls of exposure, flash, focus, zoom...), so I'd prioritize those a little bit lower.
Once we have the first iteration of the web plugin, porting the photobooth codebase to the standard camera platform_interface, we can then push it to the flutter/plugins repo as a non-endorsed, experimental plugin for the brave to test/validate/contribute until everybody's (mostly) happy with how it turned out, then we publish it and endorse it!
I know the code is mostly there, we just need to put it in the right files and folders :D

@bselwe is going to put some hours into this, from VGV.
I think we can start with the photobooth's well tested (but not feature complete) code as the starting point for the web implementation, and then keep adding features as needed!
From @Hexer10's list, I think photobooth already has the init camera, camera preview and take picture (and possibly the events, or something similar); their code just needs to be adapted to the current platform_interface API.
I think the photobooth implementation does NOT have the concept of "recording video", so that's something that probably could be contributed from the community, if anybody has any ideas!
I'm not sure that the last item is implementable on web ("manual" controls of exposure, flash, focus, zoom...), so I'd prioritize those a little bit lower.
Once we have the first iteration of the web plugin, porting the photobooth codebase to the standard camera platform_interface, we can then push it to the flutter/plugins repo as a non-endorsed, experimental plugin for the brave to test/validate/contribute until everybody's (mostly) happy with how it turned out, then we publish it and endorse it!
I know the code is mostly there, we just need to put it in the right files and folders :D

I'd just want to add that this PR already has a working "recording video" implementation, as well as a control of the flash and zoom, so that shouldn't be too hard to implement

Also is @bselwe going to start implementing the port of the photobooth codebase or we can open a pr for that?

Yes, @bselwe is going to do the first push, and then we can add the additional missing behavior. It is great news that there's already video recording and flash/zoom controls. That's amazing!

Also is @bselwe going to start implementing the port of the photobooth codebase or we can open a pr for that?

Yes, @bselwe is going to do the first push, and then we can add the additional missing behavior. It is great news that there's already video recording and flash/zoom controls. That's amazing!

Awesome work @ditman @Hexer10 and @bselwe. I have some additional time to work on this, would be happy to contribute 💪


Purging NPSS and H2 tanks from wsize.

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (28f95dd) 68.63% compared to head (5cf6967) 70.37%.

Files
Patch %
Lines

src/sizing/wsize.jl
99.32%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
+ Coverage   68.63%   70.37%   +1.74%
==========================================
  Files          63       63
  Lines       12287    11957     -330
==========================================
- Hits         8433     8415      -18
+ Misses       3854     3542     -312

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Unable to import library in eclipse

I'm trying to use the library using eclipse but I'm having no success, if I'm doing anything wrong, instructions on how to do so would be appreciated.
I've tried 2 things:

Importing the library via Maven, using the m2eclipse dependency manager. I've added the artifactId, groupId and version to both the dependency and overview page and refreshed the project with no success.
I tried to rebuild the index but in the most recent eclipse this leads to the whole IDE crashing and therefore not working.

I tried downloading the compiled maven .jar from https://jitpack.io/com/github/sapher/youtubedl-java/1.1/youtubedl-java-1.1.jar (thanks to a little trick I learn't from https://github.com/jitpack/jitpack.io/issues/886), then tried importing it as an external library, but this lead to no success either.

PS, personal opinion: I think this wrapper would be so much easier to use if it was a simple .jar file that could be imported, but, that's the creators decision.

 I've just got a new Macbook and I was importing the .jar's parent folder instead of the .individual jar alone into eclipse. This usually works on windows, but evidently not on Macs...
Solved.


Calculate seasonal mean climate changes

In my role as....
climate researcher
I need to be able to...
calculate seasonal mean changes from CORDEX data
in order to...
provide future projections of possible climate changes over different countries.

Related to #36 Implement seasons


Fix Withdrawn by us and Rejected filters

'Withdrawn by us' filter was showing no results and 'Rejected' filter included
both rejected and withdrawn by us applications. This was caused by the fact
that the status filter was running WHERE status query. However
offer_withdrawn does not exist in the database; those applications have
rejected status in the database.
Context
'Withdrawn by us' filter was showing no results and 'Rejected' filter included
both rejected and withdrawn by us applications. This was caused by the fact
that the status filter was running WHERE status query. However
offer_withdrawn does not exist in the database; those applications have
rejected status in the database.
Changes proposed in this pull request

separately add offer withdrawn application choices when 'Withdrawn by us' filter is selected
when the 'Rejected' filter is selected, exclude 'Withdrawn by us' applications from the results

Before
After

Guidance to review

go to http://localhost:3000/provider/applications
try different filters such as:

'Withdrawn by us' only
'Rejected' only
'Withdrawn by us' & 'Rejected'
'Withdrawn by us' & some other filters
'Rejected' & some other filters

Link to Trello card
https://trello.com/c/U0OeofIp/2116-title-provider-interface-application-filter-by-status-wrong
Things to check

[ ] This code doesn't rely on migrations in the same Pull Request
[ ] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[ ] API release notes have been updated if necessary
[ ] New environment variables have been added to the Azure config

This is interesting. Without comparing dates, there is no way to determine that an application is definitely in one or the other state because it's possible for an application to be withdrawn, then rejected!

I think if we additionally scope offer_withdrawn to rejected applications (the push below), the logic boils down to the below.
def status(application_choices, statuses)
  return application_choices if statuses.blank?

  if statuses.include?('offer_withdrawn')
    statuses.push('rejected')
    application_choices = application_choices.where.not(offer_withdrawn_at: nil)
  elsif statuses.include?('rejected')
    application_choices = application_choices.where(offer_withdrawn_at: nil)
  end

  application_choices.where(status: statuses)
end

It's painful that we have this pseudo-state!

Thanks 👍 , as discussed I'm adding a scope on the model and unit tests for this service.


[hotfix][java][test] RecordWithTimestamps#equals should compare its own localDateTime with that.localDateTime

What is the purpose of the change
Currently RecordWithTimestamps#equals is invalid since it compares that.localDateTime vs that.localDateTime
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Documentation

Does this pull request introduce a new feature? ( no)
If yes, how is the feature documented? (not applicable )

Good catch, thanks!


Metal Plates are not craftable in Fabric

The recipe for Metal Plates uses the forge:ingots/iron tag which is not present in Fabric. This leads to Metal Plates not being craftable.
https://github.com/DrMango14/Create-Design-n-Decor/blob/484c3624230408e074847b1a65be522efb9fc8a7/src/generated/resources/data/design_decor/advancements/recipes/design_decor/metal_plate_from_ingots_iron_stonecutting.json#L8
This should probably be replaced by "item": "minecraft:iron_ingot", which is what the other recipes use.
Edit: The Metal Plates are not the only item that use the forge:ingots/iron tag in their recipe, so other items are affected as well.

I just noticed this is the forge-only project, which the Fabric port that was not created by you (https://modrinth.com/mod/create-dreams-and-desires) links to. Closed.


How to get mojo in testnet?

https://faucet.chia.net/ returns Appears invalid address for my testnet addresses. How can I get mojo in testnet to test pool protocol?

are you using a "txch###" address? with a t?

https://faucet.chia.net/ returns Appears invalid address for my testnet addresses. How can I get mojo in testnet to test pool protocol?

http://chia-faucet.com/

@tmoore22 yes and still invalid, but http://chia-faucet.com/ works fine

And I also cant sync my wallet for testnet7 with branch pools.2021-june-4, the wallet doest not start syncing

And I also cant sync my wallet for testnet7 with branch pools.2021-june-4, the wallet doest not start syncing. According to connected peers, it seems my testnode can not connect with any peers

chia show -a testnet-node.chia.net:58444
full node testnet: testnet-node.chia.net port 58444

Another problem:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhumaohua/SourceCode/chia-blockchain/chia/wallet/puzzles/pool_escaping_innerpuz.clvm.hex'
It seems there is still missing some puzzle in chia-blockchian


did the new update remove apotheosis' ability to work with create? if so, was it on purpose?

it suddenly doesn't interact with any create block whatsoever, whereas it did before. an example would be using the crushing wheel to crush the gear or gem i wouldn't use. no bug report or anything like that, it seems to be working just fine if not for that

actually nevermind, sorry for posting =/. it basically doesn't work anymore for no reason or change i made, as i did not tinker with anything like that at all, so i don't know what happened and will look into it. again, sorry for bothering, last 1.20.1 update was quite some time ago and it did work on this version before. i don't know what could've happened.

Sorry to ask this on a closed thread, but what was the name of the mod that adds compat?


Maximum Marginal Relevance

The idea here is to make sure that the top search results have some diversity - that they don't all say essentially the same thing.
This task involves the following steps in server/main.py in the server repo, after you have the search results from querying the index, but before you generate the prompt (around line 165):

You need to get OpenAI embeddings for the search results and query. We use OpenAI embeddings for this instead of VoyageAI embeddings because they're a lot faster to compute.  To get the embeddings you will need to first get the texts of the search results + the query:

all_texts = [res["metadata"]["text"] for res in search_results] + [q]  # all search result texts plus the query
embed_response = openai.Embedding.create(input=all_texts, engine="text-embedding-ada-002")  # type: ignore
all_embeddings = [data["embedding"] for data in embed_response["data"]]
doc_embeddings = np.array(all_embeddings[:-1])  # search result embeddings as a numpy array
query_embedding = np.array(all_embeddings[-1])  # query embedding as a numpy array

Next you need to import and call maximal_marginal_relevance from Langchain: https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.utils.maximal_marginal_relevance.html. Set lambda_mult = 0.7 and k=len(search_results). This will return a list of indexes containing the new ordering of the search results for diversity. For example, if the second and third search results should be swapped in order to have more diversity, this function will return [0,2,1,3,4,5,...].

Finally, you need to re-order the search_results so they are in the order returned by maximal_marginal_relevance. Compute the reordered list of search results, set search_results = your reordered list, and continue with the code to get the prompt on line 167.

Merged into main manually


Cookie popup appears unexpectedly & then disappears.

[ ] Expected behavior
After I close the cookie popup. It should not show again but it does for a moment on every page view & then disappears.

[ ] Screenshots (optional)
If applicable, add screenshots to help explain your problem.

[ ] Additional context (optional)
https://www.loom.com/share/51c4c69d1f374aa1b378ca0955bb8681

Can you please tell me this is on which branch?

I can't seem to replicate this.
https://www.loom.com/share/caa3682bfe8b44d0a112a5c5ab6cafd4

Try this link https://develop.cryptocodeschool.in/tezos
Steps to reproduce the bug

Use brave/chrome browser & go to https://develop.cryptocodeschool.in/tezos link
Close the cookies pop-up
Refresh the page
You will see the behavior mentioned here https://www.loom.com/share/caa3682bfe8b44d0a112a5c5ab6cafd4

Yep, can see it now. Will fix.


[Android] Invalid texture format gets converted to valid texture format by RenderDoc?

Description
We had some graphical issues (texture samples were black) in a mobile app on Android using OpenGL ES 3.0 - we could narrow the issue down to an invalid texture format when calling glTexImage2D.
When we started the app wihout attaching RenderDoc, the texture samples were all black. However, when we started the app with RenderDoc attached, the texture samples had the correct values.
This was somewhat irritating at first and I'm not exactly sure if this is a feature or a 'bug' on RenderDoc's part ;)
If this is part of the featureset of RenderDoc, maybe it would be beneficial for the user to indicate that the format of the texture was changed internally so that the user knows that something with the provided texture format was invalid?
Repro steps
Create a OpenGL texture with an invalid texture format.
(I'll provide the same format that we used when we were experiencing the texture sampling issues)

create a new texture
upload texture data using glTexImage2D with the following parameter: internalFormat=GL_SRGB8_ALPHA8
sourceFormat=GL_RGBA
sourceType=GL_UNSIGNED_SHORT_5_5_5_1
issue a drawcall which uses this texture

When RenderDoc was not attached, this resulted in vec4(0, 0, 0, 0) values when sampling the texture. When RenderDoch was attached however, the internalFormat parameter was changed to GL_RGB5_A1 (presumably by RenderDoc) thus resulting in a correctly rendered image (as this was actually the format of the texture provided).
Environment

RenderDoc build: v1.1 (built from d90d1d81)
Operating System: Windows 7
API: OpenGL ES 3.0
Device: Samsung Galaxy S8
Android Version: 8.0.0

I'll happily provide more informations, in case you need them.

I think this is an unintentional side-effect. The spec is a bit convoluted in this area but I believe you are allowed to specify whatever format/type combination you want, and it will get converted to the specified internalformat through up or downcasting. There might be some restriction like you need to have the same number of components, I'm not sure.
RenderDoc is accidentally replacing it with GL_RGB5_A1 when trying to convert unsized internal formats into sized internal formats, when it shouldn't change an already sized format.
Note though that in general RenderDoc isn't intended to support programs that have OpenGL errors in them, since that would be an unbounded amount of work to detect and report errors.

We have reproduced this problem with a Linux desktop application.
When the internalFormat is converted to sized internalFormat, it checks the type parameter first and it returns immediatelly with eGL_RGB5_A1 if the type is eGL_UNSIGNED_SHORT_5_5_5_1.
Would it be a good fix if we checked the internalFormat first or we could provide a Warning to the user that not the correct format-type pair is used in this case?


Quake 2 doesn't return correct maxplayers

While querying a quake 2 server I noticed maxplayers returned 0. The correct "maxplayers" value is under "maxclients" key which is under the raw values.
The server I was querying: <IP_ADDRESS>:27910

I see TS3 had the same small bug which was fixed:
https://github.com/sonicsnes/node-gamedig/commit/61d239ccd5876a2bbad12228190bef8425388d69

I will look into it now :)

https://github.com/sonicsnes/node-gamedig/pull/27
I have added the fixes to my pull request, so sonic should see them soon,
Ive already applied the changes on my webapi (https://api.gamerlabs.net/?type=quake2&host=<IP_ADDRESS>&port=27910) so you can see :)

Strange that the variables would be named differently on that server. I guess certain q2 implementations use different variable names.
Also surprised about all that dangling whitespace -- I must have started this project way back on n++ with very lax whitespace settings. I should probably normalize all files next time this project gets cleaned up.


Merge from staging to main for release 0.7.0

Description

Related Issues

Checklist:

[x] I have followed the contribution guidelines and code style for this project.
[x] I have added tests covering my contributions.
[x] I have updated the documentation accordingly.
[ ] This PR is being made to staging branch and not to main branch.

There is this error:
    @pytest.mark.notebooks
    @pytest.mark.gpu
    def test_gpu_vm():
>       assert get_number_gpus() >= 1
E       assert 0 >= 1
E        +  where 0 = get_number_gpus()

@anargyri do you know what the problem could be?

There is this error:
    @pytest.mark.notebooks
    @pytest.mark.gpu
    def test_gpu_vm():
>       assert get_number_gpus() >= 1
E       assert 0 >= 1
E        +  where 0 = get_number_gpus()

@anargyri do you know what the problem could be?

I saw this problem in the last PR too. Maybe something with the CUDA configuration not working properly?

There is this error:
    @pytest.mark.notebooks
    @pytest.mark.gpu
    def test_gpu_vm():
>       assert get_number_gpus() >= 1
E       assert 0 >= 1
E        +  where 0 = get_number_gpus()

@anargyri do you know what the problem could be?

I saw this problem in the last PR too. Maybe something with the CUDA configuration not working properly on the GPU machine?

@laserprec can you look into this?

There is this error:
    @pytest.mark.notebooks
    @pytest.mark.gpu
    def test_gpu_vm():
>       assert get_number_gpus() >= 1
E       assert 0 >= 1
E        +  where 0 = get_number_gpus()

@anargyri do you know what the problem could be?

I saw this problem in the last PR too. Maybe something with the CUDA configuration not working properly on the GPU machine?

@laserprec can you look into this?

It's just a problem with nvidia driver updates happening on VMs. nvidia-smi fails after that and you need to reboot the machine.

There is this error:
    @pytest.mark.notebooks
    @pytest.mark.gpu
    def test_gpu_vm():
>       assert get_number_gpus() >= 1
E       assert 0 >= 1
E        +  where 0 = get_number_gpus()

@anargyri do you know what the problem could be?

I saw this problem in the last PR too. Maybe something with the CUDA configuration not working properly on the GPU machine?

@laserprec can you look into this?

It's just a problem with nvidia driver updates happening on VMs. nvidia-smi fails after that and you need to reboot the machine.

The machines are rebooted and it should be resolved.
Turns out there's a new nvidia-driver update this weekend:

cat /var/log/apt/history.log
....
Start-Date: 2021-09-10  06:51:06
Commandline: /usr/bin/unattended-upgrade
Upgrade: libnvidia-compute-470:amd64 (470.57.02-0ubuntu1, 470.63.01-0ubuntu<IP_ADDRESS>)


Constant error taking over logs

Describe the bug （描述一下问题）
This bug is taking over my logs and keeps repeating.
My Midea is not currently online at the moment as in storage now.
Screenshots / Logs / Pcap File（屏幕截图/日志/抓包文件）
2021-08-22 20:35:25 ERROR (SyncWorker_6) [msmart.lan] Connect Error: 192.168.0.xxx:6444 [Errno 113] Host is unreachable 2021-08-22 20:35:25 ERROR (SyncWorker_6) [msmart.lan] Sokcet is None: 192.168.0.xxx:6444
Versions (版本信息)

Home Assistant version: af1abff
Midea msmart version: 2021.8.8

It’s obvious that can’t connect to your device.
Is the ip address correct?
is the port correct?
run midea-discover and show me the output

yes, its not plugged in
i dont use it all the time, so there are times when its offline for weeks.
it should stop looking after 10x tries or something?

run midea-discover and show me the output

there is nothing as its not plugged in sorry?
if you unplug your device, you can replicate the issue


Add documentation website

What are you trying to accomplish with this PR?
In an effort to improve the quality of our Docs, we are moving from GitHub's Wiki to use our own documentation website.
This effort will open up the possible contributions by the community while also giving us a better control on reviews and what get published.
This is also of our first opportunity to push Slate's branding forward.

It will be hosted using GitHub pages and the /docs folder on the master branch.
Documentation website preview

This is awesome @huguestennier. This will definitely help Slate push forward and further it's adoption 👏.
For starters this will be a much nicer place to link to than Github's Wiki.

@huguestennier are there any files in particular you want reviewed?

Also let's merge https://github.com/Shopify/slate/pull/914 before we merge this PR

@huguestennier are there any files in particular you want reviewed?

Nothing specific, if the preview website make sense then we should be good to go.
I added a very small custom script to highlight the section you're reading if you want to see here : https://github.com/Shopify/slate/blob/175ff3c8af2a8be4399b010401cc71e41bd3e310/docusaurus/v1/build/slate/js/custom.js
But other than that it's pretty default configuration


sample_weight (or weight) is ignored when the hessians of the loss are constant

It seems like LightGBM assumes if sample weights are given, the hessian and the gradients are multiplied by the sample weight, and the rest of the pipeline doesn't have to worry about the weights. For instance, FindBestThresholdSequence doesn't care about the weights.
The issue is that when the hessian is constant, the dadaset.cpp ignores the weights, around here:
https://github.com/microsoft/LightGBM/blob/0551f77517d971ce9bc32e2633768245957b410a/src/io/dataset.cpp#L824-L883
As a result, if the hessian is constant, sample weights are ignored. Is this intentional?
cc @NicolasHug

Basically I think that this line should take into account the weights instead of just the counts.
     for (int i = 0; i < num_bin; ++i) {
       data_ptr[i].sum_hessians = data_ptr[i].cnt * hessians[0];
     }

refer to
https://github.com/microsoft/LightGBM/blob/0551f77517d971ce9bc32e2633768245957b410a/src/objective/regression_objective.hpp#L148-L154
when weights are provided, is_constant_hessian is false.


Allow merge with empty defaultConfig in istio Operator

Description
Changes proposed in this pull request:

do not throw panic when passing iop file without defaultConfig set

Related issue(s)

/recheck-cla

/check-cla

/test all


Remove Node.js 12 support

This PR:

creates a breaking change to remove support for Node.js 12 since it's now EOL
adds some fancy new stuff: node: protocol imports and ?. optional chaining
finally updates execa@6, and also yaml@2
removes the supports-color dependency since colorette already exports a similar flag

I'm keeping it as a draft because it's rebased to https://github.com/okonet/lint-staged/pull/1159, but what do you think @okonet ?

@okonet looks like you need to update the required checks.

Done!


Documentation for build notifications using webhooks

Right now there is only docs for build notifications using an email address. I think we could add an example here https://docs.readthedocs.io/en/latest/guides/build-notifications.html
It should contain the steps for adding the webhook and what parameters are sent.

This was fixed in https://github.com/rtfd/readthedocs.org/pull/3671


[build] undefined reference to AddClipboardFormatListener | Define WINVER?

Some functions requires to have speicfiic windows versions.
By default in (gcc)winuser.h:
#ifndef WINVER
#define WINVER 0x0502
#endif

Due to that for example AddClipboardFormatListener() will not work as there will be no reference in header, though it is available starting from Vista
I believe that winver is defined only in windows headers, but not sure what's approach should be in case of gcc
As of current my build fails like that:
undefined reference to `AddClipboardFormatListener'
GCC 4.9.2 winuser.h:
#if WINVER >= 0x0600
  WINUSERAPI WINBOOL WINAPI AddClipboardFormatListener (HWND hwnd);
  WINUSERAPI WINBOOL WINAPI RemoveClipboardFormatListener (HWND hwnd);
  WINUSERAPI WINBOOL WINAPI GetUpdatedClipboardFormats (PUINT lpuiFormats, UINT cFormats, PUINT pcFormatsOut);
#endif

If you do not reference a function in your code then the symbol will be unreferenced and the linker will not attempt to link it. The undefined reference is NOT an issue with headers or the operating system version. Rather the issue is that the import libraries you have do not provide that symbol. Mingw's libraries are notorious for not having symbols from newer versions of Windows.
Now if you do link a symbol and then attempt to run your binary on a version of Windows that doesn't provide that function, your program will crash on startup with an error about being unable to find that symbol. I intend to eventually provide a way to delay load functions with a way to handle the case that the operating system doesn't provide the symbol.

Aww.. i see. I didn't consider that mingw would fail me like that :)
Sorry


Feature/textx2.0.1

First adaptation to new registration API.

Part 01: from textx/tests
Part 02, 03: accordingly...

BTW, I see you are doing some work on tkinter based model inspector in this repo. That sounds cool! ;)

I will also check the requirements* files.

BTW, I see you are doing some work on tkinter based model inspector in this repo. That sounds cool! ;)

Thanks ;-)
This is a separate experiment... Let's see if we can get something valuable from it.

Thank you for the review. If more issues are found, we can reopen a ne w ticket. Merging.


ggv2setup_test: TestScenerios Test Flake:  expected 1 listeners, got 0

Which tests failed?
Error:
 --- FAIL: TestScenarios/failover-default-diffns (1.20s)
        ggv2setup_test.go:276: applied yamls TestScenarios/failover-default-diffns
        ggv2setup_test.go:349: expected 1 listeners, got 0
        ggv2setup_test.go:355: expected 1 routes, got 0
        ggv2setup_test.go:378: listener http not found
        ggv2setup_test.go:381: listener http not equal
        ggv2setup_test.go:391: route http-routes-14610285773269467959 not found
        ggv2setup_test.go:394: route http-routes-14610285773269467959 not equal: name:"http-routes-14610285773269467959"  virtual_hosts:{name:"http~www_example_com"  domains:"www.example.com"  routes:{name:"http~www_example_com-route-0-httproute-http-gwtest-0-0-matcher-0"  match:{prefix:"/"}  route:{cluster:"kube-svc:gwtest-reviews-8080_gwtest"  cluster_not_found_response_code:INTERNAL_SERVER_ERROR}}}  ignore_port_in_host_matching:true vs <nil>
        ggv2setup_test.go:271: deleted yamls TestScenarios/failover-default-diffns
    ggv2setup_test.go:80: 2024-11-22T01:44:20.768Z	DEBUG	k8s.k8s-gw-proxy-syncer	proxy_syncer/proxy_syncer.go:421	building proxy for kube gw gwtest/http-failover-default version 381

Logs: https://github.com/solo-io/gloo/actions/runs/11964832927/job/33357822377?pr=10393
Initial Investigation
No response
Additional Information
No response

The key error:
ERROR controller/controller.go:316 Reconciler error {"controller": "gateway", ..., "error": "failed to render helm chart for gateway gwtest.http-failover-default-diffns: template: gloo-gateway/templates/gateway/proxy-deployment.yaml:115:65: executing \"gloo-gateway/templates/gateway/proxy-deployment.yaml\" at <$gateway.sdsContainer.image>: nil pointer evaluating interface {}.image"}

The test is failing because the Gloo Gateway controller encounters an error while rendering the Helm chart for the Gateway resource gwtest.http-failover-default-diffns. I have hit a similar error and resolved it by recreating the expected test output files:

rm -rf projects/gateway2/setup/testdata/*-out.yaml
Rerunning the setup tests twice (the first time fails but recreates the output files).

c: @yuval-k

I just ran the tests locally without hitting this issue:
$ go test -v ./projects/gateway2/setup
...
--- PASS: TestScenarios (31.74s)
    --- PASS: TestScenarios/failover-default-diffns (1.14s)
    --- PASS: TestScenarios/failover-default (1.10s)
    --- PASS: TestScenarios/failover (1.16s)
    --- PASS: TestScenarios/happypath (1.10s)
    --- PASS: TestScenarios/listeneropts (1.08s)
PASS
ok  	github.com/solo-io/gloo/projects/gateway2/setup	31.809s

We expect that this was resolved by https://github.com/solo-io/gloo/pull/10410. As a result, this is fixed on the 1.18 and main branches, which we believe are the only two branches impacted.


Move bench files

Bench files were being pulled when using as a dependency so I moved them to tests folder where this won't happen. Making the life of anyone using flat_files_decoder as dependency easier on the internet download. Also, I've added more details about this code on README.md
@severiano-sisneros can you check the TODO's in this code? I've written them in the key parts of the doc that I was not entirely sure on.

@severiano-sisneros sending this message to see if github extension for slack works to notify you.
Also, checkout the doc I added to receipts, if it makes sense. I wanted to clarify a bit of the inner workings of the tool using reth

@severiano-sisneros sending this message to see if github extension for slack works to notify you. Also, checkout the doc I added to receipts, if it makes sense. I wanted to clarify a bit of the inner workings of the tool using reth

@pedrohba1 doesn't look like I was notified in slack...


Write data to json and be able to edit json data.

Need to be able to store data in an editable format

{
account : value
balance: value
}

change in plans. Moving to pickle not json


Mutual Auth for Helidon 1.4.* version

Environment Details

Helidon Version:
Helidon SE or Helidon MP
JDK version:
OS:
Docker version (if applicable):

Problem Description
We would like to have same mutual auth supported that was done for Helidon 2.* as per the issue:
https://github.com/oracle/helidon/issues/658
I did have a conversation with Tomas Langer. Can you evaluate the feasibility and let us know?

Fixed by #2166


Smarter astgen handling

This improves the astgen binary handling.
The following rules apply:

If astgen is found on the system it is used without downloading binaries at all iff the version installed matches or is higher.
sbt stage downloads all binaries so the distribution always works on all platforms like before. This does not happen iff rule 1 triggers.
compile only downloads the astgen binary for the system it's invoked on.

This is for: https://github.com/joernio/joern/issues/2205

@max-leuthaeuser is there is any chance that item 1 could be expanded to:

If astgen is found on the system it is used without downloading binaries at all iff a compatible version is found.

where a compatible version satisfies both:

found.major == required.major
found.minor >= required.minor

If we require an exact match in version, then there is going to be an issue when it comes time to bump the version of the joern and astgen formulas. For example:

If the astgen formula is bumped first, then joern would find a newer astgen in the PATH and will resort to fetching binaries until its own formula is bumped.
If the joern formula is bumped first, then the astgen built by Homebrew will be older than required and the build system will again resort to fetching binaries until the astgen formula is bumped.

I do not believe the Homebrew maintainers allow for two formulas to be bumped in the same PR. If we instead check for a compatible version (as indicated by SemVer), then we would be able to bump the astgen formula and then the joern formula without ever resorting to fetching binaries.
The edge case here is when found.major != required.major. A possible solution for this is to add a means (e.g., command line option or environment variable) for us to fail the build if a compatible astgen version is not found. This means that the joern formula will fail until it is bumped whenever astgen has incompatible API changes, but I think that sounds reasonable.

An alternative solution is to implement item 1 as-is, but include the means to fail the build when an exact match is not found. I could then pin an exact astgen version in the joern formula to keep the two formula in sync. This way joern built with Homebrew either builds with a Homebrew built astgen or fails. The only drawback to this approach is that if you have astgen 3.2.0 installed, but joern has astgen 3.1.0 pinned, then you’re going to end up with both astgen 3.1.0 and astgen 3.2.0 installed even though astgen 3.2.0 should have been sufficient (according to SemVer).

@iandinwoodie Thanks for spotting this issue! You are right.
Astgen is using SemVer versioning but its sufficient to check for a version installed >= the version requested by joern. We do not need to distinguish between major/minor versions as I will never release a new astgen without having that specific new version tested within joern and updated there as well.
I updated this PR to do that comparison.


Add requirements-dev.txt

to make easy to set up a development environment.

The current test requires atari-py and mock.

Thank you. I added them.


Error 500 for highlightjs

Hi @mjackson, I am always getting an error 500 for the following file:

https://unpkg.com/browse/highlightjs/package.json

While this works:

<EMAIL_ADDRESS>

I've also been receiving quite a few 500 errors. It seems that the update has caused this.
@mjackson, any ideas?

lit-html.js errors also...
Plus CORS issues that I had to work around.

I'm sorry but there isn't enough information here to really do anything. I just pushed a few updates to the app.yaml config that I think may help.

there isn't enough information here to really do anything

True, any way I can help debugging the issue? From my side I only see the 500 error.
Actually right now every package I try gives me a 500 error.

I've already changed our code, but with Chrome with the Chrome debugger up, it was clear that a couple problems were happening.  One
problem seemed to be that then a file was loaded as a module, the modules that it loaded were not given the same CORS header.
The other problem was that loading lit-element.js or lit-element as a module was causing a chain of loads where one was not found.
Seemed to be a missing file or an out of date CDN cache.
Stephen
On 7/30/19 1:05 AM, Florian Keller wrote:

there isn't enough information here to really do anything

True, any way I can help debugging the issue? From my side I only see the 500 error.
Actually right now every package I try gives me a 500 error.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mjackson/unpkg/issues/208?email_source=notifications&email_token=AAA3XLTTL6WC2PW6J2KOT6LQB7Y35A5CNFSM4IHSCWCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3DEXHI#issuecomment-516311965,
or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3XLRMPXY6RWOEKAOLAZTQB7Y35ANCNFSM4IHSCWCA.

--
Stephen D. Williams
Founder, Yebo, VolksDroid, Blue Scholar
650-450-8649 tel:650-450-8649 | fax:703-995-0407 fax: |<EMAIL_ADDRESS><EMAIL_ADDRESS>| https://HelloYebo.com |
https://VolksDroid.org | https://BlueScholar.com | https://sdw.st/in


How to build scenario tree from historical data

I try to do a multi-stage optimization. And I have historical data about uncertainty. Is there any example which can show how to construct the scenario tree using these historical data? Or which function should I use?

Currently there is no tool to construct multistage scenario tree from historical data in StochOptim (only (1) multistage from distribution and (2) two-stage from historical data). So one possibility would be to infer a distribution from your data and apply (1). Another possibility is to use a more standard "distribution-driven approach" like SCENRED2 (available in GAMS).


Composer autoloading for L5.5

We should add support and document in the readme the new L5.5 composer autoloading trough composer options.

Added in https://github.com/thedevdojo/chatter/pull/136

Thank you.


Incorrect priorities for array_indentation and method_chaining_indentation

For configuration or updating questions please read the README and UPGRADE documentation,
or visit: https://gitter.im/PHP-CS-Fixer
When reporting an issue (bug) please provide the following information:
The PHP version you are using ($ php -v):
=> 7.1.14
PHP CS Fixer version you are using ($ php-cs-fixer -V):
=> 2.11.0
The command you use to run PHP CS Fixer:
=> vendor/bin/php-cs-fixer fix
The configuration file you are using, if any:
<?php

return PhpCsFixer\Config::create()
	->setIndent("\t")
	->setUsingCache(false)
	->setRules([
		'method_chaining_indentation' => true,
		'array_indentation' => true,
	])
	->setFinder(
		PhpCsFixer\Finder::create()->in(__DIR__)
	)
;

If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):

before running PHP CS Fixer (no changes):

<?php

Foo::bar([
		'baz',
	])
	->call();

with unexpected changes applied when running PHP CS Fixer:

First run:
 Foo::bar([
-		'baz',
-	])
+	'baz',
+])
 	->call();

Second run:
 <?php

 Foo::bar([
 	'baz',
 ])
-	->call();
+->call();

thanks for report. closing due to merge of fix #3626


[CamHub] Add extractor for CamHub.cc

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[X] At least skimmed through contributing guidelines including yt-dlp coding conventions
[X] Searched the bugtracker for similar pull requests
[X] Checked the code with flake8

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[X] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[ ] Improvement
[X] New extractor
[ ] New feature

Description of your pull request and other information
CamHub.cc uses KVS Player hosted inside an iframe.  GenericIE supports KVS Player, but can't find the video content due to the iframe and fails, so there has been no support for this site until now.  This new extractor, CamHubIE, simply extracts the iframe src url, then hands that url off to GenericIE to do the rest.

Added new camhub.py extractor and test
Added import in extractors.py
Verified code with flake8 and ran test

This is a piracy site and support for it must not be implemented in yt-dlp

Ah, didn't realize.  Please disregard PR then.

Closing since it's a piracy site.


Adding to borderRadius to tabBarOptions leave a white background. Can not add radius to the Tab Bar.

Bug
When I try to add some curvature to the edges of the Tab Bar (so it doesn't look like a perfect rectangle), the Tab Bar does bend the edges but the background of the Tab Bar has  a white background which ruins the whole point.
The only custom options I added to the given implementation in the README file is adding of these Tabbar options -
tabBarOptions={{         style: {           backgroundColor: '#181818',           borderRadius: 30,           borderTopWidth: 2,           borderColor: 'rgba(255, 255, 255, 0.1)',         },       }}
FYI: Removing everything else from the above tabBarOptions, except for borderRadius also produces the same issue of white background.
Here is the image of how it looks now.

Environment info

Library
Version

@gorhom/animated-tabbar
2.0.0

react-native
0.63.2

react-native-reanimated
1.9.0

react-native-gesture-handler
1.6.1

react-native-svg
^12.1.0

Steps To Reproduce

Add borderRadius to tabBarOptions
The Tab bar does have a radius now, but there is a white background in the back which ruins the whole point.

Describe what you expected to happen:

There should be a way to add radius to the white background in the back as well or it has to be transparent, so, more custom tab bars on top of the brilliant TabBar provided by this package

Reproducible sample code
<TabHere.Navigator       initialRouteName="Clubs"       tabBarOptions={{         style: {           backgroundColor: '#181818',           borderRadius: 30,           borderTopWidth: 2,           borderColor: 'rgba(255, 255, 255, 0.1)',         },  }}    tabBar={(props) => (         <AnimatedTabBar           tabs={tabs}           preset="flashy"           keyboardHidesTabBar={true}           iconSize={20}           itemContainerWidth="fill"           {...props}         /> )}>

Solution: Just change the default theme settings of Navigation Container.

Can you explain it just with a bit of code for help ;-;

import { DefaultTheme } from '@react-navigation/native';
import colors from '../Config/colors';
export default {
    ...DefaultTheme,
    colors: {
        ...DefaultTheme.colors,
        primary: colors.primary,
        background: colors.background,   // provide same color as you component color , in this way you will remove white
                                                                 color or what else color.
        card: colors.white,
        text: colors.fontDark,

    },

}

to know about the Theme goto----->   https://reactnavigation.org/docs/themes/


GitHub Link

A github corner to link to our repo
eg:

I can work on it.

@eddiejaoude can you assign this issue to me

Is this still open?

CC @Cahllagerfeld (Do we work on this considering #913 )

@eddiejaoude assign to me sir I want to work on it


feat: latest highlights

What type of PR is this? (check all applicable)

[x] 🍕 Feature
[ ] 🐛 Bug Fix
[ ] 📝 Documentation Update
[ ] 🎨 Style
[ ] 🧑💻 Code Refactor
[ ] 🔥 Performance Improvements
[ ] ✅ Test
[ ] 🤖 Build
[ ] 🔁 CI
[ ] 📦 Chore (Release)
[ ] ⏩ Revert

Description
This PR adds a new constant for the highlights endpoint and fetches the latest highlight from the API to display on the home page. It also adds pagination to the highlights section and allows users to navigate through the highlights. Additionally, it includes a new function to fetch highlights from the API.
Generated using OpenSauced.

Related Tickets & Documents

closes #78
Mobile & Desktop Screenshots/Recordings

https://github.com/open-sauced/ai/assets/34313413/3ec8b756-8058-4ab0-81d3-23eadf03bb7b
Added tests?

[ ] 👍 yes
[x] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

Added to documentation?

[ ] 📜 README.md
[ ] 📓 docs.opensauced.pizza
[ ] 🍕 dev.to/opensauced
[ ] 📕 storybook
[x] 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?

@bdougie I moved that PR here.

Going to merge as is and focus on the comments here https://github.com/open-sauced/ai/issues/159


Closing Visual Studio When DisplayNameFor Set

This issue has been moved from a ticket on Developer Community.

I have a Dto Class object it contain one class and one dto List of object class when i want use DisplayNameFor that is List Items Visual Studio Class Close and open again
public class DtoCategoryWithItemsWithoutDetail
    {
        public Category Category { get; set; }
        public IEnumerable<DtoItemsWithoutDetail> DtoItemsWithoutDetails { get; set; }
    }

And my DtoItemsWithoutDetails  Class is
public class DtoItemsWithoutDetail
    {
        [HiddenInput]
        [Display(Name = "Id")]
        public int Id { get; set; }
        [Display(Name = "Name")]
        public string Name { get; set; }
        [Display(Name = "Status")]
        public int Statue { get; set; }
        [Display(Name = "Sort")]
        public int Sid { get; set; }
        [Display(Name = "ParentId")]
        public int CategoryId { get; set; }
        [Display(Name = "ShowInMainPage")]
        public bool ShowInMainPage { get; set; }
    }

when i want to use in my page as model i get error
@model Common.Dtos.DtoCategoryWithItemsWithoutDetail

                @Html.DisplayNameFor(model => model. DtoItemsWithoutDetails.Name)

                 @Html.DisplayNameFor(model => model. DtoItemsWithoutDetails.Id)

                @Html.DisplayNameFor(model => model. DtoItemsWithoutDetails.Sid)

                @Html.DisplayNameFor(model => model. DtoItemsWithoutDetails.CategoryId)

                @Html.DisplayNameFor(model => model. DtoItemsWithoutDetails.Statue)

i thought the problem may have been from my writing and when i want change my code as @Html.DisplayNameFor(model => model. DtoItemsWithoutDetails[0]. CategoryId)
when i click 0(zero) visual studio close and start again

Original Comments
Visual Studio Feedback System on 12/16/2019, 01:40 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Visual Studio Feedback System on 12/18/2019, 03:07 AM:
Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

Original Solutions
(no solutions)

@NTaylorMullen I'm not sure what the issue is here. Given it was filed almost two years ago and the new editor is the default, do you think it'd safe to close?

@allisonchou definitely!

Thank you for your reported issue. We believe this issue is fixed in the latest Visual Studio 2022. If you'd like to try this tooling out you can download the latest VS 2022 and re-try your scenario.
If this issue has been closed and you're still encountering issues feel free to respond to still communicate via the issue and we'll re-open if needed.


Playground Wordpress Error

Drew on the TF Grid Telegram channel sent an error message when deploying wordpress:

Looks like the error comes from those files:

client.ts
mod.rs

Could it be that the node isn't properly linked to its twinid?
Or perhaps it looks like the RMB has trouble authenticating the message provenance.

Error doesn't seem replicable.
Bert on TG:
"all nodes online, could not replicate the error. Got a wordpress on devnet node 14"


Can you add a license file?

Very interesting project! Will you be able to add a license file so it could be used in other projects?

There you go :)


Erase attendance 14

Brief Description of Fix
Added the functionality to erase the attendance by option 3, this will delete the attendance.txt file
Linked Issue
Closes #14 (Replace with Issue number)

LGTM

!bounty 20


Every 2nd attempt to signup, in local supabase, fails after supabase db reset

Bug report
Describe the bug
Trying to sign up for the very first new supabase user, on local, EVERY second attempt, after supabase db reset fails.
I have tried varying wait times, sleep, etc... Nothing seems to change the fact that EVERY second attempt to
signup for a new user fails.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

supabase db reset
Signup for a new user via the API, e.g using curl

URL="http://localhost:54321/auth/v1/signup"
curl -X POST -H "Content-Type: application/json" -H "apikey: $API_KEY" -d "$DATA" "$URL"

Success
supabase db reset
try to sign up for a new user again using the SAME script
Fail {"code":500,"msg":"Database error finding user","error_id":"cb34c32b-14d1-4e7f-a636-803a70463078"}%

Expected behavior
A clear and concise description of what you expected to happen.
Logs
After first supabase db reset:
2023-01-03 21:47:24 {"component":"api","level":"info","method":"POST","msg":"request started","path":"/signup","referer":"","remote_addr":"<IP_ADDRESS>","time":"2023-01-03T19:47:24Z","timestamp":"2023-01-03T19:47:24Z"}
2023-01-03 21:47:25 {"action":"login","instance_id":"00000000-0000-0000-0000-000000000000","level":"info","login_method":"password","metering":true,"msg":"Login","time":"2023-01-03T19:47:25Z","user_id":"b242a57f-1732-475e-8f2d-87d05ed25937"}
2023-01-03 21:47:25 {"auth_event":{"action":"login","actor_id":"b242a57f-1732-475e-8f2d-87d05ed25937","actor_username":"pro@naine.fit","log_type":"account","traits":{"provider":"email"}},"component":"api","duration":104993041,"level":"info","method":"POST","msg":"request completed","path":"/signup","referer":"","remote_addr":"<IP_ADDRESS>","status":200,"time":"2023-01-03T19:47:25Z","timestamp":"2023-01-03T19:47:24Z"}

After second, failed attempt:
2023-01-03 21:48:33 {"component":"api","level":"info","method":"POST","msg":"request started","path":"/signup","referer":"","remote_addr":"<IP_ADDRESS>","time":"2023-01-03T19:48:33Z","timestamp":"2023-01-03T19:48:33Z"}
2023-01-03 21:48:33 {"component":"api","error":"error finding user: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)","level":"error","method":"POST","msg":"500: Database error finding user","path":"/signup","referer":"","remote_addr":"<IP_ADDRESS>","time":"2023-01-03T19:48:33Z","timestamp":"2023-01-03T19:48:33Z"}
2023-01-03 21:48:33 {"component":"api","duration":492459,"level":"info","method":"POST","msg":"request completed","path":"/signup","referer":"","remote_addr":"<IP_ADDRESS>","status":500,"time":"2023-01-03T19:48:33Z","timestamp":"2023-01-03T19:48:33Z"}

As evident from the logs, they're not that far apart.
System information
macOS 12.3.1
"supabase": "^1.27.10",

Current workaround, for anyone wondering:
# Send the POST request
curl -X POST -H "Content-Type: application/json" -H "apikey: $API_KEY" -d "$DATA" "$URL"

# Sign up a second time, because the first time it might fail :D
curl -X POST -H "Content-Type: application/json" -H "apikey: $API_KEY" -d "$DATA" "$URL"

I have narrowed it down to here https://cs.github.com/supabase/gotrue/blob/9eda0ab2668578aa63d332514b1a8a4b088aafd5/api/invite.go#L42
as much as Is possible from just reading code.

I've been experiencing this too and I think I've found a more general problem.
When you run supabase db reset with the CLI, you will immediately see the following in the PostgREST logs:
``
FATAL:  terminating connection due to administrator command
03/Apr/2023:18:39:23 +0000: Retrying listening for notifications on the pgrst channel..
03/Apr/2023:18:39:23 +0000: Attempting to connect to the database...
03/Apr/2023:18:39:23 +0000: {"code":"PGRST000","details":"FATAL:  database "postgres" does not exist\nDETAIL:  It seems to have just been dropped or renamed.\n","hint":null,"message":"Database connection error. Retrying the connection."}
03/Apr/2023:18:39:23 +0000: Attempting to reconnect to the database in 0 seconds...
03/Apr/2023:18:39:24 +0000: {"code":"PGRST000","details":"could not connect to server: Connection refused\n\tIs the server running on host "supabase_db_supabase" (<IP_ADDRESS>) and accepting\n\tTCP/IP connections on port 5432?\n","hint":null,"message":"Database connection error. Retrying the connection."}
03/Apr/2023:18:39:24 +0000: Attempting to reconnect to the database in 1 seconds...

So, PostgREST notices straight away.

In the GoTrue logs, you'll immediately see:

i.e. nothing

The moment you try to interact the the auth API, the GoTrue logs show:

{"component":"api","level":"info","method":"GET","msg":"request started","path":"/admin/users","referer":"","remote_addr":"<IP_ADDRESS>","time":"2023-04-03T18:40:23Z","timestamp":"2023-04-03T18:40:23Z"}
{"component":"api","error":"FATAL: terminating connection due to administrator command (SQLSTATE 57P01)","level":"error","method":"GET","msg":"500: Database error finding users","path":"/admin/users","referer":"","remote_addr":"<IP_ADDRESS>","time":"2023-04-03T18:40:23Z","timestamp":"2023-04-03T18:40:23Z"}
{"component":"api","duration":3629791,"level":"info","method":"GET","msg":"request completed","path":"/admin/users","referer":"","remote_addr":"<IP_ADDRESS>","status":500,"time":"2023-04-03T18:40:23Z","timestamp":"2023-04-03T18:40:23Z"}

So, it's not until the first post-DB-reset request that GoTrue notices and returns a 500 error.
I guess it does some error recovery shortly after that because subsequent requests work fine.

I think @huntedman has seen a specific instance of this; I was also seeing this and then I added a call to the admin APIto get a list of users (which is what you see above) and figured out what was going on.

Hmm seems like when the db is reset, the existing db connections in gotrue are stale and when reused, it leads to this error. A possible solution would be to also reset gotrue after the db has been reset. I'm transferring this to the CLI team so that @sweatybridge and @soedirgo can take a look.


Running tensorflow on GPU is far slower than on CPU

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 1809 & Windows Server 2016
TensorFlow installed from (source or binary): pip install tensorflow-gpu==2.0.0-beta1, as well as tensorflow-gpu, compared to tensorflow & tensorflow==2.0.0-beta1
Python version: 3.6
Bazel version (if compiling from source): -
GCC/Compiler version (if compiling from source): -
CUDA/cuDNN version: Cuda 10 & cuDNN 7.6.2 for cuda 10.0

Current behavior:
Im getting a 50%+ performance loss with GPU!
In the below example, the CPU version is even training way faster on a bigger model with slightly bigger epochs.

Im training on 2 different systems:
My server, without a GPU:
Intel Core i5 6500T<EMAIL_ADDRESS>ghz) Notebook processor
Network attached storage for training data and output
16 Gb DDR 4 Ram
My Desktop PC:
Intel core i7 3770k (4x3,5-4 ghz)
Nvidia GTX 970 @4GB
32gb ddr3 ram
Training Data on local SSD, output to NAS
Now interestingly 3000 epochs, 100000 records each, takes roughly 3h on the server using TF 1.14
The same on my Desktop with GPU takes 8h with TF 2.0
It sits with full Video Ram but at 3% graphical processor use.
The CPU is sometimes at 30% use with tensorflow GPU but 100%  at any time with any CPU build.
The harddisk is utilized with a whopping 0%.

Expected behavior:
Tensorflow-GPU trains faster than Tensorflow CPU
Code to reproduce the issue:
My model is a fairly simple keras sequential lstm:
for learningrate in learningrates:
	for layerdensity in layerdensitys:
		for layer in amount_of_layers:
			################################
			# generate model               #
			################################
			modelname = f"{layer}-layer_{layerdensity}-nodes_selu-adam_{learningrate}-learningrate_{records_per_epoch}-epochsize_{appendix}"
			model = keras.Sequential()
			model.add(Dense(layerdensity, activation=tf.nn.selu, input_dim=15))
			for i in range(layer-1):
				model.add(Dense(layerdensity, activation=tf.nn.selu))
			model.add(Dense(9,activation=tf.nn.softmax, name = "Output"))
			# Compile
			optimizer = tf.keras.optimizers.Adam(lr=learningrate)
			model.compile(
				optimizer=optimizer,
				loss='sparse_categorical_crossentropy',
				metrics=['accuracy'])
			model.summary()
			tensorboard = TensorBoard(log_dir="\\\\drg-fs01\\BigData\\Projects\\Notebooks\\PokerBot\\log\\" + modelname,
				histogram_freq = 100, write_graph = False)
			#cp_callback = tf.keras.callbacks.ModelCheckpoint("\\\\drg-fs01\\BigData\\Projects\\Notebooks\\PokerBot\\checkpoints\\" + modelname, verbose=0)
			################################
			# train model                  #
			################################
			model.fit(trainSet,
				epochs = epochs,
				steps_per_epoch = trainSteps,
				shuffle = True,
				validation_data = testSet,
				validation_steps = testSteps,
				validation_freq = int(epochs/maxTestEpochs),
				verbose = verbose,
				callbacks = [tensorboard])#,cp_callback])
			model.save(basePath+'saved_models/' + modelname + '.h5')

I am having lots of test data which does not fit in memory so I use interleaved datasets:
# dataset modeler
def modelDataset(sourcepath, badgesize, repeat = False, repetitions = 10):
    #get all files
    list = os.listdir(sourcepath)
    pathfiles = [sourcepath+x for x in list]

    #get metrics
    rows_per_file = count_lines(sourcepath+"0.csv")
    number_of_files = len(list)
    total_rows = (rows_per_file * number_of_files)
    print(f"records: {total_rows}")
    # get number of steps per Epoch
    steps_per_epoch = int(rows_per_file / badgesize) # 2000 badges per epoch
    epochs = number_of_files
    if badgesize == 1:
        epochs = 1
    print(f"number epochs: {epochs}")
    # model interleaved dataset
    dataset = (tf.data.Dataset.from_tensor_slices(pathfiles).interleave(lambda x:
        tf.data.TextLineDataset(x).map(parse_csv, num_parallel_calls=4),
        cycle_length=4, block_length=16))
    dataset.columns = CSV_COLUMNS

    if badgesize != 1:
        dataset = dataset.shuffle(buffer_size=badgesize)
    if repeat:
        dataset = dataset.repeat(repetitions)
        epochs = epochs * repetitions
    dataset = dataset.batch(badgesize)
    dataset = dataset.prefetch(2)  # prefetch one batch
    return dataset, steps_per_epoch, epochs, badgesize

@forReason Provide us the full code snippet to reproduce the reported issue. It will indeed help us to move faster. Thanks!

I have been able to increase the speed by upping the Batchsize to 128.
Still taskmanager shows a low gpu utilisation but the cpu utilisation increased.

here is my full script trainmodel.py:
from __future__ import absolute_import, division, print_function, unicode_literals

from sklearn.model_selection import train_test_split

# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.initializers import glorot_uniform
from tensorflow import feature_column
from tensorflow.keras import layers
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Activation, Embedding, Flatten, LeakyReLU, BatchNormalization, Dropout
import tensorflow_datasets as tfds

# Helper libraries
import numpy as np
import time
import os
from tqdm import tqdm #progressbars

print(tf.__version__)

# count lines
def count_lines(path):
    rownumber = 0
    with open(path, "r",encoding="utf-8",errors='ignore') as f:
        rownumber =  sum(bl.count("\n") for bl in blocks(f))
    return rownumber

def blocks(files, size=65536):
    while True:
        b = files.read(size)
        if not b: break
        yield b

basePath = "//[fileshare]/BigData/Projects/Notebooks/Trainmodel/"
localPath = "C:/temp/Trainmodel/"

valPath = localPath+"val/"
trainPath = localPath+"train/"
testPath = localPath+"test/"

# csv to tensor parser
def parse_csv(line):
        parsed_line = tf.io.decode_csv(line, [[0.], [0.], [0.],[0.], [0.], [0.], [0.],[0.], [0.], [0.], [0.],[0.], [0.], [0.], [0.], [0]])
        label = parsed_line[-1:]
        del parsed_line[-1]
        features = parsed_line
        return tf.stack(features),label

# dataset modeler
def modelDataset(sourcepath, badgesize, repeat = False, repetitions = 10):
    #get all files
    list = os.listdir(sourcepath)
    pathfiles = [sourcepath+x for x in list]

    #get metrics
    rows_per_file = count_lines(sourcepath+"0.csv")
    number_of_files = len(list)
    total_rows = (rows_per_file * number_of_files)
    print(f"records: {total_rows}")
    # get number of steps per Epoch
    steps_per_epoch = int(rows_per_file / badgesize) # 2000 badges per epoch
    epochs = number_of_files
    if badgesize == 1:
        epochs = 1
    print(f"number epochs: {epochs}")
    # model interleaved dataset
    dataset = (tf.data.Dataset.from_tensor_slices(pathfiles).interleave(lambda x:
        tf.data.TextLineDataset(x).map(parse_csv, num_parallel_calls=4),
        cycle_length=4, block_length=16))
    #dataset.columns = CSV_COLUMNS

    if badgesize != 1:
        dataset = dataset.shuffle(buffer_size=badgesize)
    if repeat:
        dataset = dataset.repeat(repetitions)
        epochs = epochs * repetitions
    dataset = dataset.batch(badgesize)
    dataset = dataset.prefetch(2)  # prefetch one batch
    return dataset, steps_per_epoch, epochs, badgesize

# load interleaved dataset
trainSet, trainSteps, maxTrainEpochs, trainBadgeSize = modelDataset(trainPath, 256, True)
print (f"max number of epochs: {maxTrainEpochs}")
testSet, testSteps, maxTestEpochs, testBadgeSize = modelDataset(testPath, 256,True,4)
valSet, valSteps, maxValEpochs, valBadgeSize = modelDataset(valPath, 1)

# compile model
learningrates = [0.0002]
layerdensitys = [40]
amount_of_layers = [5]
appendix = "GPUtest"
epochs = maxTrainEpochs
records_per_epoch = trainSteps * trainBadgeSize
verbose = 0

################################
# train model                  #
################################
modelname = "unspecified"
for learningrate in learningrates:
	for layerdensity in layerdensitys:
		for layer in amount_of_layers:
			################################
			# generate model               #
			################################
			modelname = f"{layer}-layer_{layerdensity}-nodes_selu-adam_{learningrate}-learningrate_{records_per_epoch}-epochsize_{appendix}"
			model = keras.Sequential()
			model.add(Dense(layerdensity, activation=tf.nn.selu, input_dim=15))
			for i in range(layer-1):
				model.add(Dense(layerdensity, activation=tf.nn.selu))
			model.add(Dense(9,activation=tf.nn.softmax, name = "Output"))
			# Compile
			optimizer = tf.keras.optimizers.Adam(lr=learningrate)
			model.compile(
				optimizer=optimizer,
				loss='sparse_categorical_crossentropy',
				metrics=['accuracy'])
			model.summary()
			tensorboard = TensorBoard(log_dir="\\\\[fileshare]\\BigData\\Projects\\Notebooks\\Trainmodel\\log\\" + modelname,
				histogram_freq = 100, write_graph = False)
            #cp_callback = tf.keras.callbacks.ModelCheckpoint("\\\\[Fileshare]\\BigData\\Projects\\Notebooks\\Trainmodel\\checkpoints\\" + modelname, verbose=0)
            ################################
            # train model                  #
            ################################
			model.fit(trainSet,
				epochs = epochs,
				steps_per_epoch = trainSteps,
				shuffle = True,
				validation_data = testSet,
				validation_steps = testSteps,
				validation_freq = int(epochs/maxTestEpochs),
				verbose = verbose,
				callbacks = [tensorboard])#,cp_callback])
			model.save(basePath+'saved_models/' + modelname + '.h5')

I have also faced this issue when training a GAN on gpu, but I do see sparks up to .3% utilization when placement is default. Manually placing had no effect, but I thought it may be because slow transfer/read from cpu to gpu, but this makes it seem like something else. Thanks for doing the research on this @forReason

@esslushy Really nothing jumps to my mind. First, I thought it might be the IO on network so I pulled 50GB of data locally grr. didnt help.
Having Drive and Network at Literally 0% is a headscratcher to me.
Next, I thought it might be the parse function:
# csv to tensor parser
def parse_csv(line):
        parsed_line = tf.io.decode_csv(line, [[0.], [0.], [0.],[0.], [0.], [0.], [0.],[0.], [0.], [0.], [0.],[0.], [0.], [0.], [0.], [0]])
        label = parsed_line[-1:]
        del parsed_line[-1]
        features = parsed_line
        return tf.stack(features),label

But why would it be faster on a slower cpu where it has to parse and train on the same chip?
When preparing the data with my own c# Program, I can shuffle, augment data and write to disk roughly 1ep/3secs (100'000 records)
but when training, I can get 1 step in 2.45s

I think that your CPU performance is better than GPU performance because you have a relatively small model.  You should try a test run with
amount_of_layers = [5, 50, 150]
And see if GPU is still performing slower than CPU.
As a poster on S.O. says, "the overhead of invoking GPU kernels, and copying data to and from GPU, is very high. For operations on models with very little parameters it is not worth of using GPU"
Related StackOverflow Post

Additionally, you can also try to use the TensorBoard profiler to see if that points to any red flags.

I've just spent half a day, trying to get through the flimsy installation of GPU support for Windows 10, and when I finally got it all working, I got my GTX 780 performing about 10 times worse than my CPU. That's bad.

Hello Guys,
Issue seems to be fixed with TF 2.1 for me as well as Graphics card swap to RTX 2080.
Still many thanks for your assistance.

So the only solution is updating TF? that's bad since I have a older GPU and as far as I remember the newer TF are not compatible with older cuda versions... And what exactly was the problem, I'm a bit confused with your solution, the solution was to buy a new GPU? or update TF? or only by doing both?
Thanks =)

I've just spent half a day, trying to get through the flimsy installation of GPU support for Windows 10, and when I finally got it all working, I got my GTX 780 performing about 10 times worse than my CPU. That's bad.

Did you solve your performance problem ?
I have the same problem : GPU : GeForce GTX 1080 8Go, CPU : Intel Xeon E5-2667 v3 @ 3.20GHz RAM 12Mo...
I don't understand if I really use the GPU...

Hello Guys,
Issue seems to be fixed with TF 2.1 for me as well as Graphics card swap to RTX 2080.
Still many thanks for your assistance.

So the only solution is updating TF? that's bad since I have a older GPU and as far as I remember the newer TF are not compatible with older cuda versions... And what exactly was the problem, I'm a bit confused with your solution, the solution was to buy a new GPU? or update TF? or only by doing both?
Thanks =)

Hey Arruda,
unfortunately I can not specify as I upgraded both at the same time.
Apparently, I have to upgrade my cpu now since after upgrading GPU now my CPU is the Bottleneck... 7 Years old computer... But its still a lot faster.
II guess at this point, that more powerful hardware = faster processing no matter if there is a bug or not.

Here you can find a very usefull tutorial. I faced the same problem, and that post really helped. The issue was in cudnn- and cuda- conda driver versions incompatibility.
Hope, this will help

Changing my batch size from 10 to 2048 increased performance from about 6 minutes to 15 seconds.


test: add fuzz testing

which functions would you want to fuzz specifically? Only the external ones?


Manifests for OLM 0.15.1

Description of the change:
Motivation for the change:
Reviewer Checklist

[ ] Implementation matches the proposed design, or proposal is updated to match implementation
[ ] Sufficient unit test coverage
[ ] Sufficient end-to-end test coverage
[ ] Docs updated or added to /docs
[ ] Commit messages sensible and descriptive

/lgtm

Merging this manually since master is closed.


Update CODE-OF-CONDUCT.md

Hi,
I identified typos in this section:

"...pledge to making participation..." should be "...pledge to make participation..."
 could be rephrased for clarity as "...ethnicity, sexual characteristics..."
"...conduct which could reasonably be considered..." might read better as "...conduct that could reasonably be considered...".

PR Description
Fixed Issue(s)

Documentation

[ ] I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

[ ] I thought about adding a changelog entry, and added one if I deemed necessary.

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

Thanks for the PR!


Fix false positive in ComparingUnrelatedTypes when comparing to integral literals

The ComparingUnrelatedTypes rule would often trigger false positives in comparisons against integral type literals. For example,
val x = 1
x == 100L

would trigger a false positive even though this is a safe comparision because the long value 100L fits within an Int type.
To avoid such false-positive, this patch extends the ComparingUnrelatedTypes rule to add special-case checks for the comparision of an integral value to a literal integral value. In such cases, we check whether the literal is a valid value of the other value's type.  Thus (c: Char) == 97 is considered valid but (c: Char) == 128000 is not.
Fixes #111.

This fix eliminates 33 false-positives in Apache Spark. There are other false-positives in this rule due to comparisons against null, but I'll fix those in a separate PR.
I'm still somewhat new at working this deeply with Scala compiler trees, so feedback / criticism on code content / style is very welcome.

Thanks.

this is a safe comparision because the long value 100L fits within an Int type.

I don't really think this is how Scala / Java works here.
I believe that, if the long value does not fit within an Int type (or more likely, if it cannot be proven to doso), this is still a safe comparison.
Consider this function:
val x = 100

def isEqualToX(y: Long) = {
   x == y
}

I assert that this is a safe comparison, regardless of the value of y.
As I understand the JVM, the compiled code will promote x to a Long before comparing it to y.
I think that:

The scapegoat ComparingUnrelatedTypes rule ought to be aware of such promotions and consider the comparisons of "related types" when the compiler will make them related via promotion.
While the fix proposed here addresses some subset of the false-positives arising from a lack of point (1), it makes scapegoat's behaviour diverge further from the compiler's behaviour, so it isn't the best fix


update docker-push, update-deployment ci for use-host-ovs image

This aims to enhance docker push and update deployment ci workflows to include Dockerfile.use-host-ovs file in addition to Dockerfile.
This PR is outcome of this review comment.
Signed-off-by: Periyasamy Palanisamy<EMAIL_ADDRESS>

@edwarnicke is it good now to merge ?


OpenPype dashboard

Feature proposal
When runnig OpenPype, tray icon is created in sys tray and that's all. I think good feature for artists would be window, that will open on OpenPype tray start, that would include launcher already set on last project/asset/task user was working on.
On the left side there would be some relevant information for the user.

Note: this picture is still early WIP
This of course needs more things to implement first:

store local status (last task user was working on)
openpype event log - place to store events that are happening inside openpype, like version was published, etc.
some internal URI scheme to point to stuff inside openpype. For example PROJECT/ASSET/SUBSET/VERSION => openpype://current/project/asset/subset?version=v01 in case of version or openpype://foo_bar-v3.2.0-nightly.6+staging/project/asset/subset?version=v01 in case we need context of openpype version?

Determination of what's of interest for the user - for example create list of task user launched application on, or get their assignment from ftrack.
Ideas:

click on subset version in dashboard will open application with workfile used to publish it
show thumbnails there
show latest messages from Slack integration
show statuses from task submitted to farm by user
...

[cuID:yjxycu]

not a bad idea at. Let's try to flesh it out in more detail and put it through some serious brainstorm with mockups.


Adopt PEP 517 and PEP 621

Changes

Replaced setup.py with new format pyproject.toml using the flit backend.
Updated pre-commit hooks to include formatters and checkers for TOML files.
Removed the obsolete requirements*.txt and Manifest.in files.
Dealt with an import-based error that occurred due to the sequence in which modules are loaded at import (attempting to call ravenpy before it is installed).

What still needs to be addressed

There is now no method of building raven-hydro from PyPI. The current approach was rendered obsolete in pip>=23.1, so we are in the right to retire this method.

A new method of installing raven-hydro using scikit-build-core is in the works.

The CI for the PyPI builds using tox are broken due to the missing raven-hydro binary. There is likely a whole slew of things that must be addressed in tox (removal of tons of now-obsolete workarounds), so don't expect this to work yet.
~There are documentation files as well as the top-level Makefile that refer to operations using setup.py, and twine. These need to be replaced with their flit-based equivalents. For more information, see: https://flit.pypa.io/en/stable/index.html~

Addressed.

The build recipes no longer build on each other, so when installing the dev or docs recipe, you must also install the gis recipe. A temporary workaround I've added is to simply list the gis recipes in both for now (this is terrible form).

The new fiona-related errors are due to changes in geopandas that affect reading files from URLs: https://github.com/geopandas/geopandas/pull/2796
The fix is to simply adjust the way we handle these objects in ravenpy.utilities.geoserver. Benefits include significant read speedups.

I think I've earned this.

Excepting changes to expected values that will be in the new Raven-Hydro version and a few platform-specific bugs, everything is working!

Pydantic failures on conda have already been addressed. Conda package soon: https://github.com/pydantic/pydantic/issues/5824

There's an environment inconsistency for conda:

The newest raven-hydro is built against the newest libnetcdf/libhdf5/etc.
The last build of climpred on conda-forge was in November 2022 (no updates since)

As it stands, the libraries are incompatible:
  - climpred               2.1.6  pyhd8ed1ab_1                 conda-forge
  + climpred               2.3.0  pyhd8ed1ab_0                 conda-forge/noarch       Cached
  - raven-hydro            0.2.0  py310h3ce4ad4_0              conda-forge
  + raven-hydro              3.6  ha2b8ddb_1                   conda-forge/linux-64     Cached

I think climpred needs to be regenerated, or we need to offer pinned versions of netCDF (which I really very much don't want to do).

@huard
It's looking good! The last thing that needs to be revised is the one failing test on macOS. I think it has to do with the CRS not being read on file open. One approach would be to change the engine being used to read the file (try GeoPandas?) Will explore this tomorrow.


[UNBLOCK]

Domains to be removed:

cint.com

Reason for removal:
See AdAway issue #105.

This prevents me from filling out the questionnaire to https://sw.ktrmr.com/ . This is a survey questionnaire platform and its matcher, not an ad.

Screenshot:

No it's SpyWare / TrackWare :unamused:

Doesn't look like it actually. Removed.


Fix lost pending_actions causing actions on stale objects.

We have been discovering and fixing places where hostdb was invoking handlers against HttpSM without a lock.

55ba409333692db22762f84567f106eac34963e3
https://github.com/apache/trafficserver/pull/4142

As we have been running this fix in production, our set of crashes has changed.  Specifically we were seeing HOSTDB_LOOKUP events showing up in HttpSM::state_http_server_open and causing an unexpected event assert.  I think these changes were pushing crashes down the pipe.  Looking more closely at the cores, the HOSTDB_LOOKUP event was being invoked against a stale HttpSM.  Looking further down the stack, the hostname that DNS was using was different that the server hostname referenced in HttpSM.  So it seems that there was a pending hostdb action that wasn't canceled before the origin HttpSM object was destroyed.  The other exciting observation was that the cores seemed to happen in groups across machines implying there was some odd off box actions affecting the ATS flow.
Here is an example of that stack.
#0  0x00002b42cfc661d7 in raise () from /lib64/libc.so.6
#1  0x00002b42cfc678c8 in abort () from /lib64/libc.so.6
#2  0x00002b42cd183277 in ink_abort (message_format=0x2b42cd1ac080 "%s:%d: failed assertion `%s`") at ../../../../trafficserver/lib/ts/ink_error.cc:99
#3  0x00002b42cd1803c7 in _ink_assert (expression=0x864dc7 "0", file=0x864d98 "../../../../trafficserver/proxy/http/HttpSM.cc", line=1941) at ../../../../trafficserver/lib/ts/ink_assert.cc:37
#4  0x0000000000657bf7 in HttpSM::state_http_server_open (this=0x2b4331c64400, event=500, data=0x13ccc00) at ../../../../trafficserver/proxy/http/HttpSM.cc:1941
#5  0x000000000065aec1 in HttpSM::main_handler (this=0x2b4331c64400, event=500, data=0x13ccc00) at ../../../../trafficserver/proxy/http/HttpSM.cc:2802
#6  0x0000000000830ff5 in Continuation::handleEvent (this=0x2b4331c64400, event=500, data=0x13ccc00) at ../../../../trafficserver/iocore/eventsystem/Continuation.cc:33
#7  0x000000000075101f in reply_to_cont (cont=0x2b4331c64400, r=0x13ccc00, is_srv=false) at ../../../../trafficserver/iocore/hostdb/HostDB.cc:491
#8  0x0000000000755886 in HostDBContinuation::dnsEvent (this=0x2b42cd0fd9d0, event=600, e=0x2b435c127440) at ../../../../trafficserver/iocore/hostdb/HostDB.cc:1470
#9  0x0000000000830ff5 in Continuation::handleEvent (this=0x2b42cd0fd9d0, event=600, data=0x2b435c127440) at ../../../../trafficserver/iocore/eventsystem/Continuation.cc:33
#10 0x00000000007687f6 in DNSEntry::postEvent (this=0x2b42f01bce00) at ../../../../trafficserver/iocore/dns/DNS.cc:1282
#11 0x0000000000830ff5 in Continuation::handleEvent (this=0x2b42f01bce00, event=1, data=0x2b4333faa6e0) at ../../../../trafficserver/iocore/eventsystem/Continuation.cc:33
#12 0x000000000083312b in EThread::process_event (this=0x2b42d26bb010, e=0x2b4333faa6e0, calling_code=1) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:132
#13 0x0000000000833302 in EThread::process_queue (this=0x2b42d26bb010, NegativeQueue=0x2b42f54a3e10, ev_count=0x2b42f54a3e08, nq_count=0x2b42f54a3e0c) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:171
#14 0x00000000008335ca in EThread::execute_regular (this=0x2b42d26bb010) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:231
#15 0x0000000000833949 in EThread::execute (this=0x2b42d26bb010) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:326
#16 0x000000000083257e in spawn_thread_internal (a=0x1247070) at ../../../../trafficserver/iocore/eventsystem/Thread.cc:85
#17 0x00002b42ceff9dc5 in start_thread () from /lib64/libpthread.so.0
#18 0x00002b42cfd2876d in clone () from /lib64/libc.so.6

I created another build that added ink_release_asserts on pending_action in HttpSM::state_http_server_open.  The assertion is that pending_action should be nullptr before reassigning it.  If you reassign a pending_action that is not null, you lose the reference to that action and you won't be able to cancel that action when HttpSM shuts down.  From that build, we were able to get core with the original HttpSM.   Here is an example core.
#0  0x00002b4c445cb1d7 in raise () from /lib64/libc.so.6
#1  0x00002b4c445cc8c8 in abort () from /lib64/libc.so.6
#2  0x00002b4c41ae8277 in ink_abort (message_format=0x2b4c41b11080 "%s:%d: failed assertion `%s`") at ../../../../trafficserver/lib/ts/ink_error.cc:99
#3  0x00002b4c41ae53c7 in _ink_assert (expression=0x865780 "event == EVENT_INTERVAL || pending_action == nullptr", file=0x864c38 "../../../../trafficserver/proxy/http/HttpSM.cc", line=1833)
    at ../../../../trafficserver/lib/ts/ink_assert.cc:37
#4  0x00000000006570c5 in HttpSM::state_http_server_open (this=0x2b4c84697c00, event=3, data=0x2b4e64f22f90) at ../../../../trafficserver/proxy/http/HttpSM.cc:1833
#5  0x000000000065ad79 in HttpSM::main_handler (this=0x2b4c84697c00, event=3, data=0x2b4e64f22f90) at ../../../../trafficserver/proxy/http/HttpSM.cc:2799
#6  0x0000000000830eb9 in Continuation::handleEvent (this=0x2b4c84697c00, event=3, data=0x2b4e64f22f90) at ../../../../trafficserver/iocore/eventsystem/Continuation.cc:33
#7  0x000000000080de66 in read_signal_and_update (event=3, vc=0x2b4e64f22e40) at ../../../../trafficserver/iocore/net/UnixNetVConnection.cc:144
#8  0x000000000080e1e1 in read_signal_done (event=3, nh=0x2b4c47998cf0, vc=0x2b4e64f22e40) at ../../../../trafficserver/iocore/net/UnixNetVConnection.cc:205
#9  0x000000000080e299 in read_signal_error (nh=0x2b4c47998cf0, vc=0x2b4e64f22e40, lerrno=0) at ../../../../trafficserver/iocore/net/UnixNetVConnection.cc:229
#10 0x0000000000810eb3 in UnixNetVConnection::readSignalError (this=0x2b4e64f22e40, nh=0x2b4c47998cf0, err=0) at ../../../../trafficserver/iocore/net/UnixNetVConnection.cc:1090
#11 0x00000000007e8617 in SSLNetVConnection::net_read_io (this=0x2b4e64f22e40, nh=0x2b4c47998cf0, lthread=0x2b4c47995010) at ../../../../trafficserver/iocore/net/SSLNetVConnection.cc:541
#12 0x0000000000805f4f in NetHandler::waitForActivity (this=0x2b4c47998cf0, timeout=60000000) at ../../../../trafficserver/iocore/net/UnixNet.cc:497
#13 0x0000000000833646 in EThread::execute_regular (this=0x2b4c47995010) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:273
#14 0x000000000083380d in EThread::execute (this=0x2b4c47995010) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:326
#15 0x0000000000832442 in spawn_thread_internal (a=0x120bee0) at ../../../../trafficserver/iocore/eventsystem/Thread.cc:85
#16 0x00002b4c4395edc5 in start_thread () from /lib64/libpthread.so.0
#17 0x00002b4c4468d76d in clone () from /lib64/libc.so.6

In this case, the last bit of history on the HttpSM is interesting.
{fileline = 0x865728 "../../../../trafficserver/proxy/http/HttpSM.cc:1832", event = 200, reentrancy = 2},
{fileline = 0x865728 "../../../../trafficserver/proxy/http/HttpSM.cc:1832", event = 105, reentrancy = 1},
{fileline = 0x868a28 "../../../../trafficserver/proxy/http/HttpSM.cc:7745", event = 65535, reentrancy = 1},
{fileline = 0x865728 "../../../../trafficserver/proxy/http/HttpSM.cc:1832", event = 3, reentrancy = 1},

The first line says that we called state_http_server_open with a NET_OPEN event. Basically ATS has sent the SYN to the origin.
The second line says that state_http_server_open was called with an inactivity timeout error.
The third line is setting the default handler to HttpSM::state_mark_os_down.
But the fourth line is back at state_http_server_open with a EVENT_ERROR. Which is odd because we have already done the error stuff for that socket.
Looking into the code, the error case will try additional addresses for the origin. This may just pick up the next address in the cached record, but if we are unlucky the cached DNS info may have expired in the 30-40 seconds since we started. If we go through the error case again, we may set up two dns requests for the same state machine. It is quite possible that the state machine will be long gone by the time the second DNS request goes off. If we have overwritten the pending_action at the start of HttpSM::state_http_server_open, there is no way to cancel the event before the state machine goes away.
To address this issue and avoid the double error event,  the right thing to do is call release_server_session() in the error case of HttpSM::state_http_server_open. If it session has read no response, that function will call do_io_close on the server vc (freeing the backing memory) and remove the related server_entry structure and epoll entries.
We have been running this code in one colo since Thursday night and have had no crashes.  Where before we were getting crashes very regularly during high traffic time (presumably because of overloaded origins).

Good point @zizhong.  Updated to remove the useless assert.

@zizhong @zwoop look ok now?

Update the commit to make the get_action() method const and return a const pointer as @maskit suggested.

I know that one of @d2r 's commits is running into this issue. So it would be good if we could bring this fix in soon and possibly make the next 8.0 release candidate.

I am testing with this patch now to see if a new assert in #4145 is still triggered.

I am testing with this patch now to see if a new assert in #4145 is still triggered.

Testing with this patch still produced errors. We found that the errors was caused with a failed hostdb lookup, and so it is not directly related to this PR. So I dropped the dependency on this PR.

While this wasn't an issue for @d2r's issue.  This does fix a real issue.  Can someone please review?  I think it passed muster with @zwoop and @maskit

Another PR was created to pull this in to the 8.1.0 release #5235


Recent Projects submenu in File Menu is missing

It seems the "Recent Folders" submenu is gone - we should replace this with a "Recent Projects" menu instead

Related #1033