[BUG] undefined title in docs.nearprotocol.com

Describe the bug
Going to https://docs.nearprotocol.com/docs/overview/who-is-this-for.html
Title is "Who is this for? - undefined"
Expected behavior
No undefined. Or something meaningful
Screenshots

:pencil: Location
https://docs.nearprotocol.com/docs/overview/who-is-this-for.html

fixed: https://github.com/nearprotocol/docs/commit/9187cb8c8f6de4485064558beca1a0dea0532583


selectCollection don't return error

If an error occurs after fetch collections, selectCollection don't return error object.

Hi thanks for posting an issue!
Could you send me some sample code and data to help me replicate the issue?
In particular, what error did your api return (an http status code?), what
is the (incorrect) output of selectCollection, and what is the output you
were expecting to get from selectCollection?
That'll help me fix the issue. Thanks!
On Tue, Jul 19, 2016, 5:19 PM Lê Anh Tuấn<EMAIL_ADDRESS>wrote:

If an error occurs after fetch collections, selectCollection don't return
error object.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/uniqueway/redux-crud-store/issues/18, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ABVELAnp_pzCKTAMeB1pJCZ9HK6Yl0Htks5qXJaJgaJpZM4JPh56
.

I've reviewed the code and I think I see what you mean - if there is a FETCH_ERROR, selectCollection doesn't give you any indication of that. This is why it's great to have more people using this! We just haven't run into a collection fetch error yet so we never noticed.
I'll make a pull request and send you a message - would you be interested in reviewing the code and testing it?

OK 4.2.1 is published with this change! Thanks!

👍


refactor: clean up reth node

Removes some hardcoded values like genesis and other config values and moves them into flags or config files

Codecov Report

Merging #450 (7241a0b) into main (28121a4) will decrease coverage by 0.18%.
The diff coverage is 55.96%.

@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   74.26%   74.07%   -0.19%
==========================================
  Files         238      241       +3
  Lines       22948    23124     +176
==========================================
+ Hits        17043    17130      +87
- Misses       5905     5994      +89

Impacted Files
Coverage Δ

bin/reth/src/node/mod.rs
0.00% <0.00%> (ø)

bin/reth/src/util/chainspec.rs
0.00% <0.00%> (ø)

bin/reth/src/util/mod.rs
0.00% <ø> (ø)

crates/interfaces/src/p2p/error.rs
40.00% <ø> (ø)

crates/interfaces/src/p2p/headers/error.rs
0.00% <ø> (-25.00%)
:arrow_down:

crates/net/ecies/src/codec.rs
53.33% <0.00%> (ø)

crates/net/ecies/src/error.rs
0.00% <ø> (ø)

crates/net/ecies/src/stream.rs
70.96% <ø> (ø)

crates/net/network/src/peers/manager.rs
70.94% <ø> (-1.64%)
:arrow_down:

crates/primitives/src/account.rs
100.00% <ø> (ø)

... and 30 more

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


Fix call getNumFmtID with builtInNumFmt return -1

PR Details
更改了一下getNumFmtID()中内置格式检查和自定义格式检查的顺序
Description
创建内建number_format的style，可能会出现返回已经创建的styleID的情况。
详细可见提交的test
Related Issue
Motivation and Context
解决创建多个仅number_fomat不同的style时会返回相同的styleID
How Has This Been Tested
已有的和添加的单元测试
Types of changes

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

Checklist

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

Codecov Report

Merging #1077 (45a1f08) into master (bb0eb4a) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1077      +/-   ##
==========================================
- Coverage   97.77%   97.76%   -0.02%
==========================================
  Files          29       29
  Lines       17788    17788
==========================================
- Hits        17393    17390       -3
- Misses        271      273       +2
- Partials      124      125       +1

Flag
Coverage Δ

unittests
97.76% <100.00%> (-0.02%)
:arrow_down:

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

Impacted Files
Coverage Δ

styles.go
99.67% <100.00%> (-0.33%)
:arrow_down:

Continue to review full report at Codecov.

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

LGTM, thanks for your PR.


Cypress test. Actions on cuboid.

Try to draw a cuboid shape in two ways (by 2 points, by 4 points)
Try to draw a cuboid track
Try to switch a label and draw one more cuboid
Check if objects are drawn and they are shapes/tracks with right labels
Rebuild function for create cuboid. Adapt other test which use this function.
Motivation and context

How has this been tested?

Checklist

[x] I submit my changes into the develop branch
[ ] I have added description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.
[x] I have updated the license header for each file (see an example below)

# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

Coverage remained the same at 65.442% when pulling 6588d40ebfc6ed8d764a489c87fd5ca440e5bf56 on dvkruchinin:dkru/cypress_test_case_9 into 623ca17a6bfe2f717c46c10657dfb42ac68a72e4 on openvinotoolkit:develop.


There is no way to handle Output.Failure

Output is similar to Try in that it can carry captured exceptions but there is no way to handle them. Ideally there should be a MonadError[Output, Throwable] instance. I guess the same is true about Output.Empty but the type class for that is in cats-mtl - FunctorEmpty.
Is this a deliberate design choice or does it make sense to add the MonadError instance?

Interesting. Can you expand on handling the Output.Failure? What's the exact use case?

I have an Endpoint[Foo] that I would like to transform to an Endpoint[Bar]. I have combinators to deal with the happy path and with failures in the underlying Future (via Endpoint.handle). I can even look at the status code of the underlying Output but not at the Exception if it's a Failure. And in this case I want to look at the Exception.
You could say that I want to know too much about the implementation of Output and that would be fine. But it could also be just an oversight.

Yeah, our initial design assumed users don't need to handle Output themselves. I'd assume you can workaround this limitation by replacing your Output.Failure with failed future (assuming you control that part).
The intention for Output is the be a placeholder for an actual HTTP response. It just happened to have map, flatMap (to simplify Endpoint internals) but neither of those indented for end-user usages.

Ok then, I worked around the issue by special casing it.


Rename gem to ActiveID

@skalee could you please help update the GHA config with the previous Travis matrix? Maybe we should combine the workflow files for the same matrix... Up to you.


mention --cleanup in the developer documentation

The documentation did not yet mention the --cleanup flag and instead still recommended to manually delete resources.

/lgtm
/approve


Protobuffer and misc improvements

Removed JSON support, ProtoBuffer is now the default method to keep it simple and to follow Hyperion standards.
Removed timer_tick solution for capture and replaced it with loop, capture interval is now no longer needed but can help with slower systems.
Re-added missing parts of ProtoClient.
Implemented reconnect support.
Set DirectX PresentInterval to PresentInterval.Immediate.
Cleaned up code.

Hi @RickDB,
Thank you for taking the time to contribute.
I checked your commit locally and there is a memory issue. It is smaller than the last pull request but still present (about +1mb every 5-8 seconds). Also, the image is shown sideways on the LEDs because of the way the ProtoClient is handling the pixel array. I already have some pixel manipulation on my code which is cleaner and uses less resources. Maybe we can add it to the SendImage method in the ProtoClient.
I would also like to talk about your approach of using a loop and having to clear the images/priorities. I believe that simply setting a duration for the image to hyperion removes the need to have to clear the image when we are done sending information, also removing the chance of an image getting stuck in the LEDs because the application crashed.
I want to create an amazing application together, so I would really love to collaborate instead of step on each other's toes.
I look forward to your response.

SendImage could indeed use further improving, it's from on our AtmoLight implementation and that part is pretty old and wasn't made by our team.
We don't notice any memory leaks but does get cleared after video playback there so that is most likely the reason :) , if you want to update that with your approach that would be great :+1:
We do need to flip the image because when it's converted into a memory stream it comes out mirrored and also strip the headers, with the current PR code it does match 1:1 with what's on the screen here atm.
Added a fixed duration in the sendimage request is a good idea so that in case of unexpected interrupts during loop it will not lock out any other applications with lower priorities, can also read the protobuffer request reply in case of errors but that does slow down processing a bit:
https://github.com/RickDB/HyperionScreenCap/commit/147b75062085e70bce68c4318ac26e8aec7f47c9#diff-ab01d62e631701e756335156709669dfR224
Want to make this amazing app together as well and glad to help out where ever I can, Hyperion forum will be up soon (~1-2 weeks) which has dedicated areas for 3rd party apps and such so that way we can probably share ideas easier and also get user feedback / feature requests :)

Pushed potential fix for memory leak, forgot to add back the 2 dispose calls.

Hi @hanselb ,
Forum and new wik went live so can discuss some ideas there if you want :)
https://hyperion-project.org/

@hanselb
Still alive? :+1:

Hey @brindosch yeah I'm still kicking it lol
I have been super busy with life :stuck_out_tongue_closed_eyes: but I am going to try to do some work on this soon.
@RickDB I see that you are working on your fork, I will reach out to you before I start working on mine again to merge.
Talk to you soon :+1:

Glad to hear from you, we had the fear you where lost somewhere :)

Hi @RickDB I hope you are doing well.
So I am going to merge this pull request and then continue my implementation.

The last time I used this branch the LEDs displayed the image sideways. Have you tested any other capture software? Does your LEDs match the orientation and position of the HyperCon preview? I didn't get any complaints from other users with my code, so this could be an isolated issue with your setup.
On this branch I still see the same implementation with clearing the priority etc, instead of just using a set duration for the image sent so that it doesn't stay stuck on the screen if something fails. Is there any specific reason why you want to do it this way? If there are none, I would like to switch that approach and have you test it on your environment.

I am going to start working on my local environment, but will not push until we get clarification on those points.

Hi @hanselb  doing fine and glad to see you working on it again :)

Not sure about the cause but did get a few users to test this PR version and couldn't find any errors with that (clockwise setups for most), however did find a few new ones:

If Windows 10 DPI scaling is > 100% it will not capture and report an DX error (no surface to capture)
Multi monitor setup is iffy and looks related to SlimDX, can't always capture correctly even if monitor index is set to the right one.

Not implemented yet but do agree that we should add it as should have no downside as we keep sending.

