To Coroutine

Hi,
Is there a way to convert a Promise to a Coroutine (to keep consistency with for legacy code)?
Cheers,
Mike

Are you using the PromiseTimer?

Hi Ashley,
No, not yet. I was hoping there was just a simple solution that would apply to any IPromise.
Mike

If you using PromiseTimer then you could call the Update function in the coroutine. That might do what tou want.
If you are using a Promise to wrap a true asynchronous operation then it's difficult to use that with a coroutine.
If we exposed an IsResolved property from promise then you could poll that in a coroutine. You are welcome to fork the repo add that and see if it solves your problem. If the code looks good we can bring it back into the main repo.
If your problem was the other way around (how to treat coroutines as promises) then I could give you extensive support. I've just been creating examples of how to do that!

Hi Ashley,
Okay no worries, I was thinking that perhaps this would do it:
namespace RSG
{
    public static class PromiseExtensions
    {
        public static IEnumerator ToEnumerator(this IPromise promise)
        {
            var done = false;
            promise
                .Done(() => done = true);

            while(!done)
                yield return null;
        }

        public static IEnumerator ToEnumerator<T>(this IPromise<T> promise)
        {
            var done = false;
            promise
                .Done(_ => done = true);

            while (!done)
                yield return null;
        }
    }
}

What do you think?

Awesome. That looks like it should work!

Ill see if it works in my game then fork and pull request.

@mikecann does you try make a promise under Unity Main thread for some UnityApi action?

@LoranceChen Im not sure what you mean by that. You could make this run on the main thread if you "Loomed" it


File Act Op Del Direc

File Act delete directory operations with test case
Thank you for your contribution.
Before submitting this PR, please make sure:

[x] PR description and commit message should describe the changes done in this PR
[x] Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
[ ] Latest Code from master or specific release branch is merged to your branch
[x] No unwanted\commented\junk code is included
[x] No new warning upon build solution
[ ] Code Summary\Comments are added to my code which explains what my code is doing
[x] Existing unit test cases are passed
[x] New Unit tests are added for your development
[ ] Sanity Tests are successfully executed for New and Existing Functionality
[x] Verify that changes are compatible with all relevant browsers and platforms.
[ ] After creating pull request there should not be any conflicts
[ ] Resolve codacy comments
[ ] Builds and checks are passed before PR is sent for review
[ ] Resolve code review comments
[ ] Help Libray document is updated accordingly for Feature changes.

Test cases failing for Linux, hence closing this pull request.


selectionSet ignored for fields defined in additionalResolvers

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

[ ] 1. The issue provides a reproduction available on
Github,
Stackblitz
or
CodeSandbox

Make sure to fork this template and run yarn generate in the terminal.
Please make sure Mesh package versions under package.json matches yours.

[ ] 2. A failing test has been provided
[ ] 3. A local solution has been provided
[ ] 4. A pull request is pending review

Describe the bug
We have defined additionalResolvers in the appropriate file such as:
  Header_ID_V5_V4: {     deprecated: mapFromField('original'),   },
This field is defined in the schema as:
@ObjectType()
export class Header_ID_V5_V4 {
[...] //left out some fields
  @Field(() => String, {
    nullable: false,
  })
  original!: string;

  @Field(() => String, {
    deprecationReason: "('use original instead')",
    nullable: true,
  })
  deprecated!: string | null;
}

Where mapFromField is defined as (effectively it is just a pushdown of an additional selection, as a field has been deprecated and we have changed the naming, therefore we do the mapping in the gateway, as it was the easiest way to solve this generically):
/**
 * Maps a field to another 1:1
 * @param originalFieldName the original field's name
 * @returns the field's value
 */
export function mapFromField(
  originalFieldName: string
) {
  return {
    selectionSet: `
    {
      ${originalFieldName}
    }`,
    resolve(root) {
      return root[originalFieldName];
    },
  };
}

However, running this code, the result is not as expected as deprecated is not filled. This is due to original not being pushed to the subgraph, as expected. A check in onFetch shows that the field is not part of info.fieldNodes, which I would have expected. In the subgraph, the selectionSet also does not define original but instead only deprecated.
To Reproduce Steps to reproduce the behavior:
Create a simple selectionSet on oneField with a definition as above and try to map it. It will not work :-(
Expected behavior
In previous versions, e.g. this resolved correctly. I would have expected original being send to the subgraph.
Environment:
We are using the following versions:
"@graphql-mesh/cli": "^0.92.5",
    "@graphql-mesh/graphql": "^0.99.5",
    "@graphql-mesh/http": "^0.100.5",
    "@graphql-mesh/plugin-hive": "^0.99.5",
    "@graphql-mesh/transform-filter-schema": "^0.99.6",
    "@graphql-mesh/transform-rename": "^0.99.5"

NodeJS: v18

Additional context
Was working fine in previous versions.

Thanks for the issue!
Could you create a reproduction? So we can reproduce it as well!

@ardatan Sure, you can find it in this branch. https://github.com/PlayAnyData/mesh-error-duplicate/tree/reproduce/7423 I have added further information to readme on how to reproduce.

Hi @ardatan , have you reproduce this issue ? No fix is planned ?

I have just updated the repo with latest 0.* version and the issue still exists. Any chances of fixing this?


[Minor-Bug] Search popup window

Hi again :)
In the how-to enable popup window when searching there is a typo (I guess):

I guess it should be "uc.tweak.popup-search" in the documentation.

Also i'm experiencing transparent look, on both firefox and librewolf in linux.

Just checked, I have the same issue.

I fixed the transparent look by reverting at commit that changed
#urlbar[focused="true"] > #urlbar-background {background: var(--toolbar-bgcolor) !important;}
to
#urlbar[focused="true"] > #urlbar-background {background: var(--arrowpanel-background-color) !important;}
Manually replacing the second line with the first in toolbar/urlbar.css seems to solve the problem

@jacksonsamuelmoore That did not do the trick. Sometimes its transparent, sometimes its not.

@PixsaOJ Very odd - did you check out my more detailed testing? Additionally, I found I had to make sure I restarted Firefox between changes. Could you provide any details of your specific setup with the theme and tweaks you've enabled?

I just saw toolbar setting trick, it worked. Cheers 🎉

......So, may I close this one? Issues related to URL bar popup transparency can be discussed in #16 and I will let it open.


project status?

Hi, you are doing a lot of work on this lib right now. do you have any plans for a next release? I am starting to use this lib, however, i have concerns about getting into it while you do some heavy refactoring and come up with breaking changes. So a little heads up would be great :)

Hi,
good questions.
Do I have plans for a next release?
No.
In general, what is the status of this GitHub repo?
It's a side project. Open topics:

migrating to HttpClient for angular 5 and beyond
implementing the DSL for resource traversing and resource building
fixing the build errors (as of now)
testing of the library
improve demo application w/ real world API mock data

We do not actively use HAL APIs at my employer. I explore some HAL APIs in one (1!!) new project at work and one private side experiment. I do not know when a release will come next. The DSL linksFrom, embeddedFrom feels good from the limited experience of the small projects. I'd like to stick with it.
If you intend to use on production, you can use one of the versions published at npm. Do not expect any new features or big fixes there.
If a new release would come, it will be a major version increase. Definetely braking changes to the current versions.
If you like to use the newer things and want the open topics, I'd be willing to Crete a GitHub organisation and put the repo into ownership of the org. I'd be happy to add you (and other people actively wanting and using the lib) to the organisation.
Cheers, David

On 14. Sep 2017, at 16:26, ctaepper<EMAIL_ADDRESS>wrote:
Hi, you are doing a lot of work on this lib right now. do you have any plans for a next release? I am starting to use this lib, however, i have concerns about getting into it while you do some heavy refactoring and come up with breaking changes. So a little heads up would be great :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Let me ask: are you interested in contributing / maintaining to ng-hal if it was owned by a GitHub / npm org?

Hi @dherges , any chance we could get a tiny release which will add support for Angular 5?
Currently ng-hal is the only package which blocks us from upgrading. This release would only fix the breaking changes by 5.0 in ng-hal.

As for your question about a github/npm org, I can't make any promises myself but I think it would definitely help with getting more people to contribute to the project.

Hi dherges. How can I contribute to ng-hal? In the moment we are using this library and we need correct some issues. Thanks!

@tiagofe I can see the source? E.G: https://github.com/dherges/ng-hal/blob/master/packages/http/src/transport/hal-interceptor.ts

Hi @dherges ,
If you are ok with creating a GitHub org for this library, then I've got a bunch of engineers ready to make contributions. We've got an engineering team of around 40, and HAL is a core part of our API philosophy. As we move to Angular 4+ we need this library as part of our UI service offering.
As a priority we would;