Hi @RickDB
My setup is counter clockwise, so maybe that's why its apparent on mine. I just pushed some changes to the image processing that should remove the need to flip the image.
I added the new issues you mentioned and will start troubleshooting them soon. If you have any ideas or new bugs just add them as issues. I am working my way through them. :smile:
https://github.com/hanselb/HyperionScreenCap/issues/9
https://github.com/hanselb/HyperionScreenCap/issues/10
I will remove the ClearPriority method calls and work on the image duration. I am thinking on maybe calculating how fast the software is capturing the screen to report FPS and to set the duration to just above the frame duration. Maybe do something similar with the capture interval.


Cannot split local terminal with docker terminal

Does this issue occur when all extensions are disabled?
N/A because this can't be reproduced without the Remote-Containers extension.
I understand that "Issues caused by an extension need to be reported directly to the extension publisher," but this isn't actually an issue with the extension, it's an issue with the vscode integrated terminal.
Specs

VS Code Version: 1.56.2
OS Version: Ubuntu 20.04 (x64, kernel 5.8.0)

Steps to Reproduce

Open your workspace in a Docker container using a devcontainer.json file.
In the command palette, run Terminal: Create New Integrated Terminal (Local)
In the terminal click on the split icon. You will see an error message saying that your local home folder doesn't exist on the Docker container.

This error should occur so long as the user running vscode does not exist in the Docker container.

Any update on this?
Ping @Tyriar

I can't repro in Insiders, mac should work the same as Linux. This might have been fixed by something else?

I am able to reproduce the error. Here is a gif:

I've blacked out my username but the blacked out part is just /home/username.

Thanks for the gif, can repro. This affects the split command only, splitInstance works which powers the tab split button I was using.

This affects the split command only, splitInstance works which powers the tab split button I was using.

Out of curiosity, what is the difference between split and splitInstance?
Can I work around this issue for the moment by using a different command and triggering splitInstance instead of split?

@applemonkey496 splitInstance is an internal command that uses the selected terminal tabs in the tab view, it's what drives this context menu:


App is crashing

App is crashing due to large image size used in the splash screen.

@dheerajkotwani  have a look . I want to work on this.


chfar ta3e readmyat

Ostad hala la kti katchuf had issue bghit ghangol bli abderrahmane chfr lya had readme o galya i9d ichfr lya ta readmyat 5rin h9ach m3gaz.

skot ola nchfrk tanta


xlsform.org url for language reference is outdated

The URL in survey.py is wrong. It points to http://xlsform.org#language. It should be http://xlsform.org/#multiple-language-support

closed by #222


Consider removing update-notifier.

Operating System: N/A
Node Version: N/A
NPM Version: N/A
webpack Version: N/A
webpack-serve Version: 0.0.0

This issue is for a:

[ ] bug
[ ] feature request
[x] modification request

Expected Behavior
webpack-serve should not include large packages unnecessary for its use case.
Actual Behavior
webpack-serve includes update-notifier.

Thanks for checking in but it stays.


Drop support for Node 4, 6, 7, and 9

only LTS node is supported.
Node 8, 10, 12 is added

Looks like we have some failing tests under Node 10/12, mind taking a look?

@rwjblue Tests are breaking because of a bug in windows implementation of checking if symlink exists or not. I created an issue in the nodeJS project.
https://github.com/nodejs/node/issues/30538#issuecomment-555373746

Fixed the issue by adding a function that will do fs.accessSync and fs.statSync to decide symlink is not broken.

working on this now.


Incorrect Type Conversion for Lists with Shared-model type

We have a subquery photos where 2 fields (or subqueries) called published and archived that share the same properties or subqueries:
photos {
    published {
        id
       thumbnail
       etc....
    }

    archived {
        id
        thumbnail
        etc....
    }
}

The schema.json generated by Apollo Codegen is shown below.  As you can see, both published and archived are objects of type LIST with items of type VenuePhoto:
[
{
          "kind": "OBJECT",
          "name": "Photos",
          "description": "",
          "fields": [
            {
              "name": "published",
              "description": "the published photos",
              "args": [],
              "type": {
                "kind": "LIST",
                "name": null,
                "ofType": {
                  "kind": "OBJECT",
                  "name": "VenuePhoto",
                  "ofType": null
                }
              },
              "isDeprecated": false,
              "deprecationReason": null
            },
            {
              "name": "archived",
              "description": "the archived photos",
              "args": [],
              "type": {
                "kind": "LIST",
                "name": null,
                "ofType": {
                  "kind": "OBJECT",
                  "name": "VenuePhoto",
                  "ofType": null
                }
              },
              "isDeprecated": false,
              "deprecationReason": null
            }
          ]
        },
{
          "kind": "OBJECT",
          "name": "VenuePhoto",
          "description": "",
          "fields": [
            {
              "name": "id",
              "description": "the unique ID of this photo",
              "args": [],
              "type": {
                "kind": "SCALAR",
                "name": "String",
                "ofType": null
              },
              "isDeprecated": false,
              "deprecationReason": null
            },
            {
              "name": "thumbnail",
              "description": "a thumbnail image for this photo",
              "args": [
                {
                  "name": "treatment",
                  "description": "",
                  "type": {
                    "kind": "SCALAR",
                    "name": "String",
                    "ofType": null
                  },
                  "defaultValue": null
                }
              ],
              "type": {
                "kind": "OBJECT",
                "name": "Image",
                "ofType": null
              },
              "isDeprecated": false,
              "deprecationReason": null
            },
            {
              "name": "fullSize",
              "description": "a full-size image for this photo",
              "args": [
                {
                  "name": "treatment",
                  "description": "",
                  "type": {
                    "kind": "SCALAR",
                    "name": "String",
                    "ofType": null
                  },
                  "defaultValue": null
                }
              ],
              "type": {
                "kind": "OBJECT",
                "name": "Image",
                "ofType": null
              },
              "isDeprecated": false,
              "deprecationReason": null
            }
          ]
        }
]

The current issue we are facing with Apollo Android is that the generated models are of the following type;
List<Archived> archived;
List<Published> published;

where we are expecting the following:
List<VenuePhoto> archived;
List<VenuePhoto> published;

A failed attempt to coerce the tool to generate the right models was to extra everything inside photos{} as a fragment but that did not change the results.
I would appreciate some feedback as to whether the current behavior and model output is either a bug or if it is working as intended and there is a missing feature or flag that I need to incorporate in my *.graphql file to achieve the desired results.

If you want them to share the same model you have to use fragment:
photos {
    published {
       ...VenuePhotoFragment
    }

    archived {
        ...VenuePhotoFragment
    }
}

fragment VenuePhotoFragment on VenuePhoto {
   id
   thumbnail
   etc....
}

It will generate Archived.Fragments and Published.Fragments classes that have the same reference to VenuePhotoFragment. Yes it still generates 2 different models for Archived and Published because the set of requested fields might be different as well as arguments for requested fields.
At the same time I agree that we should recognize identical sub-queries and have generated only one model class instead of 2 identical ones.

@sav007 That's exactly what I ended up doing but, again, because it is still 2 different models my RecyclerView code looks kinda ugly. I will proceed with the suggestion for the time being. However, is there any chance that a future version of Apollo-Android could enhance/fix this so that a single model class is used? Thanks for the feedback.

We encourage you to use ViewModels for UI, that layer of abstraction will give you flexibility and resolve such issues, as in many cases generated models don't satisfies UI needs and  requires to have additional fields or different types to present on UI

That's true but there really shouldn't be a reason for the generated code to break the contract defined in the schema.json file (i.e. the 2 lists use the same data type). Thanks for the feedback.  I'll revisit my solution.

Closing for now. Let us know if any recommendations of how to make experience better.


If secure(..) used and path to cert is wrong or empty, SparkJava exits without error

I had the secure(...) call working with an installed https cert that was stupidly placed in /tmp.  Then rebooted (clearing /tmp) and the webserver would no longer start up.  Would install the routes however and then just exit with rc 0.  No errors.
Eventually figured it out (commented the 'secure (...)' call out) and then realized the problem: i was pointing to a non-existent keystore.  Whoops.  But no error?
Isn't there some way we could get a meaningful error on this?

Huh, running the secure test from the sparkjava src, if you put in an incorrect path, you get a nice error.  I'm coding in kotlin, and have used both the java and kotlin version of sparkjava and still see the issue.   Still investigating...

I gotta think this is something on the Kotlin end, probably that I'm missing, that's swallowing the error.  Will reopen if I can find a repro I can post


The IPAM block creation flow is flawed in IPv6

I’m not sure I’m reporting this at the correct place, but anyway…
Expected Behavior
In Kubernetes, when a pod is scheduled on a node, the CNI plugin should be able to create an IPAMBlock and assign an IPv6 address from the newly created block.
Current Behavior
The CNI plugin is unable to assign a IPv6 address because the IPAMBlock is created with an empty unallocated field and NumFreeAddresses then returns 0.
The CNI plugin loops on creating new IPAMBlocks, and finding 0 available IPv6 addresses:
2020-11-25 22:26:05.177 [INFO][29627] ipam.go 462: Ran out of existing affine blocks for host host="worker01"
2020-11-25 22:26:05.178 [INFO][29627] ipam.go 477: No more affine blocks, but need to claim more block -- allocate another block host="worker01"
2020-11-25 22:26:05.178 [INFO][29627] ipam.go 480: Looking for an unclaimed block host="worker01"
2020-11-25 22:26:05.183 [INFO][29627] ipam_block_reader_writer.go 124: Found free block: fd01:0:0:f78a::/64
2020-11-25 22:26:05.183 [INFO][29627] ipam.go 492: Found unclaimed block host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.183 [INFO][29627] ipam_block_reader_writer.go 137: Trying to create affinity in pending state host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.187 [INFO][29627] ipam_block_reader_writer.go 167: Successfully created pending affinity for block host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.187 [INFO][29627] ipam.go 140: Attempting to load block cidr=fd01:0:0:f78a::/64 host="worker01"
2020-11-25 22:26:05.189 [INFO][29627] ipam.go 145: The referenced block doesn't exist, trying to create it cidr=fd01:0:0:f78a::/64 host="worker01"
2020-11-25 22:26:05.193 [INFO][29627] ipam.go 152: Wrote affinity as pending cidr=fd01:0:0:f78a::/64 host="worker01"
2020-11-25 22:26:05.194 [INFO][29627] ipam.go 161: Attempting to claim the block cidr=fd01:0:0:f78a::/64 host="worker01"
2020-11-25 22:26:05.194 [INFO][29627] ipam_block_reader_writer.go 189: Attempting to create a new block host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.197 [INFO][29627] ipam_block_reader_writer.go 230: Successfully created block
2020-11-25 22:26:05.197 [INFO][29627] ipam_block_reader_writer.go 241: Confirming affinity host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.202 [INFO][29627] ipam_block_reader_writer.go 256: Successfully confirmed affinity host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.202 [ERROR][29627] ipam.go 530: Block 'fd01:0:0:f78a::/64' has 0 free ips which is less than 1 ips required. host="worker01" subnet=fd01:0:0:f78a::/64
2020-11-25 22:26:05.202 [ERROR][29627] ipam.go 121: Error assigning IPV6 addresses: Block 'fd01:0:0:f78a::/64' has 0 free ips which is less than 1 ips required.

Possible Solution
Stop storing unallocated addresses in IPAMBlock (it’ll be a mess in IPv6) and compute NumFreeAddresses with something like subnet size - allocated IP addresses.
Steps to Reproduce (for bugs)

Spin a dual-stack k8s cluster
Create a pod
???
Profit

Context
Your Environment

libcalico-go version: Don’t know, but I’m using the calico/node:v3.16.4 image.
Operating System and version: Debian

So I think the missing piece here was that Calico's IPv6 routing model doesn't assign a /64 to a node - the block size still only includes 64 addresses as the default block size for IPv6 pools is 122 - https://github.com/projectcalico/calico/blob/master/libcalico-go/lib/clientv3/ippool.go#L282.
I'm going to re-purpose this as an enhancement request for /64-per-node, since that is not currently how Calico IPv6 networking works.


New version: DateFormats v0.1.16

Registering package: DateFormats
Repository: https://gitlab.com/aplavin/DateFormats.jl
Created by: https://gitlab.com/aplavin
Version: v0.1.16
Commit: 01000008f097e4ee854617a631ccb8ac2c66d859
Git reference: HEAD

[noblock]
@aplavin Can you re-trigger Registrator? This will re-run CI.


Add unique string to videoName to prevent getting overwritten

Hi,
Is it possible to add a unique string (for example date-time-string) to the videoName when you set this capability (kinda like Zalenium does)? Or maybe as a feature in the future?
When I run for example a Test Suite with 3  Test Cases, I end up with one video of one of the test cases. And it's very handy to use a distinct name instead of the session-id.
Thanks,
Charlie

@evertsc by default we are using <sessionId>.mp4 which is always unique. When you set videoName capability it becomes your responsibility to provide unique names. You could e.g. use UUID generator or some date pattern - as you wish. So currently we do not plan to do any modifications here because we consider this user's responsibility.

Ok, thanks anyway. In our case the users don't have much options to change this, but we have added some lines of code and build our own version that adds the date-time string in the name.
        if browser.Caps.Video && browser.Caps.VideoName != "" {
                browser.Caps.VideoName = browser.Caps.VideoName[:len(browser.Caps.VideoName)-4] + fmt.Sprintf(time.Now().Format("-20060102150405.000")) + browser.Caps.VideoName[len(browser.Caps.VideoName)-4:]
        }

Thanks again for the work you put in this project, love it.

@evertsc yes, we initially planned to do this but anyway using time-based file name is not so reliable in general case. And also matching session to file name in that case becomes more difficult. So in final release we changed time-based name to sessionID with the option to override it.
Any more questions in this issue?

No, more questions. Thank you. I will close this issue.


LexSample/README.md

Copy-paste bug: Instead of "PollyDemo" shall be "LexSample":
https://github.com/awslabs/aws-sdk-android-samples/blob/master/LexSample/README.md

Thank you for reporting this!

It's been updated.


Flutter new idea

Use case

Proposal

Hi @Anjula1996,
There's no description in the issue you opened. Please provide a detailed use-case and an elaborate proposal of your requirement.
Closing this, as this issue is empty.

Srry it was a mistake..


Extensive training room add-on

Vanilla and 3DS Remake training room programs are only to get familiar with how it works, they're never really touched afterwards.
So, there should be training room programs which are more extensive, so you can actually hone your skills better.
Think about waves of harmful ghosts, increasing in difficulty and variety until a player faints.
Program types:

Endless (record = amount defeated)
Speedrun (record = time to clear) (if a single ghost is missed, the wave is restarted, like the first 2 ghosts in the 3DS Remake program; all ghosts in the room will trigger laugh animation; detach any poltergusts latched on to them, and be immune to stunning; the wave restarts once they all vanished)

A single basher speedy spirit will spawn in the endless program at a random wave that isn't wave 1
Trophy tasks:

Owch! Get defeated by the first ghost wave in the endless training room program
Nice! Get a record of at least 50 ghosts in the endless training room program
Great! Get a record of at least 100 ghosts in the endless training room program
Amazing! Get a record of at least 250 ghosts in the endless training room program
One Shot! Capture the basher Speedy Spirit in the endless training room program
Play Fair, Cheater! Reach the element-hearted ghosts wave in the endless training room program
Faster! Clear the speedrun training program in 15 minutes
Hurry! Clear the speedrun training program in 10 minutes
Where's the fire? Clear the speedrun training program in 5 minutes

Unlocked amiibo: Koopa, No more damage for being dragged by ghosts (except in training room)

Done, only testing left; when the speedrun mode is more balanced out, I'll make a repository (and resolve this)

https://github.com/Dhranios/Extensive-Training


.mpd files are not uploading to S3

Chunks files are created and saved to s3 but cant see .mpd file in aws s3.
This is my code.
`
from settings_prod import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME
import ffmpeg_streaming
from ffmpeg_streaming import Size, Bitrate, Representation, Formats, S3, CloudManager
class TestApiView(generics.GenericAPIView):
def post(self, request):

    filename = 'S3 Object Path'

    s3 = S3(aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name='us-east-1')

    save_to_s3 = CloudManager(filename="Final_Video.mpd").add(
        s3, bucket_name=AWS_STORAGE_BUCKET_NAME, folder="streaming/ffmpeg1"
    )

    video = ffmpeg_streaming.input(s3, bucket_name=AWS_STORAGE_BUCKET_NAME, key=filename)

    _720p  = Representation(Size(1280, 720), Bitrate(276 * 1024, 128 * 1024))

    dash = video.dash(Formats.hevc())
    dash.representations(_720p)

    dash.output(clouds=save_to_s3)

    return `Response(status=status.HTTP_204_NO_CONTENT)``

Resolved

Good. I closed the issue because you found a solution


bug: Output limit and stoppage during the rewrite of a 200 line class.

Version
1.8.3
Describe the bug
Whenever i try to refactor a class of 200 lines or so. Cody sadly stops writing at about line 100. Which makes it hard to use for anything other than small modifications to functions. Or within large context windows.

And if asked to continue, it messes up the chat window frame, and context of its current work. like so:

Expected behavior
It should continue the output for the full class, or give me a button to continue generating like chatGPT.
Additional context
I'm using Claude 3 Opus which should have a massive context window and output window.

While it's not ideal, you can type continue and it will continue generating output as a workaround.


Imported interface behaves differently from localy available interface

TypeScript Version:  2.9.0-dev.20180511
Code
// types.d.ts
export interface MyImportedItem {
  id: number
  another: string
  param1: string
}

// firebase.actions.ts

interface MyItem {
  id: number
  another: string
  param1: string
}

getFirebaseRef().push({ // error
  id,
  another: data.another,
  param: data.someValue,
  // param2: 'X',
} as MyItem)

getFirebaseRef().push({ // no error
  id,
  another: data.another,
  param: data.someValue,
  // param2: 'X',
} as MyImportedItem)

Error:
Type '{ id: any; another: any; param: any; }' cannot be converted to type 'MyItem'.
      Property 'param1' is missing in type '{ id: any; another: any; param: any; }'.

Expected behavior:
Expected is consistent behavior for local and imported interface.
Expected is that missing and invalid props are correctly reported by the IDE.
Actual behavior:

I see an error in your second call - there's a red squiggle on id

That is unrelated, it's that id is not defined, I have just moved the code from bottom to top to make better screenshot. If I swapped as MyItem with as MyImportedItem, the error mentioned above would move as well.

Can u share a self contained repro for us to look at?

The code already is a self-contained repro of the issue...

I take the issue back, I had MyImportedItem imported twice, not sure how that happened. Anyway, I have a question that is still related to what I said is an expected behavior: I don't get errors when my object is not complete, but I do get error that a key is missing if I introduce another key that is not part of the interface.
No error

Error param1 is missing

Moreover, can somebody please explain to me why the const declaration here gives an error correctly, while using it with as in the push does not?

Here I get that param1 is missing in the push.

I am using it like this so that I get hints for the object I am pushing.

Is there a better approach to get hints but avoid declaring the object beforehand? Thank you

Obviously, I cannot use this to specify that the object I am pushing is MyItem getFirebaseRef().push({}: MyItem)
Using type casting also -by nature- does something else than I want, so if there was something like type guards, that would be great
getFirebaseRef().push({} is MyItem)
-> now I get hints for object properties
-> now I get errors for missing and unknown properties

@ackvf #7481


Tick format for dates before 1900-01-01 rendered as ":00"

Default tickFormat causes dates before 1900-01-01 incorrectly rendered as ":00".
Example: https://jsfiddle.net/x50gop7k/7/

Duplicate of #29.


Add tasty-rerun to stackage

It builds with GHC 8 after 1.1.6 release. @ocharles was OK with putting it on stackage.

I think I've sent this pull request too soon and travis didn't see tasty-rerun-1.1.6. I will try to trigger a rebuild.

Thanks


FHI Angular Highcharts: add property for setting y-axis max/min

Description
It must be possible to define y-axis max/min via FhiDiagramUnits. E.g. if unit is percent, and all data is between 0% and 100%, you don't want the y-axis to end on 110% as in the fig. 1 below.
Acceptance Criteria

Go to https://dev-designsystem.fhi.no/developer/components/highcharts#highcharts-all-inclusive
Select "Andel i prosent" in "Velg måltall"-dropdown, and then select diagram type line
Check that max is 20% and min is 10%