make the changes to support HttpClient.
document any CI stuff (I can see a circleci file so that's sweet)

We would also be interested in adding to an associated GitHub project site so we can have some examples to help onboard our customers in using this library if they are using Angular. If you're cool with this then please proceed to setting up the GitHub account and include myself and @drewfreyling (one of our engineering leads).
Kind regards,
Robert.

Hi @robert-ovens,
that's fine to me.
Will you create a GitHub org? and I will transfer ownership of the repository to your org.

@dherges we have created https://github.com/ng-hal

Here we are!

Great. @robert-ovens @dherges lets create a roadmap/issues for what we want to achieve from above.

@ctaepper closing as the project is alive!

@drewfreyling @dherges any chance I could get a rough ETA on when we can expect a version offering Angular 5/6 support? I need to make a decision on whether or not we should continue using ng-hal for our projects at work.

Assuming the changes are trivial we are hoping to get this out next month.


Perps utilities

Closes #5

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 12 (0.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 0.0%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

Solnet.Mango/Models/Perpetuals/PerpAccount.cs
0
1
0.0%

Solnet.Mango/Models/Perpetuals/PerpMarket.cs
0
5
0.0%

Solnet.Mango/Models/MangoAccount.cs
0
6
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
0

Relevant Lines:
1859

💛  - Coveralls


Clarification on create_table limitations and intent

I saw that the README states that create_table is only meant for testing, but I'm curious if this is due to it not being ready "for production" or because it's never intended to be ready for production?
The obvious feature to add is BILLING_MODE, and I was going to look into doing this, but it occurred to me that it might be intentionally left out. Same for LSI. As both of these are support by the DynamoDB client, I figure it's something like API limitations and/or maintenance limitations?
In my current workflow (using the Serverless framework) I can either define my tables in code, or define them in CloudFormation. Doing so in CloudFormation is quite tedious, but doing it in code is a bit awkward as it's not supported by dyntastic.
Any clarification you can provide here is appreciated!

@whitfin No reason aside from production readiness (and less demand than the other features). I only really implemented create_table for running the CI tests, but any PRs to improve the functionality would be appreciated!


New Provider: crossjoin/Browscap

crossjoin/Browscap is a UA parser, who uses the browscap.ini too, but is faster and requires lower amout of RAM. Actually only a file cache is supported. The browscap-php library has adopted a lot of features from it.

Maybe a package like this could contain an alternative implentation
https://github.com/geocoder-php/geocoder-extra
Or we leave it together here. Dunno if the split is really a good idea

I wait currently for the a tested version, then i check again if we implement this parser
https://github.com/crossjoin/Browscap/issues/19#issuecomment-203470717


Setup CI

Experiment Github  Actions

in case of unexpected complications move to Travis CI

@ordavidil
I believe the github actions base is good enough:

See #12

@ordavidil
I believe the github actions base is good enough:

See #12


can alicloud oss upload image/file ?

evnrionment
machine: mac M1
docker image: daprio/daprd:edge， build by docker-compose
component: bindings.alicloud.oss
problem
when i use alicloud oss binding, i can upload a file with text, follow is my code:
$resp = $this->client->post($this->daprSideCardUrl . '/v1.0/bindings/bingdingAliyunoss', [
            RequestOptions::JSON => ['data' => 'hello, world', "metadata" => ["key" => "1.txt"],  'operation' => 'create']
        ]);

i didn't use the php sdk, just use guzzlehttp to call the sidecar api, and it worked. I login aliyun，and i can see the file is there, i download the file, open it, and yes, it contains the string "hello, world".
however, if i want to upload a image file, i don't know what's the value of data field, i have tried different ways, but none worked.

set the base64 data of image to the data field
like "data:image/png;base64,xxxxxxxx", it won't throw exception. i login aliyun, i can see the file, but it's broken, it is not a image file. i think it means the image data is not correct. follow is my code.

$file = BASE_PATH . '/assets/1.jpeg';
$imageInfo = getimagesize($file);
$imageBase64Data = "data:{$imageInfo['mime']};base64," . chunk_split(base64_encode(file_get_contents($file)));
$resp = $this->client->post($this->daprSideCardUrl . '/v1.0/bindings/bingdingAliyunoss', [
    RequestOptions::JSON => ['data' => $imageBase64Data, "metadata" => ["key" => "1.jpeg"],  'operation' => 'create']
]);

set the base64 data of image without "data:image/png;base64," prefix to the data field
then, i delete the prefix  "data:image/png;base64,"  of "data:image/png;base64,xxxxxxxx", the result is the same as above
use file_get_contents to get the content of image, and set to data field

$file = BASE_PATH . '/assets/1.jpeg';
$resp = $this->client->post($this->daprSideCardUrl . '/v1.0/bindings/bingdingAliyunoss', [
    RequestOptions::JSON => ['data' => file_get_contents($file), "metadata" => ["key" => "1.jpeg"],  'operation' => 'create']
]);

it would throw an exception because that makes the payload a wrong json format.

this is the same issue as #2190 , so i close it


Using builtin method for checkin service stabilization

As I don't have my AWS creds with me right now (on vacation) I can't test it but it should work fine. If no one tests my branch I can test it later next week.

Never mind, I don't have time for it unfortunately


Clarify R installation

I sat with @guofei2016 today who was trying to reinstall both ixmp and message_ix for use from R on Windows. We encountered the following difficulties:

His R install (RStudio) had not added the R and Rscript executables to his PATH.
Consequently, install.bat failed, and rixmp was not installed.
When we tried to execute the relevant lines from the Command Prompt, the line Rscript -e "install.packages(c('knitr', 'reticulate'))" failed because no CRAN mirror was specified. (We succeeded by prepending the following line from ci/appveyor-install.R: options(repos=c('https://cloud.r-project.org'), pkgType='win.binary').)

Through this, I observed that install.bat (1) hardcodes a version number, and (2) when run from Windows Explorer, closes immediately on failure, so it is not possible for the user to see, understand, and try to resolve any problems.
Fixes

Delete install.bat.
Update the R install docs to clearly & simply state:

The R installation requires installing Python ixmp from source.
User should ensure & test that Rscript and R are on their PATH.
The Windows, macOS, and Linux installs require the same sequence of commands, which the user should enter directly in the terminal. (Although this is more steps than the current instruction to use install.bat, it at least offers a reasonable chance for debugging.)

Remove the instruction to install Rtools. @adrivinca—do you recall what this was for? Is it still necessary? @guofei2016 seems to think it is not.

I should go back and check some of these problems, from what I can recall now:

the R path need to be manually saved in the environment paths, it has never been automatic
Rtools were needed when leading internally built packages. But not sure if it is still a requirement for newer versions of R and other OS

I remember I write updated documentation for the new release, which it doesn't seem to be online. I will try to find it and update/correct

Linked issues/PRs:

iiasa/message_ix#377 can provide an example here.
Can be handled at the same time as #344.


Change scroller.js exported name

Before, a scroller.js was exported as a "scroller", but now it's imported as a "scroll" and it breaks all of the old code.

You are right, thanks for noticing.


Improve unreachable subsetting check

Description
This improves the com.google.fonts/check/metadata/unreachable_subsetting check in a number of ways:

First, the condition font_codepoints was buggy! It searched through cmap tables to find those which are platform=Windows encoding=Unicode_BMP - which is fine if your font has codepoints exclusively within the BMP! I fixed it to use ttFont.getBestCmap(), which is simpler and also allows for cmap tables containing codepoints in supplementary planes.
Second, we previously did not warn about codepoints which are subsetted out because they were not covered in any glyphset definition at all. This makes sense because it's not a font bug (it's a glyphsets one!) but it turns out that it's actually very useful to know how much of your font will just get dropped on the floor.
Finally, this check only makes sense inside google/fonts, i.e. when you have a METADATA.pb file already. But it's also useful to be able to check during development (i.e. when you are upstream of google/fonts) if any codepoints will get left behind. We do this by copying the behaviour of the packager in how it detects subsets within a font, and using that information if a METADATA.pb file is not present.

Checklist

[x] update CHANGELOG.md
[x] wait for the tests to pass
[x] request a review

I'm not sure why you've assigned this back to me, and assigned it a milestone. It's ready to merge.

A bug in setuptools_scm caused this PR build to fail: https://github.com/pypa/setuptools_scm/issues/905
Now that setuptools_scm version 8.0.0 was yanked, I'm re-triggering the build.


Add integration with Gitlab and Gitea

Suggested new feature or improvement
Add integration with Gitlab and Gitea
Scenario
I would like to use this application, but it is not compatible with any of the platforms I use.
Additional details
No response

GitLab is covered by #794. I'm going to use this item to track Gitea. I hope you don't mind I'm going to change the title to make that clearer.

Any news on that? @krschau


Add attachments to invoices.

Tasks:

[x] Ensure the invoice_files table is updated whenever the full invoice records are fetched from Politeiad.
[x] Add the version as part of invoice table's natural key.

@alexlyp, could you do a quick test of these changes with cmsgui when you get a chance?


/health endpoint not requiring authentication

I was running the tests today and saw quite a bunch of them failing. Besides some other issues I found that the test suite expects the /health endpoint to only be accessible with a valid project_id. It is currently accessible without a secret though.
What is the intended behaviour?

It should be accessible without a token too.

I can change the tests to reflect that.

fixed by #21


use bitcoincash: prefix for URIs (create, parse, scan,..), more string renaming

Fixing fyookball/electrum#23 and some of fyookball/electrum#109

I thought about that, but figured: screw it. That's too much hassle to code and test, it's all over the place and some things I can't even test properly because qr-scanning results in a SegFault, for example. bitcoincash: it is, keep it simple.


Add checklist theme

add new checklist theme #2

Thanks for the contribution! 🚀

Thanks for the contribution! 🚀

yes, thank you for merged it!
i would like to reach this issue #3 too later :eyes:

Looking forward to seeing what you do 👀 👀


Pressing Done on Album Screen

If you press done before going into any albums, when the view controller is initially presented, you'll get an index out of bounds FATAL error.
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'

Has to be handled when conforming to OLFacebookImagePickerControllerDelegate


Keda-kafka - scaledobject reports healthy despite not creating hpa resource

Report
When a scaledobject was created, it was unable to communicate with Kafka, so did not create a HPA. Despite this, the scaledobject reports as Ready, meaning systems such as ArgoCD report it as healthy instead of degraded.
The scaledobject status reports type: Ready despite being in an error state.
  conditions:
    - message: failed to ensure HPA is correctly created for ScaledObject
      reason: ScaledObjectCheckFailed
      status: 'False'
      type: Ready

This failed due to a kafka connectivity error error creating kafka client: kafka: client has run out of available brokers to talk to: unexpected EOF
Expected Behavior
The most recent status for the CRD should report as an error state when the HPA cannot be created for any reason.
Actual Behavior
The most recent status for the CRD is reporting as "Ready"
Steps to Reproduce the Problem

Deploy a scaledobject while a kafka broker is unavailable?

Logs from KEDA operator
No response
KEDA Version
2.11.2
Kubernetes Version
1.25
Platform
Any
Scaler Details
Kafka
Anything else?
No response

It is a field type Ready - it is a name. The value is reported in status, where I can see it is False so working correctly.


entropy added in outputs

PR Summary
entropy added in outputs

PR Checklist

[ ] Adds a test for any bugs fixed. Adds tests for new features.
[x] Format your changes by calling scripts/bash/format.sh.
[x] Explain what you did.

Not sure why the bondi test is crashing, but it's happening locally, too. Looking into it..

Sparse packs require you always pass in a block index. For meshblockdata, just pass in 0 like you suggest
Get Outlook for iOShttps://aka.ms/o0ukef

From: Brandon Barker @.>
Sent: Monday, March 4, 2024 5:42:16 PM
To: lanl/phoebus @.>
Cc: Miller, Jonah Maxwell @.>; Review requested @.>
Subject: [EXTERNAL] Re: [lanl/phoebus] entropy added in outputs (PR #201)
@AstroBarker commented on this pull request.

In src/phoebus_driver.cpphttps://urldefense.com/v3/__https://github.com/lanl/phoebus/pull/201*discussion_r1511982543__;Iw!!Bt8fGhp8LhKGRg!Aph7d-ailVON-bABJXZcG2_3mipzsDM_0x_49l1zPQMPH1-3sQUvZQBLgfdEqa_V1ge7kEPr1TXriei1Z5PuGSy1$:

**/
void UserWorkBeforeOutput(MeshBlock *pmb, ParameterInput *pin) {
auto tracer_pkg = pmb->packages.Get("tracers");
bool do_tracers = tracer_pkg->Param("active");

namespace p = fluid_prim;
auto rc = pmb->meshblock_data.Get().get();
PackIndexMap imap;
auto v = rc->PackVariables(

Looks like the reason for the crash was not having a block index as the first arg to the pack? e.g., doing v(0, p::density, k, j, i) gets rid of the crash. Do the sparse packs not support not passing that arg? Or is it set up wrong here? (I hid your comment @mari2895https://urldefense.com/v3/__https://github.com/mari2895__;!!Bt8fGhp8LhKGRg!Aph7d-ailVON-bABJXZcG2_3mipzsDM_0x_49l1zPQMPH1-3sQUvZQBLgfdEqa_V1ge7kEPr1TXriei1ZyxF0IS0$ because it was really long, sorry)
—
Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/lanl/phoebus/pull/201*discussion_r1511982543__;Iw!!Bt8fGhp8LhKGRg!Aph7d-ailVON-bABJXZcG2_3mipzsDM_0x_49l1zPQMPH1-3sQUvZQBLgfdEqa_V1ge7kEPr1TXriei1Z5PuGSy1$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOO5OJ2CAGBQMSE4GBCU7XDYWUIGRAVCNFSM6AAAAABEFXYJPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMJVGYZTEMBYGU__;!!Bt8fGhp8LhKGRg!Aph7d-ailVON-bABJXZcG2_3mipzsDM_0x_49l1zPQMPH1-3sQUvZQBLgfdEqa_V1ge7kEPr1TXriei1Z2K6HHxm$.
You are receiving this because your review was requested.Message ID: @.***>


transports/quic: Adapt QuicMuxer to upstream StreamMuxer changes

Description
Merge latest upstream master and adapt QuixMuxer to StreamMuxer trait changes from libp2p#2724. Relevant commit is 57840a3.
Discussed in https://github.com/libp2p/rust-libp2p/issues/2722#issuecomment-1204031653 and https://github.com/kpp/rust-libp2p/pull/19#issuecomment-1203998257.
//CC @kpp @thomaseizinger - unfortunately can not explicitly request a review from you, but I would appreciate one.

If we end up merging https://github.com/libp2p/rust-libp2p/pull/2797, we could only poll the inner connection within poll_event actually and not on every poll function.

Thank you for the review @thomaseizinger. I addresses the majority of the comments. The remaining comments concern poll_close, which was not changed in this PR. That being said, I think poll_close generally needs some reworking. I think it makes sense for that to be part of this PR as well, so I'll work on that next.

Thank you for the review @thomaseizinger. I addresses the majority of the comments. The remaining comments concern poll_close, which was not changed in this PR. That being said, I think QuicMuxer::poll_close generally needs some reworking. I think it makes sense for that to be part of this PR as well, so I'll work on that next.

Sounds good to me :)

If we end up merging https://github.com/libp2p/rust-libp2p/pull/2797, we could only poll the inner connection within poll_event actually and not on every poll function.

It is merged now.

https://github.com/elenaf9/rust-libp2p/pull/6/commits/c88efe84c75d7f52964d22ed82ebe4dff2418f16 this is great to see. Also thanks for the elaborate commit message @elenaf9!
To test my understanding: Endpoint is only cloned once for the background task and once per Connection and thus the capacity of the channel of Sender in Endpoint is bounded by the number of Connections, correct?

I can't speak too much to the remaining changes around QUIC but the StreamMuxer stuff looks good to me :)

To test my understanding: Endpoint is only cloned once for the background task and once per Connection and thus the capacity of the channel of Sender in Endpoint is bounded by the number of Connections, correct?

once for the Listener. But yes that's correct.

Sorry but your code stuck in libp2p-perf:

log
$ ./run.sh
# Start Rust and Golang servers.
Local peer id: PeerId("Qmcqq9TFaYbb94uwdER1BXyGfCFY4Bb1gKozxNyVvLvTSw")
about to listen on "/ip4/<IP_ADDRESS>/udp/9992/quic"
Listening on "/ip4/<IP_ADDRESS>/udp/9992/quic".

# Rust -> Rust

Local peer id: PeerId("12D3KooWETdZHt2mgjuYn5vbBFXs7xJFDe7d2Gkap3vL7rZgb1n3")
IncomingConnection { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/49369/quic" }
ConnectionEstablished { peer_id: PeerId("12D3KooWETdZHt2mgjuYn5vbBFXs7xJFDe7d2Gkap3vL7rZgb1n3"), endpoint: Listener { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/49369/quic" }, num_established: 1, concurrent_dial_errors: None }
Behaviour(PerfRunDone(9.998250278s,<PHONE_NUMBER>))
Interval	Transfer	Bandwidth
0 s - 10.00 s	1987 MBytes	1589.32 MBit/s
ConnectionClosed { peer_id: PeerId("12D3KooWETdZHt2mgjuYn5vbBFXs7xJFDe7d2Gkap3vL7rZgb1n3"), endpoint: Listener { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/49369/quic" }, num_established: 0, cause: Some(IO(Custom { kind: Other, error: ConnectionLost(Quinn(ApplicationClosed(ApplicationClose { error_code: 0, reason: b"" }))) })) }
ConnectionClosed { peer_id: PeerId("Qmcqq9TFaYbb94uwdER1BXyGfCFY4Bb1gKozxNyVvLvTSw"), endpoint: Dialer { address: "/ip4/<IP_ADDRESS>/udp/9992/quic", role_override: Dialer }, num_established: 0, cause: None }

# Rust -> Golang

Local peer id: PeerId("12D3KooWNzUaLAQkQHapa6kG22g94fhxRfBUMTmngs7645FT4Brp")
2022-08-22T12:20:05.404237Z ERROR libp2p_quic::muxer: substream server bidirectional stream 0 was reset with error code 0
Interval	Transfer	Bandwidth
0 s - 10.00 s	2003 MBytes	1601.96 MBit/s

^C

How to reproduce:
kpp@libp2p-perf:quic-reimpl#57b46925c4714:
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 493da63..65fbe13 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -7,7 +7,8 @@ edition = "2018"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

 [dependencies]
-libp2p = { git = "https://github.com/elenaf9/rust-libp2p/", branch = "quic/multiple-endpoints-2", version = "0.47.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux", "quic"] }
+#libp2p = { git = "https://github.com/elenaf9/rust-libp2p/", branch = "quic/multiple-endpoints-2", version = "0.47.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux", "quic"] }
+libp2p = { git = "https://github.com/elenaf9/rust-libp2p/", branch = "quic/muxer", version = "0.47.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux", "quic"] }

build and ./run.sh.

Sorry but your code stuck in libp2p-perf:

Thanks for testing! I will look into it.

With https://github.com/kpp/rust-libp2p/pull/19 merged, do I understand correctly that this pull request could target https://github.com/libp2p/rust-libp2p/pull/2289 as well?

With kpp#19 merged, do I understand correctly that this pull request could target libp2p#2289 as well?

Yes. I will tackle the remaining issues / reviews here and open a new PR to #2289 once I think it is ready for merge.

Sorry but your code stuck in libp2p-perf:
log
How to reproduce: kpp@libp2p-perf:quic-reimpl#57b46925c4714:
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 493da63..65fbe13 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -7,7 +7,8 @@ edition = "2018"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

 [dependencies]
-libp2p = { git = "https://github.com/elenaf9/rust-libp2p/", branch = "quic/multiple-endpoints-2", version = "0.47.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux", "quic"] }
+#libp2p = { git = "https://github.com/elenaf9/rust-libp2p/", branch = "quic/multiple-endpoints-2", version = "0.47.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux", "quic"] }
+libp2p = { git = "https://github.com/elenaf9/rust-libp2p/", branch = "quic/muxer", version = "0.47.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux", "quic"] }

build and ./run.sh.

Should be fixed with 4e027b1 and bdba780. @kpp Would you mind testing again?

Thank you for the continuous reviews @thomaseizinger. I think I addressed everything.
There are still two major TODOs in the code, namely

Handle ECN bits. Right I think the best way to solve this is use the quinn_udp implementation, which support reading / writing ECN bits for packets. But I have not looked into it in detail yet.
Set the local address for connections correctly if the socket address is a wildcard address.

They are unrelated to the change of this PR.
However, while this PR was originally only meant to only target the QuicMuxer, I have already touched quite a lot of code also outside of the muxer module. Due to this, I am leaning towards resolving the above issues also within this PR. @kpp wdyt?

Due to this, I am leaning towards resolving the above issues also within this PR. @kpp wdyt?

@elenaf9 I don't think this is a good idea. Let's merge this one ASAP.

Should be fixed with https://github.com/elenaf9/rust-libp2p/commit/4e027b1739d6f3dc6754a5dc15720dfb3b3fcf88 and https://github.com/elenaf9/rust-libp2p/commit/bdba780ee5eaf20d6035a76343ac941ecfd4f0b3. @kpp Would you mind testing again?

I tested b7103aa14662 only, it works! Here are perf logs:

b7103aa14662
# Start Rust and Golang servers.
Local peer id: PeerId("Qmcqq9TFaYbb94uwdER1BXyGfCFY4Bb1gKozxNyVvLvTSw")
about to listen on "/ip4/<IP_ADDRESS>/udp/9992/quic"
Listening on "/ip4/<IP_ADDRESS>/udp/9992/quic".

# Rust -> Rust

Local peer id: PeerId("12D3KooWPGMKCBwUb4ZdxTsAJkkZQq2Topzcazjtt77hS6GYEKUP")
IncomingConnection { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/45161/quic" }
ConnectionEstablished { peer_id: PeerId("12D3KooWPGMKCBwUb4ZdxTsAJkkZQq2Topzcazjtt77hS6GYEKUP"), endpoint: Listener { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/45161/quic" }, num_established: 1, concurrent_dial_errors: None }
Behaviour(PerfRunDone(10.004522187s, 982206277))
Interval	Transfer	Bandwidth
0 s - 10.01 s	982 MBytes	785.16 MBit/s
ConnectionClosed { peer_id: PeerId("12D3KooWPGMKCBwUb4ZdxTsAJkkZQq2Topzcazjtt77hS6GYEKUP"), endpoint: Listener { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/45161/quic" }, num_established: 0, cause: Some(IO(Custom { kind: Other, error: ConnectionLost(Quinn(ApplicationClosed(ApplicationClose { error_code: 0, reason: b"" }))) })) }
ConnectionClosed { peer_id: PeerId("Qmcqq9TFaYbb94uwdER1BXyGfCFY4Bb1gKozxNyVvLvTSw"), endpoint: Dialer { address: "/ip4/<IP_ADDRESS>/udp/9992/quic", role_override: Dialer }, num_established: 0, cause: None }

# Rust -> Golang

Local peer id: PeerId("12D3KooWSeYNmCJguvQGfVvDJQbTnaDWvi4DiTVeSqEBFZJgPAr7")
Interval	Transfer	Bandwidth
0 s - 10.00 s	1094 MBytes	875.04 MBit/s
ConnectionClosed { peer_id: PeerId("12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw"), endpoint: Dialer { address: "/ip4/<IP_ADDRESS>/udp/9993/quic", role_override: Dialer }, num_established: 0, cause: None }

# Golang -> Rust

2022/09/21 21:01:31 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
IncomingConnection { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/39035/quic" }
ConnectionEstablished { peer_id: PeerId("12D3KooWSrnuqq4MQNqdyW5KPNdV7Ynx6bCwNBnEF9ZzSdV5LEU2"), endpoint: Listener { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/39035/quic" }, num_established: 1, concurrent_dial_errors: None }
Interval 	Transfer	Bandwidth
0s - 10.00 s 	931 MBytes	744.76 MBit/s
Behaviour(PerfRunDone(10.000510422s, 931200000))
ConnectionClosed { peer_id: PeerId("12D3KooWSrnuqq4MQNqdyW5KPNdV7Ynx6bCwNBnEF9ZzSdV5LEU2"), endpoint: Listener { local_addr: "/ip4/<IP_ADDRESS>/udp/9992/quic", send_back_addr: "/ip4/<IP_ADDRESS>/udp/39035/quic" }, num_established: 0, cause: Some(IO(Custom { kind: Other, error: ConnectionLost(Quinn(ApplicationClosed(ApplicationClose { error_code: 0, reason: b"" }))) })) }

# Golang -> Golang

2022/09/21 21:01:41 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
Interval 	Transfer	Bandwidth
0s - 10.00 s 	1077 MBytes	861.50 MBit/s

Due to this, I am leaning towards resolving the above issues also within this PR. @kpp wdyt?

@elenaf9 I don't think this is a good idea. Let's merge this one ASAP.

Okay. From my side this is ready for merge then. Will create the PR tomorrow.

Should be fixed with https://github.com/elenaf9/rust-libp2p/commit/4e027b1739d6f3dc6754a5dc15720dfb3b3fcf88 and https://github.com/elenaf9/rust-libp2p/commit/bdba780ee5eaf20d6035a76343ac941ecfd4f0b3. @kpp Would you mind testing again?

I tested https://github.com/elenaf9/rust-libp2p/commit/b7103aa146621a6aa1504dc1a0b51d634883f9ae only, it works! Here are perf logs:

Thanks for testing.
Concerning the concrete numbers: I don't think we should rely on them too much. E.g. compared to the run in https://github.com/libp2p/rust-libp2p/pull/2289#issuecomment-1046889615 the numbers have significantly decreased, however they also decreased for the  go -> go test (1273.55 MBit/s vs 861.50 MBit/s), where no code at all has changed between the two runs. Also, when I run them on my local machine on the same commit the numbers differ again, even between individual runs.


Delete button for ActiveStorage fields uses inline Javascript

As the Delete button for ActiveStorage fields uses inline Javascript (in its onclick attribute), it's not compatible with a secure Content-Security Policy (CSP) header.
Currently the only way to get deletion to work is to disable CSP for the application (or add unsafe-inline to default-src, but that's about the same). This is wrong and greatly increases the XSS risk. Any Javascript should be loaded from .js files.

We're experiencing this issue as well. @mshibuya have you or another maintainer had any thoughts on this?


Flickering/Strobing in GPUImagePreview

I'm using GPUImagePreview and want to adjust a few filters. When I change them with a slider, I get massive strobing effect. Is this normal?
  self.stillCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPresetHigh cameraPosition:AVCaptureDevicePositionFront];
    self.stillCamera.horizontallyMirrorFrontFacingCamera = YES;
    self.overlayVisible = FALSE;

    self.stillCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
    self.imagePreview.fillMode = kGPUImageFillModePreserveAspectRatioAndFill;

    self.brightnessFilter =[[GPUImageBrightnessFilter alloc]init];
    self.contrastFilter = [[GPUImageContrastFilter alloc]init];
    self.saturationFilter = [[GPUImageSaturationFilter alloc]init];
    self.whiteBalanceFilter = [[GPUImageWhiteBalanceFilter alloc]init];
    self.exposureFilter = [[GPUImageExposureFilter alloc]init];

    [self.stillCamera addTarget:self.brightnessFilter];
    [self.stillCamera addTarget:self.contrastFilter];
    [self.stillCamera addTarget:self.saturationFilter];
    [self.stillCamera addTarget:self.whiteBalanceFilter];
    [self.stillCamera addTarget:self.exposureFilter];

    [self.brightnessFilter addTarget:self.imagePreview];
    [self.contrastFilter addTarget:self.imagePreview];
    [self.saturationFilter addTarget:self.imagePreview];
    [self.whiteBalanceFilter addTarget:self.imagePreview];
    [self.exposureFilter addTarget:self.imagePreview];

    [self.stillCamera startCameraCapture];

You're not properly chaining your filters. You're going directly from the camera to each filter, then directly from each filter to the view. The view has five inputs coming into it, all of which are colliding.
If you want to use all five filters on the image, have one filter take in the camera feed, and then chain all the others in order from there, with the filter filter outputting to the view.


Add XL builds to jdk16 pipeline

XL builds were included in the jdk15 pipeline, but were not
included in the jdk16 pipeline.
As per build issue 2174, the OpenJ9 team has confirmed that XL
builds should be included here.
Signed-off-by: Adam Farley<EMAIL_ADDRESS>

@aahlenst - Good catch. Have added those in. Let me know what you think.

@aahlenst - Please merge if happy.

@adamfarley Thanks a lot!


Renaming a named parameter in a function type ignores uses in argument lists

Given the following:
void g(int Function({int x}) f) {
  f(x: 2);
}

If you rename the x in the parameter list to y you get:
void g(int Function({int y}) f) {
  f(x: 2); // error
}

It would be nice if it could find references within the body of the method and rename them.
Similarly for the following case:
typedef IntToInt = int Function({int x});

void g(IntToInt f) {
  f(x: 2);
}

The problem is that function types are structural, they don't track provenance. Sometimes if is the same FunctionType instance, and so we could know that it is the same ParameterElement. But if we instantiated a generic FunctionType, or used LUB of two FunctionTypes, everything is lost in the history.
void f(
  void Function({int? aaa, int? bbb})? a,
  void Function({int? bbb, int? ccc}) b,
) {
  (a ?? b)(bbb: 0);
}

Here, for example, we get only bbb as the shared parameter of a ?? b. And theoretically we would need to rename it in both a and b types.


[BUG] SeedHostsResolver failed to resolve host | OpenSSLTest test failures

What is the bug?
Both these tests have started to fail on main and 2.x branches

org.opensearch.security.ssl.OpenSSLTest.testNodeClientSSL
org.opensearch.security.ssl.OpenSSLTest.testNodeClientSSLwithOpenSslTLSv13

I believe this is the new error that is occuring
[2023-03-30T15:13:53,991][WARN ][org.opensearch.discovery.SeedHostsResolver] failed to resolve host [null:0]
  1> java.net.UnknownHostException: null
  1> 	at java.net.InetAddress$CachedAddresses.get(InetAddress.java:797) ~[?:?]
  1> 	at java.net.InetAddress.getAllByName0(InetAddress.java:1524) ~[?:?]
  1> 	at java.net.InetAddress.getAllByName(InetAddress.java:1382) ~[?:?]
  1> 	at java.net.InetAddress.getAllByName(InetAddress.java:1306) ~[?:?]
  1> 	at org.opensearch.transport.TcpTransport.parse(TcpTransport.java:615) ~[opensearch-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
  1> 	at org.opensearch.transport.TcpTransport.addressesFromString(TcpTransport.java:557) ~[opensearch-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
  1> 	at org.opensearch.transport.TransportService.addressesFromString(TransportService.java:1051) ~[opensearch-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
  1> 	at org.opensearch.discovery.SeedHostsResolver.lambda$resolveHostsLists$0(SeedHostsResolver.java:182) ~[opensearch-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
  1> 	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]

How can one reproduce the bug?
It reproduces 100% when run on GitHub Action, but does not reproduce locally for me, investigating
Do you have any additional context?
See failure log

Main https://github.com/opensearch-project/security/actions/runs/4565952723/jobs/8057787009
2.x https://github.com/opensearch-project/security/actions/runs/4566573970/jobs/8059266808?pr=2608

The failing tests are:

OpenSSLTest.testNodeClientSSLwithOpenSslTLSv13
OpenSSLTest.testNodeClientSSL

In both instances, the test create a three node ssl only cluster with 1 manager and 2 data nodes and in the test case they try adding a 4th node to the cluster, but the 4th node cannot discover the cluster manager.
These tests only run on JDK < 12.

Based on the log, it seems like we couldn't setup the openSSL connection correctly. For this error:
[ERROR][org.opensearch.security.ssl.http.netty.SecuritySSLNettyHttpServerTransport] Exception during establishing a SSL connection: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 474554202f5f6f70656e64697374726f2f5f73656375726974792f73736c696e666f3f70726574747920485454502f312e310d0a486f73743a203132372e302e302e313a31303237340d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a557365722d4167656e743a204170616368652d48747470436c69656e742f342e352e313320284a6176612f31312e302e3138290d0a4163636570742d456e636f64696e673a20677a69702c6465666c6174650d0a0d0a

It shows like there is a communication mismatch. I decoded the record, and it gives a http request:
GET /_opendistro/_security/sslinfo?pretty HTTP/1.1
Host: <IP_ADDRESS>:8628
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.18)
Accept-Encoding: gzip,deflate

I think by enabling the openSSL, we need a https request instead.

Looks like root cause was:

https://github.com/opensearch-project/OpenSearch/pull/6331

I've updated comments on how I think we can get unblock https://github.com/opensearch-project/security/pull/2598#issuecomment-1491025215
Impacted PRs:

https://github.com/opensearch-project/security/pull/2598
https://github.com/opensearch-project/security/pull/2608
https://github.com/opensearch-project/security/pull/2613

On behalf of https://github.com/opensearch-project/OpenSearch/pull/6331, We have fixed the failure of OpenSSLTest by cherry pick @peternied's PR (#2062 ) . Because instead of using legacy settings, we have switched to use setting with new terminology for adding the 4th node in the above test. However, I do think that the change in core should also support legacy settings until the last release version of 2.x line. I will follow up with the core team to see if we/they need to do something for supporting these legacy terminologies in 2.x branch.
We can close this issue for now, once we merge #2598. And I will create a separate issue to track that if needed. Thanks for the support team!


Missing colour support in Font atlases

Currently any colour in font atlas will become white.
Atlas example:

Result:

Maybe what is really needed here is a way to achieve the same visual effect (so e.g. vertical gradient & shadow on text) without resorting to using bitmaps raw. It might even be possible to set gradient colour on text already? Not sure.

Gradient is possible, yes. For this particular example the main problem is outline. Though it can be recreated using BufferedContainer, however there's a big performance hit once this container is being scaled (I mean transforms). Yes, you can use RedrawOnScale = false, but then visuals will suffer.

Ah right, I missed the outline due to dark theme. That does seem to be a bit of a problem...
Maybe this should exist alongside SpriteText as a RawSpriteText or similar and make that use source colour? Not sure.

Can you please tell what should I change (if it's a simple one) so at very least I can use local framework? I can't really find the point where the colour is specified.

You have two options:

Change RawCachingGlyphStore to save and read RGBA instead of A

https://github.com/ppy/osu-framework/blob/2b1dd17b9caae24d38a0075adad5db1b6c3759d3/osu.Framework/IO/Stores/RawCachingGlyphStore.cs#L77-L78
and
https://github.com/ppy/osu-framework/blob/2b1dd17b9caae24d38a0075adad5db1b6c3759d3/osu.Framework/IO/Stores/RawCachingGlyphStore.cs#L119-L126

Use TimedExpiryGlyphStore

            Fonts.AddStore(new TimedExpiryGlyphStore(Resources, "font"));

Note that the second will take a touch longer to load (and will have a temporarily higher memory footprint) as it is no longer benefitting from caching the PNG content to disk. You'd probably want to only use this for the fonts you need to.

If you want to fix it, you have to know that RawCachingGlyphStore caches the glyph pages as alpha maps.
The createCachedPageInfo() method creates the alpha map, specifically through the following code:
https://github.com/ppy/osu-framework/blob/eca80e83b118de60b745300791ce3b448ab7985c/osu.Framework/IO/Stores/RawCachingGlyphStore.cs#L71-L95
The createTextureUpload() method reads the alpha map, and creates the resulting per-character texture upload.

Thanks!


Musig2 api consistency

The goal is to make the code consistent, i.e., variable names, function names, return values, IN/OUT order, documentation, coding style, etc.
closes #21

With the final change of naming variables with a more descriptive name (returning to aggr_R rather than pubkey), this is good to be merged.


Improved vim modeline detection

TLDR: This greatly increases the flexibility of vim modeline detection to manually set the language of a file.
Fixes #2789. In vim there are two forms of modelines:
[text]{white}{vi:|vim:|ex:}[white]{options}
examples: 'vim: syntax=perl', 'ex: filetype=ruby'

-and-
[text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text]
examples: 'vim set syntax=perl:', 'Vim: se ft=ruby:'

As you can see, there are many combinations. These changes should allow most combinations to be used. The two most important additions are the use of the keyword 'syntax', as well as the addition of the first form (you now no longer need to use the keyword 'set' with a colon at the end). The use of first form with 'syntax' is very, very common across GitHub

:+1: thanks for this @chrisarcand!

Please note, these changes won't be live on GitHub until we cut a new Linguist gem (likely next week sometime).

No problem, and thanks for the GitHub note! :wave:


Updated to retrofit2 beta4

Can one of the admins verify this patch?

Sorry but we're just updating this to 2.0.0 - but thanks anyway!


DocsArchive-<IP_ADDRESS>Auto archive content

Auto archive content from https://github.com/OPS-E2E-PPE/docs-archive-test-source

Docs Build status updates of commit 102cee7:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Release_Archive_master_2020-01-07-08-41-57 has been deleted or has been force pushed: fatal: couldn't find remote ref refs/heads/Release_Archive_master_2020-01-07-08-41-57

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Create Wikidata Items for Open Data Portals and link these

Current UK Open Data Portals (inc 6 Scottish ones)
https://w.wiki/4UDC

Improved version - https://w.wiki/4Wya
Up to  16 Scots ones now.

Now 22 portals with Wikidata QID

Brilliant. Thanks Ian! 😊


DNS TCP responder

Is it possible to have OVN respond to internal DNS requests over TCP as well as UDP?
That way if a client is using TCP DNS, they can still resolve internal DNS names.

It should be possible.
Patches/PR welcome if you want to add the support.
Thanks
Numan

I don't see how this would be possible. You would have to spoof a SYN+ACK to the initial SYN before you know how the query will look like, intercepting all DNS traffic over TCP.

Right now OVN supports internal DNS resolution (if configured) for UDP.  I suppose same can be done for TCP too.
Presently,  if internal OVN DNS is configured on a logical switch, then we add a flow with the controller action and ovn-controller tries to resolve the DNS and reply with the DNS resolution.  If it can't resolve, the packet is resumed and it continues the pipeline.
So I suppose same can be done for DNS via TCP too.


Performance issue: Slow retrieval times from Parameter Store in .NET 8 Lambda functions

Describe the bug
Hello,
We have observed that Lambda functions using the .NET 8 runtime experience delays when fetching parameters from AWS Systems Manager Parameter Store. The delay ranges from 4 to 15 seconds, depending on the allocated memory size. This behavior is inconsistent and seems to be more pronounced during cold starts.
Regression Issue

[ ] Select this option if this issue appears to be a regression.

Expected Behavior
We expect a consistent and faster response when fetching parameters from the Parameter Store, regardless of the memory configuration or cold/warm start scenarios.
Current Behavior
Below are the observed results during cold and warm starts for both multiple Parameter Stores and a single Parameter Store:
Cold Start (Full Path Parameter Store):

128MB RAM: 18.637 seconds
512MB RAM: 4.30 seconds
1GB RAM: 1.69 seconds
2GB RAM: 0.81 seconds

Warm Start (Full Path Parameter Store):

128MB RAM: 0.439 seconds
512MB RAM: 0.151 seconds
1GB RAM: 0.127 seconds
2GB RAM: 0.113 seconds

Cold Start (Specific Path Parameter Store):

128MB RAM: 18.338 seconds
512MB RAM: 3.85 seconds
1GB RAM: 1.66 seconds
2GB RAM: 0.94 seconds

Warm Start (Specific Path Parameter Store):

128MB RAM: 0.378 seconds
512MB RAM: 0.036 seconds
1GB RAM: 0.079 seconds
2GB RAM: 0.051 seconds

Reproduction Steps

To reproduce the issue with the slow retrieval times from AWS Systems Manager Parameter Store, follow these steps:
Set up an AWS Lambda function with the .NET 8 runtime.
Use the following code for the Lambda function:

using Amazon.Lambda.Core;
using Microsoft.Extensions.Configuration;
using System.Diagnostics;

// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]

namespace GetSSM.LambdaFunction
{
    public class Function
    {
        public string FunctionHandler(object input, ILambdaContext context)
        {
            var stopWatch = new Stopwatch();
            stopWatch.Start();

            var configuration = GetConfiguration();

            stopWatch.Stop();
            var elapsedTime = stopWatch.ElapsedMilliseconds;

            context.Logger.LogInformation($"Get Parameter Store: {elapsedTime} milliseconds");
            context.Logger.LogInformation($"Get Parameter Store: {elapsedTime / 1000.0} seconds");
            return "Hello World";
        }

        public static IConfiguration GetConfiguration()
        {
            var cb = new ConfigurationBuilder().AddSystemsManager(c =>
                {
                    c.Path = "/my/full/path/";
                });

            return cb.Build();
        }
    }
}

Deploy the function and configure an appropriate IAM role with permission to access Parameter Store.
Use AWS Systems Manager Parameter Store to create parameters under both:

A specific path (e.g., /my/full/path/parameter).
A full path structure with multiple parameters.

Test the Lambda function with different memory configurations (e.g., 128MB, 512MB, 1GB, 2GB) and log the results for both:

Cold starts: Ensure the function is invoked after an idle period or by deploying a new version.
Warm starts: Invoke the function repeatedly within a short time span.
Collect the execution times for each scenario and compare the results.

Possible Solution
No response
Additional Information/Context
We’ve also attached a graph visualizing the above results to provide more clarity. This issue seems closely tied to the allocated memory size and the runtime's handling of cold starts.
Key Questions:

Is this behavior expected due to some inherent limitation or design of the library?
Are there any recommendations to mitigate these cold start delays when fetching parameters?
Considering that the function only performs a single GetParameter operation, is it appropriate to scale the memory so significantly to improve performance? Or is there an alternative approach to address this latency without increasing the allocated memory?

Thank you for your assistance! Let us know if further details or tests are required.
AWS .NET SDK and/or Package version used
Amazon.Extensions.Configuration.SystemsManager 6.2.2
Amazon.Lambda.Core 2.2.0
Amazon.Lambda.Serialization.SystemTextJson v
Targeted .NET Platform
.NET 8
Operating System and version
.NET8 Lambda Runtime

@mcamacho97 Good morning. Lambda cold starts are expected for .NET runtime. One of the ways to reduce cold start time is to use Native AOT compilation.

Compile .NET Lambda function code to a native runtime format
Building .NET Lambda functions with Native AOT compilation in AWS SAM for guidance on how to do so.

You may also try to leverage new SnapStart Lambda feature (however, please check pricing considerations).

AWS Lambda SnapStart for Python and .NET functions is now generally available
Improving startup performance with Lambda SnapStart

Increasing memory size could help a bit, but cold start would still be an issue due to container initialization upon first request.
Thanks,
Ashish


Project Structure page does not fully reflect what is generated

Description
I am pretty new to F# and the whole F# ecosystem and so don't know much about what most of the folders do, so I went to the Project Structure page which is currently located here and has it's source here. The list of folders here has a few discrepancies with what I got when I first cloned and ran the build.

The page refers to docs as the place where to find the .fsx and .md files, however they seem to be  in a folder called docsrc. This is confusing because there is also a docs folder which seems to be the auto-generated output, but then I see docs/output in the current structure page with a comment saying to "not commit this directory to source control".
No mention of what the .fake directory is for
The page currently mentions a nuget directory, but I do not see any auto-generated
No mention of what paket-files directory is for
Mentions a temp directory which doesn't seem to exist, even after running the build script again
A bunch of other files in the root directory are not explained which I feel are F#/ProjectScaffold specific such as build.fsx, packet.dependencies, packet.lock, TestResults.xml

Repro steps
Please provide the steps required to reproduce the problem

Walk through the installation steps as per the Getting Started page

Compare the generated project structure against the Project Structure page

Expected behavior
The project structure wiki page should be up to date with what is currently generated
Actual behavior
The project structure wiki page seems to be out of date and/or missing some parts as described in the description of this issue.
Known workarounds
N/A
Related information
I ran ProjectScaffold on Windows 10 from the master branch.

Description
I am pretty new to F# and the whole F# ecosystem and so don't know much about what most of the folders do, so I went to the Project Structure page which is currently located here and has it's source here. The list of folders here has a few discrepancies with what I got when I first cloned and ran the build.

The page refers to docs as the place where to find the .fsx and .md files, however they seem to be  in a folder called docsrc. This is confusing because there is also a docs folder which seems to be the auto-generated output, but then I see docs/output in the current structure page with a comment saying to "not commit this directory to source control".
No mention of what the .fake directory is for
The page currently mentions a nuget directory, but I do not see any auto-generated
No mention of what paket-files directory is for
Mentions a temp directory which doesn't seem to exist, even after running the build script again
A bunch of other files in the root directory are not explained which I feel are F#/ProjectScaffold specific such as build.fsx, packet.dependencies, packet.lock, TestResults.xml

Repro steps
Please provide the steps required to reproduce the problem

Walk through the installation steps as per the Getting Started page
Compare the generated project structure against the Project Structure page

Expected behavior
The project structure wiki page should be up to date with what is currently generated
Actual behavior
The project structure wiki page seems to be out of date and/or missing some parts as described in the description of this issue.
Known workarounds
N/A
Related information
I ran ProjectScaffold on Android 10 from the master branch.


allow to start containerlab lab in a default docker bridge

Sometimes it might be needed to run a lab in a default docker bridged network instead of creating a custome clab network.
I propose if a user sets the management name to bridge, then the default bridge network should be used

this is inherintly possible by setting:
mgmt:
  network: bridge

but, since the backing bridge is named docker0 for that special bridged network, the code should be adpated to use docker0 name instead of trying to find a bridge after the ID of the network (as it happens with regular networks)


Archive section

Build the contact section in the /app/(Home)/Section5.tsx

@shubhamm69 can you take this up?


Component stops updating state after several seconds of typing

I can verify that the state of my component is being changed and passed down to the quill component, but quill stops updating after 5 - 10 seconds of typing. The last letter typed will be added to the state of my parent component, but it's not displayed in the text editor. This last letter will just keep getting replaced, as if the state of quill is stuck.
Quill version:

[ ] master
[X] 0.4.1
[ ] 1.0.0-beta-1
[ ] Other (fork)

Thanks for reporting. Have you tried updating to the latest version to see if it still persists?

I don't have this issue (version 1.0.0-beta-1)

Hey thanks for the response, Alex. I'm closing this issue because it had nothing to do with your editor.
For posterity's sake - this was happening with any RTE that I plugged in. The issue was that I was using a react-timeago component that live updated its state every second. Once I killed live update on it, everything worked fine.


Don't reverse pump history

Currently the carb history calculation doesn't
work when the pump history is in reverse order.
This should work but doesn't. Remove the reversing until
this is fixed correctly.
Note, i'm not sure if this could have other negative effects, but the bolus wizard carbs work for me with this change.

Do we still need this in light of #932 etc?

No this should be closed.


Refactor: use Bootstrap

Closes #36
This PR refactors our layouts to use Bootstrap and tries to maintain the same net effect in terms of styling and spacing on the index page. I didn't do any cleanup to the styling or spacing for the jobs page/listings since they look decent enough as is and because we will very shortly be re-styling them for #24.
Note that there are some minor discrepancies between what's live on compiler.la vs. this branch (mostly font-sizes due to Bootstrap having different header font-sizes than browser default). I figured that since we'll be implementing more re-designs (#33), it isn't worth spending too much time on preserving every detail of the existing iteration.
I'm opening this now for easier code review, but I think we shouldn't merge this in until a PR for #24 is also ready to merge in.

Putting this in draft. I will try to get some of the font-sizes back to what they are on the live site.

After discussing with Angela over Slack, I've decided and let her know that I'm resolving most comments above as ("Save this for a future refactor. Resolving for now."). The only actual fix I want to see is the HTML error (h2"). Otherwise, this looks good to me. I'd like to see this PR merged, and then I can start reviewing #44


ValueError at make_beadplots stage

🏄 [3:36:19.747932] start B.1.1.70, 679 entries
🏄 [3:36:20.957782][0/36] loading JSON
[ ... ]
🏄 [3:36:25.788906][2/36] Reduced to 331 variants; generating feature set union
🏄 [3:36:25.789371][4/36] Writing distance matrix to temporary file
[ ... ]
🏄 [3:36:28.897609][8/36]   row 0 of 331
Traceback (most recent call last):
  File "batch.py", line 249, in <module>
    result = make_beadplots(by_lineage, args, cb.callback, t0=cb.t0.timestamp())
  File "batch.py", line 206, in make_beadplots
    label_dict = import_labels(handle)
  File "batch.py", line 161, in import_labels
    qname, idx = line.strip('\n').split(',')
ValueError: too many values to unpack (expected 2)

Smells like a sequence label contains a , character.
Yup.  This one is the culprit:
>>> handle = open('data/B.1.1.70.labels.csv')
>>> for line in handle:
...   items = line.strip().split(',')
...   if len(items) != 2:
...     print(line)
...
hCoV-19/Hungary/US-32533w,/2020|EPI_ISL_677751|2020-09-02,297

>>>

Hot fix to master branch, commit 06e685e0e756b9caf11a0f2af6cef718970a48ee


modiifed for ryohei

Docs Build status updates of commit 3bc9460:
:warning: Validation status: warnings

File
Status
Preview URL
Details

rd/index.yml
:warning:Warning

Details

rd/map.yml
:warning:Warning

Details

rd/ryohei-yoshijima.yml
:white_check_mark:Succeeded

rd/index.yml

Line 0: [Warning-InvalidFileLink] Invalid file link:(~/about).
Line 0: [Warning-InvalidFileLink] Invalid file link:(~/CodeOfConduct).
Line 0: [Warning-InvalidFileLink] Invalid file link:(~/map).

rd/map.yml

Line 0: [Warning-InvalidFileLink] Invalid file link:(~/about).
Line 0: [Warning-InvalidFileLink] Invalid file link:(~/CodeOfConduct).
Line 0: [Warning-InvalidFileLink] Invalid file link:(~/map).

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


lightgbm + dask generates crazy predictions

Description
We are experimenting with distributed learning using lightgbm + dask, and noticed that the predictions could be obviously wrong (crazy numbers). For the reproducible example below, the r_squared of the in-sample prediction using lightgbm + dask is -1.5e+56. As comparison, training on local machine without distributed learning generates a reasonable prediction with r_squared ~ 0.01.
Reproducible example
Given that a dask client has already been created,
import numpy as np
import pandas as pd
import dask
import lightgbm as lgb
import sklearn

# Prepare data
train_data = pd.read_csv("train_data.csv")
train_data_dask = dask.dataframe.from_pandas(train_data, npartitions=2)
X_train = train_data_dask[["x0", "x1"]].to_dask_array(lengths=True)
y_train = train_data_dask["y"].to_dask_array(lengths=True)
w_train = train_data_dask["weight"].to_dask_array(lengths=True)

# Model training and in-sample prediction
model = lgb.DaskLGBMRegressor(
    client=client,
    max_depth=8,
    learning_rate=0.01,
    tree_learner="data",
    n_estimators=500,
)

model.fit(X_train, y_train, sample_weight=w_train)
y_pred = model.predict(X=X_train)

# Measure the result using r_squared
y_local = y_train.compute()
w_local = w_train.compute()
y_pred_local = y_pred.compute()

r_squared = sklearn.metrics.r2_score(y_local, y_pred_local, sample_weight=w_local)
print(f"r_squared: {r_squared}")

Output:
r_squared: -1.4827682862501415e+56

Environment info
dask version: 2021.05.1
lightgbm version: 3.2.1
Dataset
train_data.csv

Could you upgrade lightgbm to 3.3.0 and try it? I believe this has been fixed.


Unity camera is not able to capture gaussian splatting except view port

Hi,
Thanks for your effort in getting Unity Gaussian Splatting available.
One quick question is that the regular Unity cameras such as Main Camera is not able to render Gaussian Splatting like view port does.
Any idea how to fix this?  I am just trying to figure out how to render Gaussian Splatting in Main Camera.
Please share your thoughts.
Thanks,
Sungshik

Not sure I understand what is the problem.

Thanks for prompt reply.  My question is that from the scene view, I see Gaussian Splatted scene perfectly.  But when I instantiate a camera and see the splatted scene through the camera, the camera does not see the splatted Scene.
It seems the splatted scene is only visible to scene view but not to instantiated camera.

Ah, so you instantiate some camera at runtime, instead of using the camera that is already in the scene?

Well even the "Main Camera" that is already in the scene is not able to see the splatted scene.  However, I see perfectly well from the scene view in Unity.

Ahh, you mean the little preview window. Yeah that one does not show it. I have not investigated why. The actual main camera rendering (i.e. game view) should display it just fine, doesn't it?

Oh I see.  I have not checked it but let me look at it tonight.  Thank you so much!!!

Thank you.  There is no issue anymore

Hi I am sorry the issue is still there.  I can see the splatted scene through the main camera but when I click on play button, the splatted scene disappears.  Is this by the design?

Oh, it was only when I put perception cam.  Please ignore.


Add new grammar for vector search

One thing that probably would be worth adding new grammar for is a vector search operation, a la:
item in vector – return true or false as to whether item is contained within vector
For consistency this should accept an n-vector for item and should look for whether all of those items appear consecutively in vector.
Originally posted by @jonathanhogg in https://github.com/jonathanhogg/flitter/issues/65#issuecomment-2553702896

This will probably want an appropriate search method added to the Vector() class.


Broken nightly build

The nightly build is currently broken with:
error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /Users/lkroll/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:43:33
   |
43 |                                   $const_ident => |v| Some(Internal::from(unsafe { &*(*v as *const Self as *const $ty) })),
   |                                   ^^^^^^^^^^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /Users/lkroll/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:46:33
   |
46 |                                   $option_ident => |v| Some({
   |                                   ^^^^^^^^^^^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
  --> /Users/lkroll/.cargo/registry/src/index.crates.io-6f17d22bba15001f/value-bag-1.0.0-alpha.9/src/internal/cast/primitive.rs:55:29
   |
55 |                               STR => |v| Some(Internal::from(unsafe { &**(v as *const &'a Self as *const &'a str) })),
   |                               ^^^
...
71 | /         to_internal![
72 | |             usize: (USIZE, OPTION_USIZE),
73 | |             u8: (U8, OPTION_U8),
74 | |             u16: (U16, OPTION_U16),
...  |
96 | |             String: (STRING, OPTION_STRING),
97 | |         ];
   | |_________- in this macro invocation
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
   = note: this error originates in the macro `to_internal` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `value-bag` (lib) due to 3 previous errors

I tracked it down to value-bag being pulled in via async-std -> async-io -> log.
I tried if I could eliminate our dependency on async-io by removing default features, but it breaks future timeout support:
error[E0425]: cannot find function `timeout` in module `async_std::future`
   --> core/src/utils/mod.rs:262:28
    |
262 |         async_std::future::timeout(timeout, &mut f)
    |                            ^^^^^^^ not found in `async_std::future`

For more information about this error, try `rustc --explain E0425`.

For now I got an issue open with async-std, because that's the first library where I could actually reproduce the build failure: https://github.com/async-rs/async-std/issues/1058

This is fixed upstream by log updating their value-bag dependency in 0.4.18.


2D SDS

Hi, I'm wondering if you ran experiments on 2D SDS using gaussian splatting (such as using a single camera and a random initialization of gsplats. I'm trying to mimic some of the SDS experiments that the dreamfusion authors ran using gaussian splatting as the 3D representation and it's not really working. Wonder if you had any luck on the same. Thanks!

Nevermind - turns out initialisation is key - making it denser helped. Thanks!


Create Nuget Package

https://docs.nuget.org/ndocs/create-packages/creating-a-package

The issue no longer necessary


can you release a version?

Hello~ community maintainer:
the community has not released a version for  a long time, can you release a version?

+1

+1

+1

I have found a new lib:   go.mozilla.org/pkcs7 (v0.0.0-20200128120323-432b2356ecb1)
It works now.

A more recent fork, based off of the Mozilla one, can be found at https://github.com/smallstep/pkcs7.


Issue in the MPC running in Julia

[WARN] [WallTime:<PHONE_NUMBER>.156393] Could not process inbound connection: topic types do not match: [barc/ECU] vs. [barc/ECU_raw]{'message_definition': 'float32 motor_pwm\nfloat32 servo_pwm\n\n', 'callerid': '/state_estimation', 'tcp_nodelay': '0', 'md5sum': 'aafe42831e6e4c0b016ddb7c396c7072', 'topic': '/ecu', 'type': 'barc/ECU'}
I am getting this error on running the MPC. I have made some changes on the .msg files but have done catkin_make after making the changes.
I was getting an error when i was making changes on the .msg files
creation of publisher failed: Checksum does not match I am getting creation of subscriber failed:
I am still not very good with ros and this is a workaround which i found. I dunno if this is the right way
1)copy the MD5 from the error you get to the header file 2) do catkin_make 3)flash the arduino
I got this reply in the ros forum:
The MD5 sum in the message definition is how ROS checks that message formats match. Messages with MD5 sums that don't match don't have the same format or the same serialization, and if you try to force them to be used together by editing the MD5 sums to match, you will get garbled or corrupt data.
If you change the message definitions that are used by your arduino, you should run make_libraries.py to regenerate the ROS arduino libraries, and then rebuild your arduino project and flash it again.
And as you already know, if you change the message definitions you also need to run catkin_make to recreate C++ and python libraries and recompile anything that uses them on the host side.

Did you modify the CMakeLists.txt file also?
In general, you define the msg file, add it to the CMakeLists.txt file, and then build

Yes i did that. The topics are publishing properly.

Hmmm, did you rebuild the arduino libraries that use your new ROS message?
In the rebuild_system.sh script, I use the follow set of commands to (re)generate the header files that arduino uses to publish/subscribe to topics with custom messages
# rebuild arduino libraries
cd $HOME/sketchbook/libraries
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .
cd

Thanks Jon for the help. I had done that. I was making a mistake in the subscription for the state_estimate as I hadn't updated the message definition in the file. It fine now.

[](#!/usr/bin/env julia
#=
Licensing Information: You are free to use or extend these projects for
education or research purposes provided that (1) you retain this notice
and (2) you provide clear attribution to UC Berkeley, including a link
to http://barc-project.com
Attibution Information: The barc project ROS code-base was developed
at UC Berkeley in the Model Predictive Control (MPC) lab by Jon Gonzales
(jon.gonzales@berkeley.edu). The cloud services integation with ROS was developed
by Kiet Lam  (kiet.lam@berkeley.edu). The web-server app Dator was
based on an open source project by Bruce Wootton
The original code is being modified by Angshuman Goswami from Clemson University
working in Efficient Mobility via Connectivity and Control (EMC2) lab
=#
using RobotOS
@rosimport barc.msg: ECU_raw, Encoder, Ultrasound_xy, Z_KinBkMdl
@rosimport data_service.msg: TimeData
@rosimport geometry_msgs.msg: Vector3
rostypegen()
using barc.msg
using data_service.msg
using geometry_msgs.msg
using JuMP
using Ipopt
using AmplNLWriter
#using NLopt
using geometry_msgs.msg
define model parameters
L_a     = 0.125         # distance from CoG to front axel
L_b     = 0.125         # distance from CoG to rear axel
dt      = 0.1                # time step of system
Ff      = 0.1711        # friction coefficient
a0     = 0.1308        # air drag coeff
a       =  0.125          # distance from CoG to rear axel
b       =  0.125         # distance from CoG to front axel
I_z    =  0.24            # moment of Inertia
m     =  1.98             # mass of the vehicle
Tire Properties
TM_F        = [25, 1.5, -0.981]
TM_R        = [25, 1.5, -1.4715]
(B1,C1,D1)  = TM_F
(B2,C2,D2)  = TM_R
preview horizon
N       = 5
define targets [generic values]
x_ref   = 5
y_ref   = 5
define decision variables
states: position (x,y), velocity (v_x, v_y), yaw angle (phi) , yaw rate(r)
inputs: acceleration, steering angle
println("Creating kinematic bicycle model ....")
mdl     = Model(solver = IpoptSolver(print_level=3))
#mdl     = Model(solver = BonminNLSolver())
#mdl     = Model(solver = NLoptSolver(algorithm=:LD_MMA))
@defVar( mdl, x[1:(N+1)] )
@defVar( mdl, y[1:(N+1)] )
@defVar( mdl, phi[1:(N+1)] )
@defVar( mdl, v_x[1:(N+1)] )
@defVar( mdl, v_y[1:(N+1)] )
@defVar( mdl, r[1:N] )
@defVar( mdl, FxR[1:N] )
define objective function
@setNLObjective(mdl, Min, (x[N+1] - x_ref)^2 + (y[N+1] - y_ref)^2  )
define system dynamics
define constraints
#initialise the system
@defNLParam(mdl, x0                         == 0);              @addNLConstraint(mdl, x[1]                     == x0);
@defNLParam(mdl, y0                         == 0);              @addNLConstraint(mdl, y[1]                     == y0);
@defNLParam(mdl, phi0                     == 0);              @addNLConstraint(mdl, phi[1]                == phi0 );
@defNLParam(mdl, v_x0                    == 0);              @addNLConstraint(mdl, v_x[1]                == v_x0);
@defNLParam(mdl, v_y0                    == 0);              @addNLConstraint(mdl, v_y[1]                 == v_y0 );
Define constraints
#@defNLExpr(mdl, front[i=1:N]       ,               (frontx[i]-x[i])^2      + (fronty[i]-y[i])^2)
for i in 1:N
@addNLConstraint(mdl, x[i+1]        == x[i] + dt*(v_x[i]*cos(phi[i]) - v_y[i]sin(phi[i]))                                                         )
@addNLConstraint(mdl, y[i+1]        == y[i] + dt(v_x[i]sin(phi[i])  + v_y[i]cos(phi[i]))                                                       )
@addNLConstraint(mdl, phi[i+1]   == phi[i] + dtr[i]                                                                                )
@addNLConstraint(mdl, v_x[i+1]   == v_x[i]  + dt(r[i] v_y[i]  + FxR[i]/m)                                                                                )
@addNLConstraint(mdl, v_y[i+1]   == v_y[i]  + dt(-r[i] *v_x[i] )                                                                                )
#@addNLConstraint(mdl, frontx[i+1]            == frontx[i])
@addNLConstraint(mdl, -1              <= a[i]                 <=1)
@addNLConstraint(mdl, -1              <= r[i]                 <=1)
#@addNLConstraint(mdl, front[N]        >=0.03)

end
status update
println("initial solve ...")
solve(mdl)
println("finished initial solve!")
function postion_callback(msg::Vector3)
# update mpc initial condition
setValue(x0,     msg.x)
setValue(y0,     msg.y)
setValue(phi0,   msg.z)
end
function velocity_callback(msg::Vector3)
# update mpc initial condition
setValue(v_x0,     msg.x)
setValue(v_y0,     msg.y)
end
#=
function ultrasound_xy_callback(msg::Ultrasound_xy)
# update obstacles initial condition
setValue(frontx0             ,    msg.frontx)
setValue(fronty0             ,    msg.fronty)
#setValue(frontleftx0     ,    msg.frontleftx)
#setValue(frontlefty0     ,    msg.frontlefty)
#setValue(frontrightx0  ,   msg.frontrightx)
#setValue(frontrighty0  ,   msg.frontrighty)
end
=#
function main()
# initiate node, set up publisher / subscriber topics
init_node("mpc")
pub = Publisher("ecu", ECU_raw, queue_size=10)
s1  = Subscriber("position_info", Vector3, postion_callback, queue_size=10)
s2  = Subscriber("state_estimate", Vector3, velocity_callback, queue_size=10)
#s2  = Subscriber("ultrasound_xy", Ultrasound_xy, ultrasound_xy_callback, queue_size=10)
loop_rate = Rate(10)
counter = 0
while ! is_shutdown()
# run mpc, publish command
tic()
solve(mdl)
toc()
    # get optimal solutions
    FxR_opt  = getValue(FxR[1])
    #=
    if  -0.01<a_opt<0.01
      a_opt = 0
    end
    =#
    r_opt = getValue(r[1])
    #if  -0.001<r_opt<0.001
#      d_f_opt = 0
    #end
    phi_opt = getValue(phi[1])

    counter += 1
    if counter > 75
        # publish commands

          cmd = ECU_raw(a_opt, r_opt,phi_opt)
          publish(pub, cmd)
    end
    rossleep(loop_rate)
end

end
if ! isinteractive()
main()
end
)
I am trying to run this MPC but it is giving me out of bounds error.

I am trying to do string compare and have numeric outputs for different status like 1 for infeasible but I am getting errors.
tic()
status = solve(mdl)
toc()
ismatch(status,"Infeasible")
if ismatch(status,"Infeasible")
status = 1
println("Veh cannot move")
end
I am getting the following error:
ERROR: LoadError: MethodError: ismatch has no method matching ismatch(::Symbol, ::ASCIIString)
Closest candidates are:
ismatch(!Matched::Regex, ::AbstractString)
ismatch(!Matched::Regex, ::AbstractString, !Matched::Integer)

if( status == :Infeasible ) this solution worked


Add the pwplay option to the access tab

Make the password protected project option (with password set by author) more visible. At the moment you have to turn on peer review, set password there and then edit the peer review URL to change 'peer' to 'pwplay'. This should really be an option in the access tab with password to be able to be set there and then correct URL shown in project details.

@FayCross It is almost ready for the next release.

This is now working in 3.13


Address error

Can not find VIT (eva_vit_g.pth).

Sorry, the link should be https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/eva_vit_g.pth


Typespec for Analyze-Documents

Choose a PR Template
Switch to "Preview" on this description then select one of the choices below.
Click here to open a PR for a Data Plane API.
Click here to open a PR for a Control Plane (ARM) API.

Are all these breaking changes to the same version what actually shipped in production and are just corrections? This is why it's best to spec out your service first, have it reviewed, then deploy it. If that's not feasible in some cases, you really should create a new version. Even for previews, breaking changes are bad for customers.

Is this PR for migrating the Swagger to TypeSpec?

@weidongxu-microsoft yes this PR is migrating from swagger to typespec.

@heaths, there are no updates to the API we shipped for analyze-docments in 2023-11-15-preview version. We are basically just trying to migrate from swagger to typespec. Some of these breaking changes are just due to the migration and a few are bugs which @aurghob is working on fixing.

@weidongxu-microsoft yes this PR is migrating from swagger to typespec.

However, there is real schema change (besides naming etc.) that exists in your PR.
E.g.
before https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzedocuments.json#L1977-L1998
after https://github.com/Azure/azure-rest-api-specs/blob/7eb0aadf3d260ca853c047b6c3f1df87e9c20a1c/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzedocuments.json#L1052-L1066
It is really hard to be sure that there is no API change in 2023-11-15-preview

Hi,
For some context, The previous swagger PR https://github.com/Azure/azure-rest-api-specs/pull/30026 was merged last week.
The PR before https://github.com/Azure/azure-rest-api-specs-pr/pull/15838, was reviewed in November 2023 and approved 2 weeks ago but was released as a private preview API.
As for the checks:
I went through all the breaking changes. Some of them I have explained below but also made sure to compare against our Lan guage.AnalyzeText and Language.Conversations typespec.
There are a few (4-8) bugs in the swagger as well which the typespec corrects. Ideally, this should have been a bug fix to the swagger and are consistent with the existing text api but since we were able to add Typespec, we're fixing it here. Please let me know if you'd like a swagger bug fix first separately instead.
In some cases, for example, ExtractiveSummarizationSortingCriteria : my understanding is that with typespec, the way some of the objects are configured have changed and thus it generates the swagger as we see. Please note that the swagger file on this PR is entirely autogenerated.
Going by category of breaking changes below:
1006 - ExtractiveSummarizationSortingCriteria is present and is present directly instead of being referenced.
PiiDomain- is a bug - should be domain
RedactionCharacter and StringIndexType are now directly defined instead of separately referenced. Same will show up in 1017.
1008- Operation Ids are autogenerated by typespec. This has to be changed.
1017 - All the references that are erroring are now directly used objects.
1020 - bug - has to be added.
1022 - staying consistent with analyze-text and analyze-conversations. (Please refer main.tsp in Language.AnalyzeText) No additional properties used. They were empty before as well.
1023- bug : changed to int32 and made consistent. Rest are also for consistency.
1026 - Types are better defined here than previously.
1030 - Did not understand
1036 - Did not understand, was not removed.
1042 -  For the first one, parameter or has changed and is now more consistent with analyze-text and analyze-conversations. all the other ordering issues are incorrectly detected. The parameters are in the same order and are directly defined now instead of being referred separately.
1045- Was missed and is a bug. Consistent with current input.(double check) - have more questions. change description. Its not auto language detection. SummaryLength and query is already present in the API and this is to make sure that the parameter is present as part of the swagger and typespec.
1048 - values is present as documentation - better than before.
1049 - x-ms-enum is still present. Not sure I understand the error.
1050 - Similar to analyze-text and analyze-conversations. Have kept the definition consistent.

1008
Operation ID can be maintained as e.g.
interface AnalyzeDocuments {
  op cancelJob(...);
}

1030
Seems a bug in old Swagger.
It should have "discriminator": "kind" in AnalyzeDocumentsLROResultsKind.
1033
What about this?

1008
Operation ID can be maintained as e.g.

Keeping as is : we don't want to change it back. This format is consistent across analyzeText and analyzeConversations now.
We understand it will break the format of the current swagger but we want to use this for upcoming swaggers. Also - we have done the same for analyze-text

1030
Seems a bug in old Swagger.
It should have "discriminator": "kind" in AnalyzeDocumentsLROResultsKind.

It should be the other way round.  AnalyzeDocumentsLROResults did not have a discriminator and we added it. It's similarly structured in analyze text and analyze conversations.
Same applied for items as it references AnalyzeDocumentsLROResults.

1033
What about this?

The new version is missing a property found in the old version. Was 'results' renamed or removed?
Afaik, the way it is structured with the new swagger is again consistent with analyze-text and analyze-conversations.
This seems to be more correct than the structure before. 'results' is defined in the different results kinds as expected.


Selecting a date should close the picker

Environment

Tech
Version

@material-ui/pickers
v4.0.0-alpha.5

Steps to reproduce

Open https://next.material-ui-pickers.dev/demo/datepicker#basic-usage
Click on the first calendar icon
Select a date
The popup is still open

Expected behavior
The popup should close.
I think that we could consider a disableCloseOnSelect prop as the Autocomplete has for the current behavior.

FYI autoOk={true} does this

@CarsonF Thanks for raising this point up. It seems that we should handle desktop and mobile the opposite way, meaning autoOk={true} on a pointer device and autoOk={false} on a touch device. This would match the experience that is most commonly implemented. For instance, take Google Calendar, or Gmail as an example.


Server "no change" fixes

This PR was born in order to make the last commit with a sample work. The idea is that to persist or synchronize two different resources we need to cross-link and if the nodes propagate all packets, including when the state did not change, then we enter infinite loop.

Fixes in #1551


Implemented weather based activity suggestions using OpenAI API

Feature Update:

App now uses GPT-3 AI API to suggest weather based activities.
Kindly add the REACT_APP environment variable with the Open AI API key
Fixed async error in component rendering
API now gives 5 activity suggestions based on the location and the current weather

TODO

Style the Activities card
Make the card mobile responsive

Attaching screenshots of the recommendations by the GPT-3 Bot:
New York

Paris

Rio De Janeiro

Wellington

Taipei

Pondicherry

NPM package openai-api has been used to fetch the ai engine for sending and receiving the prompt
Variables Configuration & OpenAIApi have been created to fetch the api key from .env file and create a new configuration containing model stats.
openai.createCompletion method has been used to send prompt to the AI engine.
Prompt: Top 5 activities to do in ${city} when its ${result.weather[0].main}:
.then(response) method used to wait for the function to complete and then fetch the answers in a state variable.
activities & setActivities state variables have been used to fetch and store the answer from the endpoint at .JSON file generated.


feat: webhooks support ntfy

:tada: This PR is included in version 1.3.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Overview issue Ignasi

Introduction

My name is Ignasi Simón and I come from Spain
Describe your research in 2-3 sentences to someone who is not from your field (please avoid abbreviations)

Drug delivery with ultrasound-sensitive liposomes for the treatment of brain diseases.
My research entails the following aspects:

Research Aspect
Answer

Use/collect personal data (health data, interviews, surveys)
No

Use/collect experimental data (lab experiments, measurements with instruments)
Yes

Collaborate with industry
No

Write/develop software as the main output of the project
No

Use code (as in programming) for data analysis
Yes

Work with large data (images, simulation models)
No

Other:
N/A

Reflections on the importance of RDM videos

Very interesting video, but I liked the paper better. I felt it was clear and fun to read.
What would you like to learn during this course?

I guess how to work safely with my data, ensure I have enough back-ups, and know where to store those.
Checklist assignments

[x] Assignment 1: creating a GitHub issue (the overview issue) (before 15 February, 10:00)
[x] Respond to the GitHub issue #101
[x] Assignment 2: Data Flow Map 1 . Link: https://1drv.ms/p/c/06f3c3fd5898ff9e/EZ7_mFj9w_MggAb0DQAAAAABbrtqa6N3a0HfoB6onro34g?e=Vgg6TG
[x] Provide feedback to at least one Assignment 2 from another participant
[x] Respond to the GitHub discussion #103
[x] Respond to the GitHub discussion #102
[x] Assignment 3: Data Flow Map 2 (share a link in this issue before 5 March 13:00). Link:  https://1drv.ms/p/c/06f3c3fd5898ff9e/EZ7_mFj9w_MggAb3DQAAAAABiMBhCFglLWzIY3ofXOLu3Q?e=ow54oq
[x] Provide feedback to at least one Assignment 3 from another participant
[x] Assignment 4: Data Management Plan (before 8 March, 13:00)
[x] Respond to the GitHub discussion #104 if you have any questions (optional)
[x] Assignment 5: Data Flow Map 3: submit your slide (before 11 March, 17:00)

Hi @ignasisg! It looks like the sharing link broke for your assignment 2 and 3:  Could you please check and re-share the links? They were working before!

Thanks for updating the links @ignasisg! Assignment 2 looks very comprehensive, well done!
I have a couple of questions:

If you use webdrive you're probably using one of the network drives of TU Delft - is that the project drive or the Bulk drive (:M)? Webdrive is the software/service that we use to access these network drives.
I find your red flag interesting - is it because it is difficult to share data with others in TU Delft?
what is lb? (you use to indicate data sizes?)

And some feedback for assignment 3 as well:
Indeed, the template is a bit repetitive sometimes - you found a nice way around it :)

Glad to hear that you're using the README file and an ORCID!
Python is also an open format/language.
You did not add your preferred repository to the assignment, but I saw 4TU.ResearchData in your data management plan. I hope that is indeed the intended repository?

Let's discuss licenses before session 2 or during the break/after? I can also walk by your office in the morning of the 12th if that is easier!

Hi @ignasisg , your assignment 3 looks nice! The only question/remark I have: it seems like your file naming system is very long (>30 something characters which is recommended). Is it possible to abbreviate somethings, or is this the best way for you to incorporate all the important parameters?

Good point @xxmeryl! I'll think my way through your recommendation. :)


Access the library name property when settings the defaultDestination

It would be nice to be able to pass in the library name as a variable when setting the defaultDestination. That way the libraries could be stored in their own folders e.g.
"defaultDestination": "wwwroot/libs/{library.name}/"
Not sure on the best syntax but the above example I'd expect it to replace {library.name} with e.g. bootstrap

This was brought up for discussion a couple weeks after you posted in #72 .

Closing in favor of #438


Improve data flow for companies reviewing applicants

Goal
The goal of this issue is to reduce the number of requests needed during the applicant review flow.
Context
We currently have two requests to firebase for the company flow of reviewing an active job and its applicants. One on the job detail page /company/company_name/job_id/ and one on the reviewing applicants page /company/company_name/job_ib/applicaton_id.
Notes
We have zustand for state management. There should be some way to store the array of applicants in a store and our different routes read from that instead.
Definition of Done

[x] There is only one call to firebase to retrieve all applicants for a job listing within the company dashboard flow
[x] Both job detail view and applicant review view maintain a list of active applications
[ ] the list of active applications remain synced across both views

Out of scope
Does anything seem related but shouldn't be addressed here?

#290 addresses the first two items in this issue.
There's is still a hiccup in the data flow where UI updates for favorited applications are always one tick behind


[version4] In EF plugin project add reference to the actual Specification package.

Once version 4.0.0 of Ardalis.Specification package is published to Nuget, we should update the references in Ardalis.Specification.EF project. Remove the project references and add Ardalis.Specification nuget package instead. Only then publish it to Nuget.
If Nuget picks up the package dependency automatically, than no need for this. But, I'm not sure on that.

Packages for version 4 are already published, I'm closing the issue.