Supplementary information
Fig. 1

@stalehaugenes Added new issue as discussed 🙂


Bluetooth Serial reconnect turned off when ending a2dp sink

Problem Description
I am using a2dp_sinl.end(true);  so it is also turning off the reconnect of BT Serial.
Device Description
ESP32 Dev Kit
Sketch
a2dp_sink.end(true); // it is also turning off the reconnect of Bluetooth serial

Other Steps to Reproduce
No response
Provide your Version of the EP32 Arduino Core (or the IDF Version)
1.0
I have checked existing issues, discussions and online documentation

[X] I confirm I have checked existing issues, discussions and online documentation

Works as designed: a2dp_sink.end(true) stops all bluetooth and releases all related memory

But if i want to only stop the reconnect of a2dp sync not the BT Serial then what to do?

just call end()

But i want that if the device reconnects it should not sync the audio...if I just call end() it just disconnects the device if I reconnect to it the audio again start to sync

What do you mean with synch the audio ?
Calling end() is stoping the a2dp task and all releated processing

mainly i am making a speaker with RGB lights with SD Card Playback option so in the starting I broadcast BT Serial for sending Commands through Bluetooth and if the command matched "BT" then the a2dp gets started by a predefined name and if "STOP" is received I want the a2dp to fully stop the broadcast so no one can connect to it till he/she again gives the "BT" command because when I am playing the audio through SD Card then too the a2dp device can be connected and it make a clash

You have me completly lost:What Scenario are you talking about ?
A A2DP Sind or Source ?
Did you activate the auto reconnect ?

i2s_pin_config_t pin_config = {
.bck_io_num = I2S_BCK_PIN,
.ws_io_num = I2S_LRC_PIN,
.data_out_num = I2S_DATA_PIN,
.data_in_num = I2S_PIN_NO_CHANGE
};
a2dp_sink.set_pin_config(pin_config);
a2dp_sink.start("UNITAK MUSIC");

this is the code which im using for i2s communication with the amplifier and then starting the a2dp_sink

Bro what do you mean by obolete ESP32...what should I use then?

Actually im new to esp32 so please guide me a bit

The actual ESP32 core version is 3.0.5 with 3.1 coming out soon
You seem to be still uing the old 2.x version
Go to the Boards Manager and make sure that you have the latest release

After updating im getting this error

Yes, read the REAME of this project !

I have to use the audio tool library?

yes or the i2s output functionality from ESP32 Arduino

Can i use the audio tools library for syncing the Bluetooth audio as well as can I read audio file from SD Card and send it to the amplifier?

Sure, for what file format ?

WAV

Here is an example: just replace the mp3 decodr with a wav decoter

Let me tell you about my project...I am making a simple speaker in which I want 2 audio sources

Bluetooth
SD CARD
Hardware : ESP32, RGB LEDs , MAX98357a Amplifier

I want my program to work in a way that if "BT" is received from Bluetooth Serial then the a2dp sync should start for Bluetooth audio okay, but if "SD" is received then the a2dp broadcast should stop and the audio should be played from the SD Card

I don't see any problem with this. If you have the issue that the last mobile phone automatically reconnects and plays audio, this might be because you ask this library to do so, and if you didn't then the mobile phone has some automatic reconnect implemented. In this case just disconnect from the mobile phone or change the bluetooth name of the esp32 so that the phone does not find it any more

Is there any example available for the Bluetooth audio sync?

If you mean an example for a Bluetooth sink, just look at the first example in this project!

How to change the i2s config and pin config?

I't described in the Readme as well and in the Wiki

Just this much of code taking whole space...how?

This has been answered in the FAQ!
Set a proper partition scheme...

Where is the FAQ section please provide me a link for it

The first line in the Wiki

Just that of code is taking 60% of the storage when I'm selecting the partition scheme as Huge app I have a long program left how to manage all of that together?

Is there any way possible that i can turn off the a2dp broadcast without turning off the Bluetooth serial?

decoder.begin(); , ive used this in the setup section but after that if I am starting the a2dp sync then the device isn't connecting to it..please help

https://github.com/pschatzmann/arduino-audio-tools/wiki/It's-not-working

Do you have any example for it to handle a2dp sync and SD together? Or can you please give a small reference code for it?


Add a memory and cpu limits on deployments

For kubernetes, stating a threshold without a minimum infers that the maximum is also the minimum.
So a maximum memory of 2GB states that it requires 2GB to startup - and we required way too much memory.
If neither is declared, then the min/max from the pod is used.
This adds support for declaring a default memory threshold
https://github.com/ManageIQ/manageiq/issues/20589

Should we have defaults in the settings.yml

@jrafanie

I now realize that there is a default max for this worker, so we can assume that all workers have a max set and therefore want a minimum set.
thanks for pointing this out. since we always want the minimum set, just defaulting it for all and simplifying the settings portion is great.

For kubernetes, stating a threshold without a minimum infers that the maximum is also the minimum.

I'm not sure this assertion is true.  I thought by default if you don't set a minimum (a request value) it will deploy the pod anywhere (even on nodes with low memory).  This was an intentional choice in ManageIQ to account for low-memory systems such as code-ready containers, so as not to make it a hassle.  However, in a production deployment a user may want to set specific minimums for optimal workload placement.

@Fryguy should this go back to jansa?  It's currently only on master/kasparov, so jansa only sets cpu and memory limits.

Jansa backport details:
$ git log -1
commit c5c179f2a864d99ad65325dd97eea83a82ae2858
Author: Joe Rafaniello<EMAIL_ADDRESS>Date:   Tue Oct 13 11:22:11 2020 -0400

    Merge pull request #20661 from kbrock/skys-the-limit

    Add a memory and cpu limits on deployments

    (cherry picked from commit 6dd529b26bf9bd69406a4c06e92ffb999f5cfa96)


Re-patch Debian 8, 7, Raspbian and Ubuntu 16, 14 for Salt 2016.11.5

Missed

if salt.utils.is_proxy() or not opts.get('ipv6', True):

if salt.utils.is_proxy():

when creating patch.
Need to repatch and bump revision levels

https://github.com/saltstack/salt/issues/41370


autovalue moshi builder support does not work for optionals

It is possible to define a class like this
package com.ryanharter.auto.value.moshi.example;

import com.google.auto.value.AutoValue;
import com.ryanharter.auto.value.moshi.AutoValueMoshiBuilder;
import com.squareup.moshi.JsonAdapter;
import com.squareup.moshi.Moshi;

import java.util.Optional;

@AutoValue
public  abstract class WithOptional {
    public abstract Optional<String> property();
    @AutoValueMoshiBuilder
    public static Builder builder() {
        return new AutoValue_WithOptional.Builder();
    }

    public static JsonAdapter<WithOptional> jsonAdapter(Moshi moshi) {
        return new AutoValue_WithOptional.MoshiJsonAdapter(moshi);
    }

    @AutoValue.Builder
    interface Builder {
        Builder property(String property);
        WithOptional build();
    }
}

The builder gets a value and can convert it to optional
The autogenerated code is
static class Builder implements WithOptional.Builder {
    private Optional<String> property = Optional.empty();
    Builder() {
    }
    @Override
    public WithOptional.Builder property(String property) {
      this.property = Optional.of(property);
      return this;
    }
    @Override
    public WithOptional build() {
      return new AutoValue_WithOptional(
          this.property);
    }
  }

Now the problem is that there is mismatch between the property of the autovalue and the method spec so this fails.
So this does not work anymore:
// If setter param type matches field type
    Optional<MethodSpec> setter = setterMethodSpecs
            // Find setter with param type equal to field type.
            .filter(methodSpec -> methodSpec.parameters.get(0).type.equals(prop.type))
            .findFirst();

So i delegated the filter to a function:
private static boolean doesSetterSpecMatchProperty(MethodSpec setterSpec, Property property) {
    TypeName setterType = setterSpec.parameters.get(0).type;
    TypeName propertyType = property.type;
    if (setterType.equals(propertyType)) {
      return true;
    }
    return propertyType.toString().endsWith("Optional<" + setterType.toString() + ">");
  }

This works but is really ugly and not ok.
But now i get stuck with a compilation error:
 switch (reader.selectName(OPTIONS)) {
          case 0: {
            builder.property(propertyAdapter.fromJson(reader));
            break;
          }

error: incompatible types: Optional cannot be converted to String
builder.property(propertyAdapter.fromJson(reader));

@ZacSweers and @rharter: as autovalue moshi experts, do you have an elegant solution for this?
What do you think ?

Ok So for the first part i found a better solution:
private static boolean doesSetterSpecMatchProperty(MethodSpec setterSpec, Property property) {
    TypeName setterType = setterSpec.parameters.get(0).type;
    TypeName propertyType = property.type;
    if (setterType.equals(propertyType)) {
      return true;
    }
    if (propertyType instanceof ParameterizedTypeName) {
      ParameterizedTypeName p = (ParameterizedTypeName) propertyType;
      if (p.rawType.toString().endsWith("Optional")) {
        if (p.typeArguments.get(0).equals(setterType)) {
          return true;
        }
      }
    }

    return false;
  }

I still have a problem with the jsonAdapter

I fixed fromJson. but now i have a problem with toJson.
You can look at my branch: https://github.com/rharter/auto-value-moshi/compare/master...david-gang:fix_optional?expand=1
I am sure you have some expert advice. Thanks

We've intentionally not supported Optional as far as I know, in favor of
(eventually) recommending folks use a builder instead.
On Wed, Nov 13, 2019 at 1:47 PM David Gang<EMAIL_ADDRESS>wrote:

I fixed fromJson. but now i have a problem with toJson.
You can look at my branch:
https://github.com/rharter/auto-value-moshi/compare/master...david-gang:fix_optional?expand=1
I am sure you have some expert advice. Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rharter/auto-value-moshi/issues/143?email_source=notifications&email_token=AAKMJPQT4WHOJLPOTWXTMR3QTRDUTA5CNFSM4JM7KHDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED7G6LA#issuecomment-553545516,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKMJPX7EDWMCCCF53IRS2TQTRDUTANCNFSM4JM7KHDA
.

Thanks

We've intentionally not supported Optional as far as I know, in favor of (eventually) recommending folks use a builder instead.
…
On Wed, Nov 13, 2019 at 1:47 PM David Gang @.***> wrote: I fixed fromJson. but now i have a problem with toJson. You can look at my branch: https://github.com/rharter/auto-value-moshi/compare/master...david-gang:fix_optional?expand=1 I am sure you have some expert advice. Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#143?email_source=notifications&email_token=AAKMJPQT4WHOJLPOTWXTMR3QTRDUTA5CNFSM4JM7KHDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED7G6LA#issuecomment-553545516>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJPX7EDWMCCCF53IRS2TQTRDUTANCNFSM4JM7KHDA .

Thanks for the enlightening words. I agree that it is not the job of autovalue moshi to solve these problems. If someone wants to go the optional way he can still create a setter with optional parameter
  @AutoValue.Builder
    interface Builder {
        Builder property(String property);
        Builder property(Optional<String> property);
        WithOptional build();
    }

He has still to create an optional adapter which makes the work of converting value to optional and vice versa
I want to use the opportunity to ask regarding builders and default values.
I understand that we recommend to set the default values in the builder. So if we have a property which is collection than we can model the absence of this collection as empty collection.
But if we have an object with a property which is not mandatory isn't the natural way to model the default value as Optional.absent (nullables are error prone)?
At last, do you think that the Readme should be updated to reflect this issue?
Should the error message in the code be a bit better?
We could reformulate the error message
String errorMsg =
              "Setter not found for " + prop.element +" with parameter type " + prop.type;
``

What do you think?

Thanks.


Table object printing

Some valuable attributes are missing from table object summary print.

Modified print.table_spec to add missing attributes.


unstyled-simple-guessing-game

Simple guessing game vs the computer
Will add styling at a later time

nice :)


SMARTS reward and threshold_for_counting_wp

in smarts/core/sensors.py:941, threshold_for_counting_wp = 0.5 is set. My understanding of this variable is that it sets a minimum on the reward, by only reporting distances over the threshold. For example, if a vehicle only travels 0.01 for 5 time steps, they will receive 0 reward. When the vehicle begins to accelerate and travels 0.1 for 5 time steps, the agent will receive a reward of 0.55 on the very last time step. This is problematic because the reward can be sparse and is no longer a function of state to state transitions but of entire trajectories. Is there a reason for it to be set to 0.5? I would suggest we set this to 0.0 or allow for customization.

I think this is a candidate for adding an lever in the AgentInterface to adjust this increment. I can see why the base reward might not be very useful at increments of 0.5.


Support build use ninja

What type of PR is this：

[ ] bug
[ ] feature
[x] enhancement
[ ] others

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

[FE PR Coverage check]
:heart_eyes: pass : 0 / 0 (0%)


Animation effect in login page

Please @eotchi review this. It's the animation you told me you liked from Lifeitup.
you can see it in my machine:
http://<IP_ADDRESS>:5000/users/sign_in

I closed it to not include the other unmerged commits into this PR


BST | C++

Title - Check BST
what will change -
Type of Issue - Add C++ implementation to check if a  binary tree is a BST
Please add/delete options that are not relevant.

[x] Adding New Code

Programming Language
Please add/delete options that are not relevant.

[x] C++

Self Check

Ask for issue assignment before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Happy Coding,

Please assign me the issue


Research Area: Validity Proofs to Improve Interop Scalability

Can validity proofs be utilized to improve the scalability of the interop protocol? It isn't immediately clear if they can without first shipping the devnet and then seeing how much throughput the system can handle safely. After that, it should be more clear where the bottlenecks are and then we can benchmark various ways of integrating zkps into the protocol if necessary.
Right now it is assumed that there will be heavy load in unsafe to safe progression described in the derivation pipeline - the problem can be modeled using a graph. There will also be heavy load for the sequencer when accepting incoming transactions to build blocks.
These are two different problems and zkps can be applied for both.
For unsafe to safe progression, the sequencer could send proofs via the p2p network so that the derivation pipeline doesn't need to query for as much remote data. This idea has been explored in by adding a commitment to the L2 blocks themselves and sending the proofs via p2p. This solution doesn't require zkps but there could be a way to improve our current thinking with them.
For the sequencer accepting transactions, the a zkp could be given to the sequencer along with the user's transaction that removes the need for the sequencer to verify the existence of the initiating message before including in a block. This seems like a more promising application, although it isn't immediately clear if this would be a huge gain given the state of zkp proof generation times. Given slight spec changes, it may be possible to make the proof generation times fast enough for this to work. Instead of using an absolute log index, a tx index + relative log index can be used in the identifier and it will greatly speed up zkp proof generation time.
An example of using sp1 for the sort of proof that is required for these solutions can be found here: https://github.com/puma314/verified-logs/
We also need to be very mindful of the downsides if people are able to create fraudulent proofs. No user funds can ever be at risk if a fraudulent proof can be generated.

@tynes This link https://github.com/ethereum-optimism/specs/blob/main/specs/interop/execution.md is invalid.

@tynes This link https://github.com/ethereum-optimism/specs/blob/main/specs/interop/execution.md is invalid.

That has been deprecated by https://github.com/ethereum-optimism/specs/pull/259


增加部分注释

Make sure set the target branch to develop
What is the purpose of the change
XXXXX
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

@beardlessCat would you like to submit this PR to the develop branch，and English will be better：）, I will close this PR first, but please feel free to reopen it, looking forward to your new PR.


[SPARK-16961][CORE] Fixed off-by-one error that biased randomizeInPlace

JIRA issue link:
https://issues.apache.org/jira/browse/SPARK-16961
Changed one line of Utils.randomizeInPlace to allow elements to stay in place.
Created a unit test that runs a Pearson's chi squared test to determine whether the output diverges significantly from a uniform distribution.

Can one of the admins verify this patch?

Hi, @nicklavers, just in case you might not know,  fixing the title such as [SPARK-16961][CORE] ... will automatically add the link of this PR to the JIRA as described in https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark

Thanks @HyukjinKwon!

Anyway the test and change look sound, let's test it.

Jenkins test this please

Test build #63521 has started for PR 14551 at commit e33741c.

Test build #63521 has finished for PR 14551 at commit e33741c.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63521/
Test FAILed.

Merged build finished. Test FAILed.

Okay I'm looking into this pyspark test failure

Hey @yanboliang, I'm failing test_gmm in python/pyspark/mllib/tests.py, and I'm fairly certain it's because the test relies on the bug I'm fixing.
I saw you worked on GaussianMixture in python/pyspark/mllib/clustering.py, which is the subject of the failed test, and which I don't initimately understand.
GaussianMixture uses callMLlibFunc to call mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixture.scala, which in turn calls RDD.takeSample, which uses Utils.randomizeInPlace, which I've changed.
randomizeInPlace is supposed to shuffle an array, but as it is now, elements can never end up where they started. This problem is most evident for small arrays; for example, a two-element array will ALWAYS be reversed by randomizeInPlace, whereas it should only be reversed 50% of the time.
test_gmm uses a very small test array, and so my guess is that a new, previously impossible, permutation of that test array is causing the test the fail.
Can you help me figure this out?

You're probably right, and I think it's OK to change the test to match the current output as a result.

I mean, I can certainly reverse-engineer a test that passes, but it wouldn't be very valuable, since I don't know enough about how GaussianMixture is supposed to work to write a good test for it.

The doctests in python/pyspark/mllib/clustering.py will have to be changed, too

Anyway, back to the actual content -- the actual test assertions in the failing test are correct, in that it's obvious that the first two points and second two points should cluster together. I expect that just picking another random seed or two would make it pass. Although that's a little clunky as a solution, because the test should probably be more robust, it's at least no less robust for your change. You can also try a tighter convergence tolerance or more iterations. Anything like that is all that I think we should ask of this PR.
Does the GaussianMixture doctest also fail? I think similar logic would apply. In that test, clearly the 3 successive pairs of points are meant to cluster together. Actually, the first assertion looks wrong because it says the first two don't cluster together. The others look right. Perhaps your fix actually makes the corrected assertion pass, if that was the failure.

+1 @srowen
I think we can change to another random seed to make it pass.

Okay I'll find some new seeds and commit again

These seeds passed the tests on my machine, at least

hey @srowen can you start up a new test?

Jenkins add to whitelist

Jenkins test this please

thanks

Test build #63630 has started for PR 14551 at commit 4bb0afe.

Test build #63630 has finished for PR 14551 at commit 4bb0afe.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63630/
Test FAILed.

@nicklavers Please also change seed for GaussianMixture doctest in python/pyspark/ml/clustering.py. And check whether we need to change seed for KMeans doctest. Thanks.

If we can get that last test failure patched in any reasonable form, I'll merge

Okay so I've tried a handful of seeds, and none have produced the results that the test is expecting. The doctests that are failing are model.gaussiansDF.show(), which as far as I can tell is just a display method.
On the other hand, the prediction tests, such as rows[4].prediction == rows[5].prediction, are all passing, so it seems like the model is still working, and just the exact output is different.
@yanboliang, and maybe @wangmiao1981, can you speak to exactly what the model.gaussiansDF.show() tests are testing, and how they might be altered without being compromised?

and KMeans is passing for me

model.gaussiansDF.show() displays the mean and variance of the gaussians, which are Dataframes.

I'd expect the Gaussians to move as a result of this change. I think it's fair to simply modify the test to match the current output in this case.

So if model.gaussiansDF.show() is testing a key behavior of the model, then I don't know what it is, and I don't feel comfortable just changing the test to make it pass, since that seems to defeat the purpose of having a test. And if model.gaussiansDF.show() isn't testing a key behavior, then does it need to be there?

@nicklavers it is a key test. The behavior change should be because you changed the random function, which causes the output changing. I agree with @srowen you just have to adjust your expected output.

Okay I'll push a new commit

Test build #63946 has started for PR 14551 at commit 42e750f.

Test build #63946 has finished for PR 14551 at commit 42e750f.

This patch fails SparkR unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63946/
Test FAILed.

Merged build finished. Test FAILed.

@nicklavers  I agree it's not great to assume that the current output is correct, though I strongly suspect it is. We'd ideally do some analysis to understand what the expected range of outcomes are given the stochastic process behind this and write a more robust test. For the moment I'm comfortable just going with the current output, because a difference is expected here, and more general parts of the test pass, your fix is obviously addressing a bug, and so I can't see that it's any worse, at least. I'd welcome more robust analysis but am OK with getting this in as-is, in practice.
It looks like the SparkR test needs a similar treatment, and then I suspect it's all good.

Test build #63999 has started for PR 14551 at commit 4848f42.

Test build #63999 has finished for PR 14551 at commit 4848f42.

This patch fails SparkR unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63999/
Test FAILed.

Test build #64012 has started for PR 14551 at commit 76efd0b.

Test build #64012 has finished for PR 14551 at commit 76efd0b.

This patch fails SparkR unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64012/
Test FAILed.

Merged build finished. Test FAILed.

Test build #64025 has started for PR 14551 at commit 17d28a5.

Test build #64025 has finished for PR 14551 at commit 17d28a5.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64025/
Test PASSed.

Merged to master/2.0


noncollinear WF components written to wrong filenames

NCLWavefunction writes its components with
		filename1 = "%s_UP_REAL" % filename_base
		filename2 = "%s_DOWN_REAL" % filename_base
		filename3 = "%s_UP_IMAG" % filename_base
		filename4 = "%s_DOWN_IMAG" % filename_base
		res0, res1 = self._write_realspace_state(filename1, filename2, filename3, filename4,
											scale, b, k, s)

but from what I can tell from the pawpyc.pyx, filenames 1 & 2 should correspond to real and imaginary parts (referred to as resr and resi), and 3 & 4 to real and imaginary parts, respectively, so these files are being misnamed.  This is in pawpyc.pyx around line 600, in the definition of
	def _write_realspace_state(self, filename1, filename2, filename3, filename4,
								double scale, int b, int k, int s):

Sorry for the late reply. Thanks for catching this and #12. I will push fixes today.

Should be fixed now. File names are in the right order and self.dim gets passed instead of dim. Let me know if it works, and if so I can close these.

Thanks - the new code looks good.  I did just notice that NCLWavefunction.write_density_realspace() (which I don't use, and therefore haven't tested) appears to need the same dim -> self.dim fix when it calls _convert_to_vasp_volumetric().

You're right. I just fixed that too. Thanks for again for catching these bugs! The changes are on master right now; I will probably add a new version to PyPI in a couple weeks after a few other small additions I am planning.

Not really reopening, but do you know when you're planning to update the PyPI version?  It's still showing a June 2020 release.

Just updated PyPI (v0.6.4). Thanks for the reminder!


Add --no-sort flag to import

Disables sorting of resource lists, which is useful for cases where
remote order matters.

Thanks! but we need default true as today for don't break current options

@sergeylanzman unless you specify --no-sort the behaviour is unchanged. However the option name didn't really make it clear :)
So, in the user facing code the option is no-sort, but it felt a bit off to have the negation in the util code so i figured it would make sense like this.. let me know if you prefer otherwise and i can change it


No blocks can be dropped

Minecraft:1.20.4
Neoforge:20.4.190
No ore blocks can be dropped. Even I use creative mode to take ou
https://github.com/TheMCBrothers/Useful-Foundation/assets/55308358/dd3e640f-99e4-42ff-8286-9c5d9542c46e
t metal blocks, they will not be dropped.

Updated to [1.20.4] v1.3.0 problem solved

This bug has been fixed in v1.3.0, exactly


New version: ArrayFire v1.0.7

Registering package: ArrayFire
Repository: https://github.com/JuliaGPU/ArrayFire.jl
Created by: @gaika
Version: v1.0.7
Commit: dfe225f6c578578d76d229d88cd44faa0d3c3b39
Reviewed by: @gaika
Reference: https://github.com/JuliaGPU/ArrayFire.jl/commit/dfe225f6c578578d76d229d88cd44faa0d3c3b39#commitcomment-42439325

@gaika is this supposed to work on CI?

It need special environment (arrayfire C library) - https://travis-ci.org/github/JuliaGPU/ArrayFire.jl


WIP: clang-16 + libclang-rt-15

This at least compiles for me locally, and make check with suppressions + the functional tests seem to work. Have not tested all combinations.
There is clearly an issue with the llvm-15 packaging, as you can't currently install clang-15 and libclang-rt-15 (which has the needed libs) together:
The following packages have unmet dependencies:
 libclang-rt-15-dev : Breaks: libclang-common-15-dev (< 1:15.0.6-5) but 1:15.0.6-4+b1 is to be installed
E: Unable to correct problems, you have held broken packages.

Propbaly related to:
llvm-toolchain-15 (1:15.0.6-5~exp1) experimental; urgency=medium
...

  * libclang-common-15-dev splitted into different packages:
    - libclang-rt-15-dev
    - libpolly-15-dev
    - libclang-rt-15-dev-wasm32
    - libclang-rt-15-dev-wasm64

Not for merge (as-is) or even sure if we'd want to do this.

If this is an upsteam (debian) bug, it might be better to fix it there

It should be possible to transform the configure check into a MWE and report it upstream

and report it upstream

Have opened a bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029003.

Looks like this is now fixed in the latest experimental image, so we shouldn't need to make any changes. Maybe kick the CI?

Thanks, looks like it is passing now: https://cirrus-ci.com/task/6478199601758208
The cron should run again in one or two days.


JSON:API support

This is a really interesting client. I love it!
Are there any plans to add support JSON:API? If so, would you consider it (or a PR that does)?

data always contains 1 or more items that represent the primary objects for the requested resource.
For example, if you had a resource /posts, data would be an JSON array containing representations of posts.
If you had a resource /posts/1, data would be a JSON object of a representation of the post with id 1 or data would be null if the response status is a 404 Not Found.
Other sibling keys of data are jsonapi which contains API version info, errors which might contain error info, and links which obviously contains hypermedia links like self, next and prev (amongst others).
The most interesting of the sibling keys is included which might contain representations of entities on the server related to the "primary" data. E.g. a request to /posts?include=author would have representations of posts under data and representations of those posts' authors under included.
I think for Ketting, you're right, the most important thing would be how to handle this structure elegantly:
GET /jsonapi/posts

{
  "data": [{
   "links": {
     "self": {
       "href": "/posts/1"
     }
   }
  }, {
   "links": {
     "self": {
       "href": "/posts/2"
     }
   }
  }],
  "links": {
    "self": {
      "href": "/posts"
    }
  }
}

How would one "follow" these links given that they're contextualized by their location in the response body?
One idea I had a second argument to follow() named context. This context would be a selector applicable to the underlying media type (e.g. a CSS selector for HTML or JSON Path for JSON).
I think this fits well with the web linking spec, given it's language about "context IRIs", even though I don't think it was intended to be used this way.

Practically, that might look like this:
let resource = ketting.getResource('/posts');
let post = resource.follow('self', '.data[1]').get();
console.log(post.attributes.title); // "Bar"

included would be very easy to deal with, because it's a direct analogue to HAL's _embedded.
What will be nice for JSON:API users is that they can completely ignore included items and not care if they are there or not. If they are, the cache will be prepopulated with them.
I'm going a little bit through the specification, and noticed that data is basically a 'single resource' or 'an array of resources'.
Would something like this be possible

For the 'single' case, merge the resource links with the links of the top-level document.
For the 'multiple' case, add a pretend link (such as json-api-resource) and treat the items in the array as embedded/included resources?

Then your example might look like:
const resource = ketting.getResource('/posts');
const posts = await resource.followAll('json-api-resource');
for(const post of posts) {
   console.log(await post.get());
}

included would be very easy to deal with, because it's a direct analogue to HAL's _embedded.

👍

What will be nice for JSON:API users is that they can completely ignore included items and not
care if they are there or not. If they are, the cache will be prepopulated with them.

Yesss. That's awesome.

For the 'single' case, merge the resource links with the links of the top-level document.

I think for the vast majority of standard cases, this would be fine. But I don't think it would be an assumption that would hold up in all cases.
Just recently, I've been implementing a way to get versioned objects from a JSON:API server. It's possible to end up with something like this:
GET /post/1?resource_version=rel:latest-version

{
  "data": {
    "type": "post",
    "id": 1,
    "links": {
      "self": "/post/1?resource_version=id:2"
    }
  },
  "links": {
    "self": "/post/1?resource_version=rel:latest-version"
  }
}

At a later point, if you refreshed, the data might have a query string of ?resource_version=id:3 in it.

For the 'multiple' case, add a pretend link (such as json-api-resource) and treat the items in the array as embedded/included resources?

I don't think that would not be possible. But I don't know that I really love that idea. I think I'm having a knee-jerk reaction to the "magic" of it. It also feels like a case where the public API is being driven by the internal implementation of the client rather than the most intuitive thing for the user (which is not to say my suggestion is the most intuitive either).

Totally unrelated to this issue, but I'm not sure where else to put it...
I just shamelessly stalked your Github and blog (😅) and came across your post about http2 and APIs and after reading it, I bet you might be interested in this little experiment of mine just for fun: https://github.com/gabesullice/hades.

That's super interesting. I've been running around an idea for a last couple of weeks to try and write a RFC-style standard for something likeyour X-Push-Please. Except, it would take a relationship.

Please let me know if you start on it, I'd love to contribute!

Another option might be to treat data items in a JSON:API resource as a sort of sub-resource with their own #fragment. But then the question remains, how do you get a sub-resource from a resource, if not with a relationship type.
...
What I'm really also saying is that it's kind of unfortunate that JSON:API didn't model collection resources as their own resource + a bunch of item relationships =)

Totally agree on the last point.
In our server implementation, we're thinking about doing something in the same spirit for included objects.
Honestly, JSON:API has a... complicated relationship with good hypermedia practices. I'm sure there will be more things to consider, even if this gets solved.

I just went to read 8288§3.2 Link Context, which linked me to RFC3986§5 Reference Resolution. I admit I haven't really completely read/grokked it, but it looks like it has some related concepts and might be important for Ketting in other ways.
Link headers look to have been designed to work with hierarchical/nested data since they can be anchored to resource fragments (The anchor example and explanation in 8288§3.5 was helpful to me). Given that Link headers can have different context from the base resource too, maybe that gives some more weight to my idea about a second parameter to follow(), since you might want to follow a link with the same relation type but a different anchor.

A last point about JSON:API linking wonkiness before I sign off for the day:
There are yet more link sub-contexts within a resource object:
"data": {
  "type": "post",
  "id": 1,
  "relationships": {
    "author": {
      "links": {
        "self": "/posts/1/relationships/author",
        "related": "/posts/1/author",
      }
    },
    "tags: {
      "links": {
        "self": "/posts/1/relationships/tags",
        "related": "/posts/1/tags",
      }
    }
  }
}

In that case, I think yet another implicit relation type would be needed, but it wouldn't be as simple as just using item or json-api-resource because the links objects are under named keys, not in a simple array.

Exciting discussion here! I think it'd be interesting to get JSON:API spec maintainers @dgeb and @ethanresnick to chime in here :)

As a JSON:API editor (who's thought a lot about hypermedia), I'm happy to weigh in. I hardly have the full context around ketting and the various available options, but I can say a bit about hypermedia in JSON:API.

Honestly, JSON:API has a... complicated relationship with good hypermedia practices.

This is an understatement :) But hopefully JSON:API's model will get simpler at some point, and we do know know about most of the issues raised in this thread (see e.g. https://github.com/json-api/json-api/issues/898, https://github.com/json-api/json-api/pull/834, and https://github.com/json-api/json-api/issues/913).
For now, here's how I would probably model JSON:API documents as collections of RFC 8288 links:

The top-level links key is straightforward: the context uri is just the request uri and the link relation is the key name. Getting the target URI(s) is a bit of a pain, because JSON:API has so many formats that the values in a links object can take on (i.e., null,string, string[], { href: string }, { href: string }[]), but what to do is easy conceptually.

For all other links objects, establish a context URI through the value of the self link in that object. If there is no self link, give up trying to extract that object's links. (You could try to come up with a fragment that could be used to create a context uri, but json doesn't have an official fragment format afik, and a sensible fragment format for json:api would probably be something based on json:api's type–id identification scheme anyway, rather than, say, json pointer. Moreover, I think it's totally reasonable to require that people using JSON:API for hypermedia to provide a self link.) Then, the representation for the resource identified by the self link is the whole object that contains the links object.

When data contains an array of json:api resource objects, add a collection link from each resource object that points back to the request URI, and a set of item links from the request uri to the self uri of each item in the data array.

So, taking (a simplified version of) the example document from JSON:API's homepage:
{
  "links": {
    "self": "http://example.com/articles",
    "next": "http://example.com/articles?page[offset]=1"
  },
  "data": [{
    "type": "articles",
    "id": "1",
    "attributes": {
      "title": "JSON:API paints my bikeshed!"
    },
    "relationships": {
      "author": {
        "links": {
          "self": "http://example.com/articles/1/relationships/author",
          "related": "http://example.com/articles/1/author"
        },
        "data": { "type": "people", "id": "9" }
      }
    },
    "links": {
      "self": "http://example.com/articles/1"
    }
  }],
  "included": [{
    "type": "people",
    "id": "9",
    "attributes": {
      "firstName": "Dan",
      "lastName": "Gebhardt",
      "twitter": "dgeb"
    },
    "links": {
      "self": "http://example.com/people/9"
    }
  }]
}

You'd end up with links:

context
rel
target

http://example.com/articles
self
http://example.com/articles

http://example.com/articles
next
http://example.com/articles?page[offset]=1

http://example.com/articles
item
http://example.com/articles/1

http://example.com/articles/1
collection
http://example.com/articles

http://example.com/articles/1
self
http://example.com/articles/1

http://example.com/articles/1/relationships/author
self
http://example.com/articles/1/relationships/author

http://example.com/articles/1/relationships/author
related
http://example.com/articles/1/author

http://example.com/people/9
self
http://example.com/people/9

Note: there are no item + collection links for the data within relationships objects because of https://github.com/json-api/json-api/issues/913.
In terms of cached representations, you'd end up with:
http://example.com/articles
the whole response document
http://example.com/articles/1
{
    "type": "articles",
    "id": "1",
    "attributes": {
      "title": "JSON:API paints my bikeshed!"
    },
    "relationships": {
      "author": {
        "links": {
          "self": "http://example.com/articles/1/relationships/author",
          "related": "http://example.com/articles/1/author"
        },
        "data": { "type": "people", "id": "9" }
      }
    },
    "links": {
      "self": "http://example.com/articles/1"
    }
  }

http://example.com/articles/1/relationships/author
{
  "links": {
    "self": "http://example.com/articles/1/relationships/author",
    "related": "http://example.com/articles/1/author"
  },
  "data": { "type": "people", "id": "9" }
}

http://example.com/people/9
{
  "type": "people",
  "id": "9",
  "attributes": {
    "firstName": "Dan",
    "lastName": "Gebhardt",
    "twitter": "dgeb"
  },
  "links": {
    "self": "http://example.com/people/9"
  }
}

I hope that helps in some way! Lmk if there's anything else I can add.

thanks for this explanation

Sure :)
To your question:

What's not clear to me yet is, if other links blocks appear in the response body and they do have a self link, is there an implicit relationship between those (for the lack of a better term) sub-resources and the resource in which they appear in?

Are you talking about the implicit collection/item links I added? If so, I would say those are justified because the spec is pretty clear that, when data is an array, it's because the response is a collection of resources. Then, clearly, each entry is an item in that collection. Specifically, the spec says (emphasis added):

Primary data MUST be... an array of resource objects, an array of resource identifier objects, or an empty array ([]), for requests that target resource collections

Also/unrelated, I realized shortly after posting that the method I gave for extracting the representations of the "sub-resources" is actually a little broken. When the "subresource" is a relationship object like you'd find at http://example.com/articles/1/relationships/author, then my earlier method works. But, when the subresource is a "resource object" in JSON:API speak, as in http://example.com/people/9, you actually have to take the value I described above and wrap it in a data key. So the representation becomes:
{
  "data": {
    "type": "people",
    "id": "9",
    "attributes": { /* ... */ },
    "links": {
      "self": "http://example.com/people/9"
    }
  }
}

I would also probably repeat data.links at the top-level (for reasons you'll see below), so the full representation would be:
{
  // simply a copy of data.links
  "links": {
    "self": "http://example.com/people/9"
  },
  "data": {
    "type": "people",
    "id": "9",
    "attributes": { /* ... */ },
    "links": {
      "self": "http://example.com/people/9"
    }
  }
}

Sorry about that omission.
The one final caveat about extracting "sub resource" representations in this way is that, with the introduction of profiles in 1.1, there are now top-level links that implicitly apply to every sub-resource too, namely profile links. If a representation has a top-level profile link, it means (among other things) "the linked profile describes some extra meaning associated with this document's members", but those members could be in the subresources. So, a complete method for extracting representations of the subresources would involve cascading the profile links down. So, the representation for http://example.com/people/9 would be:
{
  "links": {
    "profile": [/* links from top-level links.profile in http://example.com/articles */],
    // other copied links from data.links
  },
  "data": { /* same contents as `data` in example above */ }
}

Cascading these profile links certainly isn't hard, but it's a bit annoying that you'd have to add a special case for it (since cascading top-level links from the containing resource in the general case certainly is not safe). It also wouldn't be very future proof: if a new top-level link was added later that also implicitly applied to subresources, existing code would miss it.
A much better approach imo would be for the JSON:API spec to allow the sub resources in the original response to simply repeat the top-level links that apply to them. So, a response for /articles could be:
{
"links": {
"self": "http://example.com/articles",
"next": "http://example.com/articles?page[offset]=1",
"profile": ["http://example.com/some-profile"]
},
"data": [{
"type": "articles",
"id": "1",
"attributes": { /* ... */ },
"relationships": {
"author": {
"links": {
"self": "http://example.com/articles/1/relationships/author",
// profile repeated here
"profile": ["http://example.com/some-profile"]
},
"data": { "type": "people", "id": "9" }
}
},
"links": {
"self": "http://example.com/articles/1"
// profile repeated here too
"profile": ["http://example.com/some-profile"]
}
}]
}

Then, the subresource extraction logic can be simpler and relatively future proof. To summarize, it would go like this:

- if the subresource is a relationship object, pull out the whole object containing the `links` key and use that as the representation (as in my original post)
- if the subresource is a resource object, pull out the whole object containing the `links` key, place that object as the value of the `data` key in a new object, and add a `links` key to that new object that has the same content as `data.links`.

So, the representation for `/articles/1` (given the response above with the repeated links) would be:

```js
{
  // this is just a full copy of data.links; no special-casing required.
  "links": {
    "self": "http://example.com/articles/1"
    "profile": ["http://example.com/some-profile"]
  },
  data: {
    "type": "articles",
    "id": "1",
    "attributes": { /* ... */ },
    "relationships": {
      "author": {
        "links": {
          "self": "http://example.com/articles/1/relationships/author",
          "related": "http://example.com/articles/1/author",
          "profile": ["http://example.com/some-profile"]
        },
        "data": { "type": "people", "id": "9" }
      }
    },
    "links": {
      "self": "http://example.com/articles/1"
      "profile": ["http://example.com/some-profile"]
    }
  }

That works pretty nicely imo. To make it happen, though, you (or @gabesullice) would have to open an issue/PR on the JSON:API repo allowing the repetition of the profile links like this -- and maybe jumpstarting a more general discussion about the identification/extraction of subresources in a JSON:API document.

Hi @ethanresnick ,
When I originally read your comment I read the whole thing. But when I looked at it yesterday I did a bit of a poor job with skimming it. All your answers make perfect sense, and so does the item / collection relationship.
I feel with this in hand there's already a lot of stuff I can implement. Curious what @gabesullice thinks

What we're trying to work out is: can we programmatically map a resource object to a resource on the client, and if so, how?
FWIW, we're certainly not the first to encounter this JSON:API stumbling block.
@steveklabnik summed up the distinction between a resource and a resource object (a.k.a "entity") nicely and I think that's where the confusion is coming from here.
@ethanresnick addressed a lot of my concern about treating resource objects in a collection as an independent resource. I.e., that you need to "wrap" it in the JSON:API data envelope and that you have to be concerned about how the envelope contextualizes the resource object(s) within it (e.g. via a profile links). I think cascading links is a nice heuristic for doing that, but I'm afraid it could be prone to error and lost information (what about the meta or jsonapi members?) IOW, I think @ethanresnick is right about "maybe jumpstarting a more general discussion about the identification/extraction of subresources in a JSON:API document". I agree with that completely.
@evert, I haven't looked at you PR yet (I'll do that next), but I think you're primarily concerned with this because you want to pre-populate a cache of the target entities to avoid an additional request when "following" items? Honestly, I don't think that needs to happen (at least not soon). Following top-level links alone is fine to begin with.

You could try to come up with a fragment that could be used to create a context uri, but json doesn't have an official fragment format afik, and a sensible fragment format for json:api would probably be something based on json:api's type–id identification scheme anyway, rather than, say, json pointer.

I think a JSON:API profile would be a great way to establish a fragment format ;) *I don't really agree that type-id is a good scheme (because of relationship objects and the difficulty of parsing it out), but we can have that discussion elsewhere!
I think using the self link to establish a context URI is a good start, but I'm afraid it will suffer from the same pitfalls mentioned above in that it will lose contextual information that it inherits from the top-level document (a.k.a "envelope").

@evert, I haven't looked at you PR yet (I'll do that next), but I think you're primarily concerned with this because you want to pre-populate a cache of the target entities to avoid an additional request when "following" items? Honestly, I don't think that needs to happen (at least not soon). Following top-level links alone is fine to begin with.

There's a few different bits here that all are somewhat related.

First, there's implicit link relationships through the item reltype. I want to extract those too. This isn't very difficult, and allows parent->followAll('item').
Then, there is indeed caching. This is bonus, but not strictly needed. The drawback of not having this, is that you might end up doing more requests than you need.
Kind of related to both. If a collection has items, and those items have their own relationships. The 'correct' way to get access to those is calling:

parent.follow('item').follow('some-other-rel');

This works without caching the caching bit, but without caching it does imply that, in order to get the some-other-rel resource, we do need do an extra HTTP request, even though that information would already have been available in the parent request.
This is not a deal-breaker for me, but I imagine someone using this library with JSON:API might be surprised that there are more HTTP requests than needed.
So ultimately, if there is a sensible JSON:API way to (as you say) map a Resource Object to a real Resource, you get a lot for free.

First, there's implicit link relationships through the item reltype. I want to extract those too. This isn't very difficult, and allows parent->followAll('item').

I think the rule should be:
if a resource object under a data array (it has to be an array) has a self link, it implicitly becomes an item link belonging to the top-level links object.
To start, I would issue an actual request in order to follow that link. I would not emulate it until the mapping rules are more fully understood.

So the bits i have implemented now are links for top-level objects and treating collection-members as 'item' links (if they have a self link).
Is there more that can be done today? I'm thinking it might be possible to parse relationships for non-collection resources and treat members as related links, but I'm not that sure how useful that is given that we can't map include resource objects to full resources.

Although if someone is interested build a generic HATEAOS api browser based on Ketting it might be a nice little bonus.

I think cascading links is a nice heuristic for doing that, but I'm afraid it could be prone to error and lost information (what about the meta or jsonapi members?)

+1 to this concern. and to maybe holding off on trying to synthesize representations until the rules are better understood.

Thanks all for the contributions. I'm closing this ticket for now. Hopefully any future gaps can be closed through an ext iteration of JSON:API. Happy NY!


Aggregate metric email branch

@cpatrick PTAL.
This adds the branch name to the AM email and has better displays of the aggregate metric on the alerts UI, along with displaying the branch name on the alerts UI.

LGTM.


A question about the RandZoomOut

a question about the augmention (https://github.com/pytorch/vision/blob/main/references/detection/transforms.py) of SSD:
class RandomZoomOut(nn.Module):
    def __init__(
        self, fill: Optional[List[float]] = None, side_range: Tuple[float, float] = (1.0, 4.0), p: float = 0.5
    ):
        super().__init__()
        if fill is None:
            fill = [0.0, 0.0, 0.0]
        self.fill = fill
        self.side_range = side_range
        if side_range[0] < 1.0 or side_range[0] > side_range[1]:
            raise ValueError(f"Invalid canvas side range provided {side_range}.")
        self.p = p

    @torch.jit.unused
    def _get_fill_value(self, is_pil):
        # type: (bool) -> int
        # We fake the type to make it work on JIT
        return tuple(int(x) for x in self.fill) if is_pil else 0

    def forward(
        self, image: Tensor, target: Optional[Dict[str, Tensor]] = None
    ) -> Tuple[Tensor, Optional[Dict[str, Tensor]]]:
        if isinstance(image, torch.Tensor):
            if image.ndimension() not in {2, 3}:
                raise ValueError(f"image should be 2/3 dimensional. Got {image.ndimension()} dimensions.")
            elif image.ndimension() == 2:
                image = image.unsqueeze(0)

        if torch.rand(1) < self.p:
            return image, target

        orig_w, orig_h = F.get_image_size(image)

        r = self.side_range[0] + torch.rand(1) * (self.side_range[1] - self.side_range[0])
        canvas_width = int(orig_w * r)
        canvas_height = int(orig_h * r)

        r = torch.rand(2)
        left = int((canvas_width - orig_w) * r[0])
        top = int((canvas_height - orig_h) * r[1])
        right = canvas_width - (left + orig_w)
        bottom = canvas_height - (top + orig_h)

        if torch.jit.is_scripting():
            fill = 0
        else:
            fill = self._get_fill_value(F._is_pil_image(image))

        image = F.pad(image, [left, top, right, bottom], fill=fill)
        # maybe the following code is redundant?
        if isinstance(image, torch.Tensor):
            v = torch.tensor(self.fill, device=image.device, dtype=image.dtype).view(-1, 1, 1)
            image[..., :top, :] = image[..., :, :left] = image[..., (top + orig_h) :, :] = image[
                ..., :, (left + orig_w) :
            ] = v

        if target is not None:
            target["boxes"][:, 0::2] += left
            target["boxes"][:, 1::2] += top

        return image, target

since the operation of F.pad has pad the image, why you do another fill operation for torch.Tensor?
cc @datumbox

@xiaohu2015 Sorry for the delayed response. I just got back from PTO and trying to get up-to-speed. I don't remember all the details now as it's been over a year since I wrote this but I can have a look on my past notes and come back to you. :)

Apologies for the delayed response. It is needed, the reply is here: https://github.com/pytorch/vision/pull/5278#issuecomment-1021188624


Saved entities are not returned from queries.

When querying for records that were just committed via datastore.save I sometimes don't receive the records that were just submitted. I do not receive any failure from the api, nor do I see any conflict on the response.
Environment details

OS: macOS High Sierra 10.13.4
Node.js version: 8.11.3
npm version: 5.6.0
@google-cloud/datastore version: 1.4.1

Steps to reproduce

Execute 5 times this._datastore.save({..., method: 'insert'})
Wait for inserts to complete successfully (promise.all resolved)
Execute 1 time this._datastore.createQuery(...).filter({indexedProp: 'ValueContainedInAllInsertedRecords'}).runStream()
Wait for query to complete successfully (promise resolved)
Repeat steps 1-4 in a loop until the query does not return all expected results. For simplicity you may delete all records after step 4 on each iteration, though this does not effect the outcome.

Each stored record has a unique key. The number of records being returned is well beneath the batch size. The value that is filtered on is indexed. I've tried inducing a delay of up to 30 seconds after inserting the records and before querying; this has no effect.
Expected Results
Query should return all inserted records with the same filtered property.
I expect to find all 5 records on every query. This intermittently fails. Most of the time (90%) I get all 5 records, sometimes I get 3 or 4. I have tried using both this._datastore.save({..., method: 'upsert'}) and a transaction to save the records. I receive the same results any way I try to store the entities.
I've created a repository with the code necessary to reproduce the problem. https://github.com/dcreeyp2p/google-datastore-no-query-response

I've reproduced using your code sample (thank you!), and it seems like this is a case of eventual vs. strong consistency: https://cloud.google.com/datastore/docs/articles/balancing-strong-and-eventual-consistency-with-google-cloud-datastore
I've made some changes to your code that will support strong reads: https://github.com/dcreeyp2p/google-datastore-no-query-response/pull/1


logos not visible

@strivedi4u
LinkedIn and Github logos are not visible.
Assign me this task under hacktoberfest 2024 so that i can resolve this issue.

🚀 Follow me, 💬 Join the WhatsApp Group, and ⭐ Star the Repo to support our journey together!

Done! Kindly review my pull request and let me know if any changes are added.


Navbar buttons fix

Added link to relevant section in navbar

Added link to relevant section in navbar

Kindly mention the issue number.

Issue Number : #6 @KiranAminPanjwani

Awesome! ✨
Happy Contributing! 😊🎉


p2p dev

See also issue #78

develop a minimal example of networking multiple instances of the app.js in p2p branch;
use a minimal interface to emulate GOT deltas
try to break it

see #78


feat(data): JSON-RPC methods

This issue is eligible for a bounty paid out in ETH on OP Mainnet. Read CONTRIBUTING.md to learn how to qualify.

List of all standard execution-related methods and their interfaces, along with chain-specific methods. For mainnet we can start with https://ethereum.org/en/developers/docs/apis/json-rpc/.
Consensus layer RPCs can be ignored for now since the site focus is execution level

This is dependent on #33 as some nodes have non-standard RPC methods that others nodes (even for the same chain) don't implement, so #33 should be completed first that

I can work on this once #50 is merged :)

Closing this issue as part of the move to automated data collection in https://github.com/mds1/evm-diff/pull/62


error while run bot

pip install motor
"async" mongodb driver which the bot depends on

Desktop\Blame-Discord-Bot-main>python main.py
Traceback (most recent call last):
  File "C:\Users\sixpa\Desktop\Blame-Discord-Bot-main\main.py", line 1, in <module>
    import discord, os,time, socket, os,logging,asyncio, motor.motor_asyncio, Core.help as _init, db.database as connections
  File "C:\Users\sixpa\Desktop\Blame-Discord-Bot-main\Core\help.py", line 6, in <module>
    import button_paginator as pg
ModuleNotFoundError: No module named 'button_paginator'