Get PeerForwarder from a PeerForwarderProvider

Description
This PR shows a concept for making PeerForwarder more dynamic. It adds the PeerForwarderProvider which can provide a PeerForwarder when register is called. This approach can yield a couple benefits:

Calling PeerForwarderProvider.register() can create the PeerForwarder. It can also initiate server configuration. This way, if there are plugins needing peer forwarding, it is not created.
Calling PeerForwarderProvider.register() can dynamically decide what kind of peer-forwarder to provide. When peer-forwarding is not configured, it can provide a localhost only implementation.

This draft PR doesn't yet attain those benefits. It still uses a singleton PeerForwarder which is constructed in the AppConfig. Getting the final benefits shouldn't be much more difficult. But, I wanted to open this PR to get quick feedback on the overall approach and design.
@asifsmohammed
@cmanning09
Issues Resolved
N/A
Check List

[ ] New functionality includes testing.
[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #1717 (f0f7e39) into main (81d9760) will increase coverage by 0.03%.
The diff coverage is 77.77%.

@@             Coverage Diff              @@
##               main    #1717      +/-   ##
============================================
+ Coverage     93.32%   93.35%   +0.03%
- Complexity     1351     1353       +2
============================================
  Files           178      179       +1
  Lines          3969     3974       +5
  Branches        317      317
============================================
+ Hits           3704     3710       +6
  Misses          189      189
+ Partials         76       75       -1

Impacted Files
Coverage Δ

...per/parser/config/PipelineParserConfiguration.java
100.00% <ø> (ø)

.../opensearch/dataprepper/parser/PipelineParser.java
83.48% <66.66%> (ø)

...taprepper/peerforwarder/PeerForwarderProvider.java
75.00% <75.00%> (ø)

...aprepper/peerforwarder/PeerForwarderAppConfig.java
90.00% <100.00%> (+1.11%)
:arrow_up:

...eerforwarder/PeerForwardingProcessorDecorator.java
100.00% <100.00%> (ø)

...rwarder/discovery/AwsCloudMapPeerListProvider.java
97.56% <0.00%> (+2.43%)
:arrow_up:

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


Make ssh ACLs go in the PID chain

Since SSH PU chains are like Linux processes we are moving them to the Pid chain . The host chain is always last and it will get any packets that do not match any other chain.

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1129",
    "commit-sha": "564fb4408bec8f5751243c6d93da1dc5477fd100"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "779",
    "commit-sha": "fdca49a2542c59b8ba55c79b3bb9403356b83403"
  }
]

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1129",
    "commit-sha": "564fb4408bec8f5751243c6d93da1dc5477fd100"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "779",
    "commit-sha": "fdca49a2542c59b8ba55c79b3bb9403356b83403"
  }
]


PHP pre-processing in JS files

It's not weird to see PHP used inside js files, for global vars (defined
in PHP), translations strings, and so on.

Right now minify only reads the file as lines, append them, minify them
and output them. For the PHP embedded in JS files we need to preprocess
the JS file as a PHP file, before we minify and all the stuff.

For this, in the function "combine($minify = true)":

    foreach($this->files as $file) {
      if ($this->type === self::TYPE_CSS && MINIFY_REWRITE_CSS_URLS) {
        // Rewrite relative CSS URLs.
        $combined[] = self::rewriteCSSUrls(file_get_contents($file),
            dirname($file));
      } else if ($this->type === self::TYPE_JS) {
        ob_start();                    // Start output buffering
        include($file);                // Include the file
        $contents = ob_get_contents(); // Get the contents of the buffer
        ob_end_clean();                // End buffering and discard
        $combined[] = $contents;
      } else {
        $combined[] = file_get_contents($file);
      }
    }

Cheers,
Victor
http://beer2beer.com

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 22 Jul 2007 at 11:37

If you're preprocessing your JS files with PHP, then the best solution would be
to
turn on output buffering at the top of the file, then use JSMin to minify the
contents of the processed buffer and send that to the browser. I don't plan to
add
PHP preprocessing functionality to Minify.

Original comment by<EMAIL_ADDRESS>on 28 Aug 2007 at 5:21

Changed state: WontFix

This can be done in 2.x verions by using a custom Minify_Source object instead
of a
file path, e.g. in /min/groupsConfig.php. For performance you'd need to provide
a
last modified time (or emulate one).

Ask the google group how to get this working.

Original comment by<EMAIL_ADDRESS>on 27 Nov 2008 at 3:23

Changed state: Fixed


fix(render.js): zoom handler event affects animations

PR Checklist
Please check all that apply to this PR using "x":

[X] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[X] I have checked that this PR does not introduce a breaking change
[ ] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type
What kind of change does this PR introduce?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes)
[ ] Documentation changes
[ ] Other - Please describe:

Fixes
Issue Number: https://github.com/btzr-io/Villain/issues/66
What is the current behavior?
The zoom handler function makes the zoom animations choppy and slow.
What is the new behavior?
The zoom handler function animates smoothly the same way as using mouse wheel
Other information
It was just a problem with passing immediately = true parameter to OpenSeaDragon library.

@Brostafa This occurs when you use the wheel mouse (scroll on canvas)
This is the commit that created this issue maybe you could take a look: https://github.com/btzr-io/Villain/commit/a388079a94896b140544f3db19a3e11e573bddf8

@btzr-io After some profiling I found the issue was with when setting state on every zoom event
https://github.com/btzr-io/Villain/commit/a388079a94896b140544f3db19a3e11e573bddf8#diff-9d13ed777fc203aef753b28ab30f44efR153 so I have added a debounce to reduce setState invocations and when I re-ran profiling after adding debounce it seems to have become a little bit smoother. Please double-check from your side.

@Brostafa That's what I think, but it was working fine even when the state was changed on every zoom, try it without this lines on osd.config:
// Animations
  springStiffness: 12,
  springStiffness: 12,

@Brostafa I created a similar solution:
    let isScrolling = false
    let handleStopScrolling = null

    this.viewer.addHandler('canvas-scroll', event => {
      // Reset scrolling flag
      isScrolling = true
      // Clear our timeout throughout the scroll
      window.clearTimeout(handleStopScrolling)
      // Set a timeout to run after scrolling ends
      handleStopScrolling = setTimeout(() => {
        this.updateZoom()
        isScrolling = false;
      },  750);
    })

    this.viewer.addHandler('zoom', ({zoom}) => {
      // Unable to update zoom on scroll inside this event handler:
      // Bad peformance from multiple context update state calls
      if(!isScrolling) {
        this.updateZoom(zoom)
      }
    })

See: https://github.com/btzr-io/Villain/issues/66#issuecomment-544220050

@Brostafa I dont see this issue on chrome / brave / electron, only on firefox

@Brostafa I created a patch for firefox (at keast works on my pc) but this issue require more testing and optimizations, here https://github.com/btzr-io/Villain/commit/dd9cf57d17893ed9887447dab96f73a3eb059989
If you think you can improve something in that commit  or look in to another issue let me know, I'll close this for now, thanks again for all you help :v:

@btzr-io I couldn't get Firefox on Arch Linux (having dependency hell from doing manual partial updates). Anyway, I booted up Windows to test on Firefox. And I can confirm your commit did improve Firefox performance but didn't improve it for Chrome, that's definitely a step forward either way. I also tested with debounce and that did improve both Firefox and Chrome. If you have time try playing around with debouncing.

but not so much for Chrome

May I know why you specifically apply optimization for firefox only?

 // This can run smooth on chromium based browsers (chrome, brave, electon)

I have seen that comment but does that mean the optimization doesn't play well with chromium based browsers?
https://github.com/btzr-io/Villain/commit/dd9cf57d17893ed9887447dab96f73a3eb059989#diff-9d13ed777fc203aef753b28ab30f44efR206-R215

@Brostafa I only see this issue on firefox (linux) does it behaves similar on chrome`( windows / linux )?

My only concern about this new fix is the small delay on the text update caused by the debouncer, feels kind of odd. Thats why I didnt implemented on all browsers.
I'm still trying to find a way to update the  current-zoom text  without a noticeable dalay

@Brostafa We dont need the debounce function when the zoom is not animated ( triggered by buttons or text input).
Perhaps we should be more consistent whit animations and enable them on button and input triggers ? Feel free to open an issue about this if you have the time ( any other idea / bug )

@btzr-io Yes, Chrome has little bit of hiccups on Windows. However, when applying your solution (removing it from firefox-only block), Chrome becomes smooth too. Check this video (it doesn't have audio) https://www.loom.com/share/3655f1849f0b4fa29c4ac667cb35579e but again the hiccups are quite small (not that noticable). It may also not be that visible on video as it wasn't recording on a high FPS-rate but if you have Windows laying around you may feel it.

Nice thanks for testing, would you like to sent a pr with those changes?

Nice thanks for testing, would you like to sent a pr with those changes?

I am uncertain because your points here:

My only concern about this new fix is the small delay on the text update caused by the debouncer, feels kind of odd. Thats why I didnt implemented on all browsers.

I'm still trying to find a way to update the current-zoom text without a noticeable dalay

are valid and I am not sure of a way to address them. So, I will agree with how you solved the issue for Firefox, if someone complained later we can know how to solve the smooth problem or maybe OpenSeaDragon themselves will make internal optimizations that we don't have to worry about this anymore

@Brostafa I think for now is ok, maybe I'll also add this fall back for mobile browsers.
Thanks again :v:

Perhaps we should be more consistent whit animations and enable them on button and input triggers ? Feel free to open an issue about this if you have the time ( any other idea / bug )
I agree with this. I think too it should animate on button click (not sure if it's worth making PR tho as its changing immediate: true param in 2 lines 😄)

@Brostafa I think for now is ok, maybe I'll also add this fall back for mobile browsers.

Brilliant!

For zooming with click now is doubleClick https://github.com/btzr-io/Villain/commit/53c7aefd853a870756ea913526f283cfde5fccc6


raise ValueError("Sampling rate is expected to be 8kHz!")

I use the clean_trainset_28spk_wav.zip (2.315Gb)
take error "Sampling rate is expected to be 8kHz!"

have you solved it?

have you solved it?

Hello, please preprocess your dataset to downsample the audio to 8 KHz.

thanks, i'll tyr again!
------------------ 原始邮件 ------------------
发件人:                                                                                "Zhenzi-Weng/DeepSC-S"                                                                                @.>;
发送时间: 2023年5月1日(星期一) 凌晨5:24
@.>;
<EMAIL_ADDRESS>主题: Re: [Zhenzi-Weng/DeepSC-S] raise ValueError("Sampling rate is expected to be 8kHz!") (Issue #1)
have you solved it?
Hello, please preprocess your dataset to downsample the audio to 8 KHz.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

Hello author, I preprocessed my dataset to downsample 8KHz. But it still appears the errors "check the size of wav_data".
How to fix or check this data?

@ccu1tn Hello. When reading a .wav file by wavfile.read, it should return a vector with only one dimension if the audio signals are stored in this .wav file as one-channel format. I constrained the .wav files for training and testing as one-channel format. So, if your .wav files are in other formats, please convert them to one-channel format or revise my code accordingly.


Not showing all Images

I have the problem that on a page I am using this by getting the hashtag, not all the tagged images are shown, if I search on Instagram there are 57images but Instafeed only shows 19.

i'm trying today and i can't make it work the tagged pictures... even copying just the example on the page of the instafeed.js... so i think is almost the same problem!

I solved the "Problem" it was not any Problem with the Plugin, but with the Account Holder (my Client) having his own personal Account as Private, so the Pictures won't show. It can only show public images.
@gilbertobitt Check the pictures you get on your page via instafeed with the images you get if your are NOT logged into Instagram, maybe you had the same misconception

alright.. i will try... but i already logged in! u want see my code?

```

@gilbertobitt
Just for the sakes, put the Script after the container and your are missing jQuery befor the instaffed.min.js , if it still isn't working, just answer me here, and I'll send you an E-Mail and we can go step by  step. Because we are really going offtopic here.


SA1636: misfires on generated code for ProjName.NETCore.AssemblyInfo.cs

In StyleCop.Analyzers 1.0.2, .NET Core projects (from VS2017 15.3 Preview) produce the following warning:

C:\git\PCLCrypto\obj\PCLCrypto.Tests.NETCore\Debug\netcoreapp1.0\PCLCrypto.Tests.NETCore.AssemblyInfo.cs(1,1): warning SA1636: The file header copyright text must match the copyright text from the settings. [C:\git\PCLCrypto\src\PCLCrypto.Tests.NETCore\PCLCrypto.Tests.NETCore.csproj]

The file in question has this content:
// Generated by the MSBuild WriteCodeFragment class.

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("PCLCrypto.Tests.NETCore")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")]
[assembly: System.Reflection.AssemblyProductAttribute("PCLCrypto.Tests.NETCore")]
[assembly: System.Reflection.AssemblyTitleAttribute("PCLCrypto.Tests.NETCore")]

Notice the header is a "generated" header but not one that likely fits the mold that the analyzers know to skip.

This is caused by Microsoft/msbuild#1925; the behavior of StyleCop Analyzers with respect to the file's current content is by design.
Closing as a duplicate of #2314.


Update main.tf

Sorry, PR against fork source by mistake.

Sorry, PR against fork source by mistake.


[BUG] Can't get token to connect to Azure Storage in GovCloud from Visual Studio

Library name and version
Azure.Storage.Blobs 12.20.0
Describe the bug
I'm getting the following error from my code when trying to connect to AzureStorage in GovCloud from my code running in Visual Studio:
Process "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\Asal\TokenService\Microsoft.Asal.TokenService.exe" has failed with unexpected error: TS003: Error, TS004: Unable to get access token.  'Consent between first party application '04f0c124-f2bc-4f59-8241-bf6df9866bbd' and first party resource 'e406a681-f3d4-42a8-90b6-c2b029497af1' must be configured via preauthorization - applications owned and operated by Microsoft must get approval from the API owner before requesting tokens for that API. Trace ID: de05378f-ca89-49b3-9aef-b54cffd71c00 Correlation ID: 097136c6-39ef-4ab4-ae42-e3a28a1256a8 Timestamp: 2024-06-18 15:30:03Z
For potential mitigation and additional information go to the following url: 'https://aka.ms/vspreautherror''
Note that I am connecting to azure storage in Azure Government.
Expected behavior
I am able to connect to Blob Storage in Visual Studio using the same code deployed into Azure.
Actual behavior
Code successfully authenticates and downloads file in Azure Deployment, but gives the above error when trying to run locally in Visual Studio.
Reproduction Steps
I've configured my AzureGov account on the AzureServiceAuthentication screen.
This is the code that's currently failing:
Uri uri = new Uri("");
credOptions.AuthorityHost = AzureAuthorityHosts.AzureGovernment;
var credential = new DefaultAzureCredential(credOptions);  <--- I can see it's using the right TenantID in VisualStudioCredential
BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(containername);
var blobClient = containerClient.GetBlobClient(blobname);
            BlobDownloadResult blobDownloadResult = await blobClient.DownloadContentAsync();  <-- this is where the exception is thrown

Environment
.NET SDK:
Version:           8.0.300
Commit:            326f6e68b2
Workload version:  8.0.300-manifests.5273bb1c
MSBuild version:   17.10.4+10fbfbf2e
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.22631
OS Platform: Windows
RID:         win-x64
Base Path:   C:\Program Files\dotnet\sdk\8.0.300\
Host:
Version:      8.0.5
Architecture: x64
Commit:       087e15321b
.NET SDKs installed:
8.0.300 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86   [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Visual Studio:
Microsoft Visual Studio Enterprise 2022
Version 17.10.2
VisualStudio.17.Release/17.10.2+35004.147
Microsoft .NET Framework
Version 4.8.09032

hi @mpeckatwork
This is something that Visual Studio can resolve via updating its first party pre-authorizations. Please report this via the instructions mentioned here and include the details of the AADSTS65002 error via the reporting link mentioned in the link above.


strings: add spacing after "Uploaded by:" in French

Description (required)
Fixes #2558
What changes did you make and why?
Added spacing between "Uploaded by:" and the name of the user
Tests performed (required)
Tested prodDebug on Samsung S6 with API level 23.
Screenshots showing what changed (optional - for UI changes)

Codecov Report

Merging #2568 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #2568   +/-   ##
======================================
  Coverage    5.89%   5.89%
======================================
  Files         258     258
  Lines       12310   12310
  Branches     1110    1110
======================================
  Hits          726     726
  Misses      11525   11525
  Partials       59      59

Continue to review full report at Codecov.

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


Redirect more worldwide priority pages

This is the same data migration as<PHONE_NUMBER>0057, just with the name
of the CSV changed and an updated timestamp so we can run it again.
I would have made this into a Rake task, to avoid duplicating all of this,
but this should be the last of the world priorities we have to redirect.
Tested this in dev and it works OK.
Trello:
https://trello.com/c/jJIyhtm8/79-more-worldwide-priority-redirects.

(For more context, see the explanation on #2286.)

:+1:


Horizontal operator doesn't stretch in table in NativeMML output in FF

In NativeMML output in Firefox,
\begin{array}{c}
  \mmlToken{mo}[stretchy="true"]{_}\\
  \Rule{2em}{.5em}{0em}
\end{array}

should have the underline stretch to the width of the rule in the second row, but it doesn't.

Closing this as won't fix.


Fixes #806. Button now support clicks.

Thanks for fixing this.
We really need more unit tests to catch mistakes like this.

Thanks for fixing this.
We really need more unit tests to catch mistakes like this.

It's was triggering the event again ;-)


Add more test cases

Add cases from https://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists and https://docs.python.org/3/tutorial/controlflow.html#special-parameters

merged some tests via https://github.com/polystat/py2eo/pull/194


Information Theoretic Methods

Hi Adam,
I have 500 examples, continues outcome ( above and below 0) and 33000 features. I would like to use feast,... for finding the most informative features. As far as I know, I have to discretise the outcome. Can you please advise how I should that? Also do you aware of any information theoretic packages that can deal with the continues outcome?
Please see some of numbers in the list for the outcome.
0.55228076
-0.3197724
0.58774863
-0.5174945
-0.173138
1.27375815
0.78408593
0.74372201
-1.3886196
0.43545769
-0.0689654
0.18626918
1.8202002
0.10355088
-0.0560193
0.29268956
-0.4401979
1.61399178
-0.704535
0.00430693
1.41157343
-0.0646488
-1.4474665
0.4307273
0.44970806
-0.3885697
1.10758465
-0.1339137
0.12522725
-0.3379575
-1.099666
0.31524279
-0.7666343
0.22144974
-0.8017797
-1.1909404
-0.7958541
-1.5830851
1.03128861
-1.0312886
-1.736507
0.77242535
1.06106625
0.95375794
-0.8626751
-0.4025419
-0.1078819
0.71006597
0.5422753
-2.2562499
-1.3238074
-1.919012
1.24519952
-0.4930275
0.47848871
1.21762188
-0.6239719
1.42333462
-0.0086139
0.89435119
-1.698852
1.77679865
-0.038772
-0.2569066
0.28371043
-0.360848
-0.2658198
0.8440787
-0.9812682
0.67719571
0.31977237
-2.0077154
0.48332361
0.70453501
0.52242483
-0.9537579
-0.8197281
-1.2835121
-0.5076713
0.35625516
0.03015302
0.05601926
-0.1994326
1.13176806
-2.3148972
1.3886196
0.5724601
-1.8925387
-1.1822326
-0.2926896
0.37467286
-0.6610331
-0.2971879
-1.3555018
-1.5536207
0.73805488
-0.3746729
-0.6031758
-0.6935372
1.43529606
1.48532767
0.629213
0.19943255
-0.7211937
-1.068659
-0.4165933
0.01292112
1.26412388
-0.9335899
0.22586574
-2.2044686
-0.6450414
-0.5724601
1.00954199
0.05170609
-1.0840322
-0.5027781
-0.7782424
-0.2258657
-0.5623418
-0.1644006
-0.7156187
-0.8879448
-0.2792295
-0.0776024
-0.4544784
-0.8137162
0.93358993
0.73241136
1.89253869
-1.366375
-1.472472
0.15131773
-0.6135407
-0.1165502
0.80177968
0.92695117
1.71737513
0.77824241
-1.4853277
-0.2347111
-0.5522808
0.85644338
0.09922176
-0.5573042
-1.1566322
0.34252111
0.37005675
1.51180219
-1.5118022
0.02153627
0.37929696
1.28351212
-0.0948945
-0.7551286
1.59834762
0.14696264
-0.4784887
1.56818275
0.60317579
0.82576977
1.05353422
0.33795753
0.83184174
-2.702943
-0.3107197
0.72679107
1.40000431
-0.379297
-0.2702843
-0.4307273
1.18223265
0.3516698
1.13997784
1.73650701
0.60835006
1.47247197
0.03446219
1.55362072
-0.5224248
1.06865897
2.46384107
0.38856968
-0.333401
0.18188866
2.31489724
-0.3654485
-0.5422753
1.36637495
-0.112215
-0.3152428
0.42600652
-0.1426103
0.94027009
-0.7899563
-0.5472712
0.39787592
1.25460554
-1.3135329
0.42129522
0.12088759
0.86267505
0.99530565
-1.4233346
0.97432155
0.19065327
0.26581978
-0.6664013
-2.158
0.9007945
0.0776024
-0.3016924
-1.9763958
0.27475411
1.08403222
0.81972809
0.23028616
2.00771543
1.33422361
0.55730423
-0.9402701
0.76086887
-0.6083501
0.14261033
-0.4354577
1.6634623
-1.009542
-0.473665
-0.6880696
0.34709182
-1.6634623
0.65035348
-0.3562552
0.92035301
0.85024479
-0.6717887
1.04606148
-0.4978969
0.4544784
-1.680894
-2.1157713
-0.1469626
1.94690278
-2.041138
0.49789692
-1.1650809
0.11655021
-1.1317681
1.03864671
-1.6300412
2.15799996
1.16508088
0.30169235
0.23471108
-2.5652793
0.01722854
-2.382787
0.46885224
-0.8318417
0.038772
2.92573583
0.41659325
0.41190048
0.58263735
-0.2747541
-1.6139918
-0.1687677
-0.0430825
0.78995634
0.40721675
-1.0918158
-1.1236339
-1.2176219
0.25690662
-1.5393809
-0.030153
-1.7562965
1.52544651
-0.9882626
-1.3774121
0.83794453
-0.6771957
0.24801382
-1.4115734
0.27028425
-1.7767986
0.56739369
-2.0770094
-1.2546055
-1.7173751
-0.9007945
-0.2126306
-0.1818887
-1.0763138
-0.3470918
-0.2038279
-1.2086323
0.07328321
0.20822723
-0.8564434
1.09966602
0.96742157
1.97639581
-0.2837104
-0.920353
0.71561873
1.91901198
Thanks
Fari

MIToolbox operates on discrete inputs so you will need to discretise them before using it, otherwise it will apply a standard discretisation which probably doesn't do what you want. In the past we've used 10 bins of equal width in the range (min, max) and that has tended to work reasonably well.
I believe scikit-learn has a continuous/discrete mutual information calculation, or there are packages like ITE (https://bitbucket.org/szzoli/ite-in-python/src/master/) which provide many different estimators for the mutual information.

Thanks Adam
Can you please elaborate more about 10 bins of equal width in the range (min, max) for the outcome? Is there any other approach that we can map the continuous output to the classification task?
Thanks
Fari

There are many different binning algorithms. Equal frequency binning (where the bin widths are set to ensure each bin has the same number of elements in it) interacts oddly with information theoretic feature selection, as it makes each feature maximum entropy. We used equal width binning in our papers on feature selection and it worked well. You can also set the bins based on mean & std dev if you think the variable is approximately gaussian distributed, or use some meaningful bins if you have domain knowledge about the feature values.

Multi-class is fine.


Filter Sensor RANGE:   output allways integer

Home Assistant release with the issue:

0.97.0
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):

hassio in VM
Component/platform:

(https://www.home-assistant.io/components/filter/)
Description of problem:
the output (state) of a range filter sensor ist allways shown as an integer, even if the source entity delivers floats
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
 - platform: mqtt
    state_topic: 'test/terrasse'
    name: 'Hell_T'
    unit_of_measurement: 'lux'
    value_template: '{{ value_json.LUX }}'

  - platform: filter
    name: "Hell_T_fi"
    entity_id: sensor.hell_t
    filters:
      - filter: range
        lower_bound: 0.0
        upper_bound: 6000.0

Traceback (if applicable):

Additional information:
It doesn't look like environment dependent

Could you please try and add the argument precision ?

I tried that already, but precision is not allowed for range filter
 - platform: filter
    name: "T_Terr_f"
    entity_id: sensor.t_terrasse
    filters:
      - filter: range
        lower_bound: 21.0
        upper_bound: 30.0
        precision: 2

Error message:
invalid config for [sensor.filter]: extra keys not allowed @ data['filters'][0]['lower_bound']. Got 21.0
extra keys not allowed @ data['filters'][0]['upper_bound']. Got 30.0
not a valid value for dictionary value @ data['filters'][0]['filter']. Got 'range'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.filter/

acidentially closed  sorry

you would need to use the patch I just submitted :)
Hopefully it will fix this issue

I don't know how to apply the patch in the hassio docker environment, so I have to wait for the next release.
Thanks for taking care.


Fixes #1611 - Move validate different fields in GET requests to Entit…

…yResourceTest
Describe your changes :

See #1611 for more details

Type of change :

[] Bug fix
[x] Improvement
[] New feature
[] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[] Documentation

Checklist:

[x] I have read the CONTRIBUTING document.
[x] I have performed a self-review of my own.
[x] I have tagged my reviewers below.
[x] I have commented on my code, particularly in hard-to-understand areas.
[x] My changes generate no new warnings.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] All new and existing tests passed.

Reviewers

@harshach

Nice catch there, thanks @sureshms


Improved announcements page

Contact us used in this is not centre aligned.it's manually done.

@himanshusharma89 @anushbhatia
I am already working on the above issues.
I have mentioned in it #199

Improved Card effects and improved some UI.


Test: azion cli

An action has been created that runs the CLI with a bash script. This script checks that the build flow is executed without errors. If an error occurs, our CLI channel is notified with the status code and the corresponding error output.

action azioncli
test build flow with vulcan
notify the slack channel

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Create a hook for catch windows's loading

There are some situations where I want to get the loading status of the window, like a simple hook. Compose didn't provide such a function.
Current windows api below
@Composable
fun Window(
    onCloseRequest: () -> Unit,
    state: WindowState = rememberWindowState(),
    visible: Boolean = true,
    title: String = "Untitled",
    icon: Painter? = null,
    undecorated: Boolean = false,
    transparent: Boolean = false,
    resizable: Boolean = true,
    enabled: Boolean = true,
    focusable: Boolean = true,
    alwaysOnTop: Boolean = false,
    onPreviewKeyEvent: (KeyEvent) -> Boolean = { false },
    onKeyEvent: (KeyEvent) -> Boolean = { false },
    content: @Composable FrameWindowScope.() -> Unit
) {
    val currentState by rememberUpdatedState(state)
    val currentTitle by rememberUpdatedState(title)
    val currentIcon by rememberUpdatedState(icon)
    val currentUndecorated by rememberUpdatedState(undecorated)
    val currentTransparent by rememberUpdatedState(transparent)
    val currentResizable by rememberUpdatedState(resizable)
    val currentEnabled by rememberUpdatedState(enabled)
    val currentFocusable by rememberUpdatedState(focusable)
    val currentAlwaysOnTop by rememberUpdatedState(alwaysOnTop)
    val currentOnCloseRequest by rememberUpdatedState(onCloseRequest)

    val updater = remember(::ComponentUpdater)

    // the state applied to the window. exist to avoid races between WindowState changes and the state stored inside the native window
    val appliedState = remember {
        object {
            var size: DpSize? = null
            var position: WindowPosition? = null
            var placement: WindowPlacement? = null
            var isMinimized: Boolean? = null
        }
    }

    Window(
        visible = visible,
        onPreviewKeyEvent = onPreviewKeyEvent,
        onKeyEvent = onKeyEvent,
        create = {
            ComposeWindow().apply {
                // close state is controlled by WindowState.isOpen
                defaultCloseOperation = JFrame.DO_NOTHING_ON_CLOSE
                addWindowListener(object : WindowAdapter() {
                    override fun windowClosing(e: WindowEvent) {
                        currentOnCloseRequest()
                    }
                })
                addWindowStateListener {
                    currentState.placement = placement
                    currentState.isMinimized = isMinimized
                    appliedState.placement = currentState.placement
                    appliedState.isMinimized = currentState.isMinimized
                }
                addComponentListener(object : ComponentAdapter() {
                    override fun componentResized(e: ComponentEvent) {
                        // we check placement here and in windowStateChanged,
                        // because fullscreen changing doesn't
                        // fire windowStateChanged, only componentResized
                        currentState.placement = placement
                        currentState.size = DpSize(width.dp, height.dp)
                        appliedState.placement = currentState.placement
                        appliedState.size = currentState.size
                    }

                    override fun componentMoved(e: ComponentEvent) {
                        currentState.position = WindowPosition(x.dp, y.dp)
                        appliedState.position = currentState.position
                    }
                })
            }
        },
        dispose = ComposeWindow::dispose,
        update = { window ->
            updater.update {
                set(currentTitle, window::setTitle)
                set(currentIcon, window::setIcon)
                set(currentUndecorated, window::setUndecoratedSafely)
                set(currentTransparent, window::isTransparent::set)
                set(currentResizable, window::setResizable)
                set(currentEnabled, window::setEnabled)
                set(currentFocusable, window::setFocusable)
                set(currentAlwaysOnTop, window::setAlwaysOnTop)
            }
            if (state.size != appliedState.size) {
                window.setSizeSafely(state.size)
                appliedState.size = state.size
            }
            if (state.position != appliedState.position) {
                window.setPositionSafely(state.position)
                appliedState.position = state.position
            }
            if (state.placement != appliedState.placement) {
                window.placement = state.placement
                appliedState.placement = state.placement
            }
            if (state.isMinimized != appliedState.isMinimized) {
                window.isMinimized = state.isMinimized
                appliedState.isMinimized = state.isMinimized
            }
        },
        content = content
    )
}

We can simple do this by add onLoaded()
@Composable
fun Window(
    onLoaded:() -> Unit,
    onCloseRequest: () -> Unit,
    state: WindowState = rememberWindowState(),
    visible: Boolean = true,
    title: String = "Untitled",
    icon: Painter? = null,
    undecorated: Boolean = false,
    transparent: Boolean = false,
    resizable: Boolean = true,
    enabled: Boolean = true,
    focusable: Boolean = true,
    alwaysOnTop: Boolean = false,
    onPreviewKeyEvent: (KeyEvent) -> Boolean = { false },
    onKeyEvent: (KeyEvent) -> Boolean = { false },
    content: @Composable FrameWindowScope.() -> Unit
) {
    val currentState by rememberUpdatedState(state)
    val currentTitle by rememberUpdatedState(title)
    val currentIcon by rememberUpdatedState(icon)
    val currentUndecorated by rememberUpdatedState(undecorated)
    val currentTransparent by rememberUpdatedState(transparent)
    val currentResizable by rememberUpdatedState(resizable)
    val currentEnabled by rememberUpdatedState(enabled)
    val currentFocusable by rememberUpdatedState(focusable)
    val currentAlwaysOnTop by rememberUpdatedState(alwaysOnTop)
    val currentOnCloseRequest by rememberUpdatedState(onCloseRequest)
    val currentOnLoaded by rememberUpdatedState(onLoaded)

    val updater = remember(::ComponentUpdater)

    // the state applied to the window. exist to avoid races between WindowState changes and the state stored inside the native window
    val appliedState = remember {
        object {
            var size: DpSize? = null
            var position: WindowPosition? = null
            var placement: WindowPlacement? = null
            var isMinimized: Boolean? = null
        }
    }

    Window(
        visible = visible,
        onPreviewKeyEvent = onPreviewKeyEvent,
        onKeyEvent = onKeyEvent,
        create = {
            ComposeWindow().apply {
                // close state is controlled by WindowState.isOpen
                defaultCloseOperation = JFrame.DO_NOTHING_ON_CLOSE
                addWindowListener(object : WindowAdapter() {
                    override fun windowOpened(e: WindowEvent?) {
                        currentOnLoaded()
                    }

                    override fun windowClosing(e: WindowEvent) {
                        currentOnCloseRequest()
                    }
                })
                addWindowStateListener {
                    currentState.placement = placement
                    currentState.isMinimized = isMinimized
                    appliedState.placement = currentState.placement
                    appliedState.isMinimized = currentState.isMinimized
                }
                addComponentListener(object : ComponentAdapter() {
                    override fun componentResized(e: ComponentEvent) {
                        // we check placement here and in windowStateChanged,
                        // because fullscreen changing doesn't
                        // fire windowStateChanged, only componentResized
                        currentState.placement = placement
                        currentState.size = DpSize(width.dp, height.dp)
                        appliedState.placement = currentState.placement
                        appliedState.size = currentState.size
                    }

                    override fun componentMoved(e: ComponentEvent) {
                        currentState.position = WindowPosition(x.dp, y.dp)
                        appliedState.position = currentState.position
                    }
                })
            }
        },
        dispose = ComposeWindow::dispose,
        update = { window ->
            updater.update {
                set(currentTitle, window::setTitle)
                set(currentIcon, window::setIcon)
                set(currentUndecorated, window::setUndecoratedSafely)
                set(currentTransparent, window::isTransparent::set)
                set(currentResizable, window::setResizable)
                set(currentEnabled, window::setEnabled)
                set(currentFocusable, window::setFocusable)
                set(currentAlwaysOnTop, window::setAlwaysOnTop)
            }
            if (state.size != appliedState.size) {
                window.setSizeSafely(state.size)
                appliedState.size = state.size
            }
            if (state.position != appliedState.position) {
                window.setPositionSafely(state.position)
                appliedState.position = state.position
            }
            if (state.placement != appliedState.placement) {
                window.placement = state.placement
                appliedState.placement = state.placement
            }
            if (state.isMinimized != appliedState.isMinimized) {
                window.isMinimized = state.isMinimized
                appliedState.isMinimized = state.isMinimized
            }
        },
        content = content
    )
}

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


CTEs return different column names with different backends

final tests = <String, String>{
  'select id from t1' : 'id',
  'select t1.id from t1' : 'id',
  'select id as "t1.id" from t1' : 't1.id',
  'select t1.id as "t1.id" from t1' : 't1.id',
  'with cte as (select * from t1) select id from cte' : 'id',
  'with cte as (select * from t1) select cte.id from cte' : 'id',
  'with cte as (select * from t1) select id as "cte.id" from cte' : 'cte.id',
  'with cte as (select * from t1) select cte.id as "cte.id" from cte' : 'cte.id',
};
await _db.customStatement('drop table if exists t1');
await _db.customStatement('create table t1(id int not null primary key)');
await _db.customInsert('insert into t1 values (1)');
for (final query in tests.keys) {
  final column = await _db.customSelectQuery(query).map((row) => row.data.keys.single).getSingle();
  if (column != tests[query]) print('$query returns $column. Expected ${tests[query]}');
}

Using moor_ffi this prints nothing, but using moor_flutter on my Android emulator it prints: with cte as (select * from t1) select cte.id from cte returns cte.id. Expected id. Haven't tried on iOS yet.
I'm not sure how much moor could do about this since it's at the mercy of the platform's sqlite API, but I figured I'd raise an issue in case anyone else runs into this. Unless you're using moor_ffi, I'd suggest aliasing explicitly with AS.

this seems suspect

I wonder where that comes from though (I can't view https://issuetracker.google.com/issues/903852). It looks like they don't change anything all the way down to calling sqlite3_column_name here. Sqlite provides compile-time options to change the default column names, but they don't use those either (set here).
Maybe this is just due to different sqlite versions, but a change that breaking would surprise me.

The name of a result column is the value of the "AS" clause for that column, if there is an AS clause. If there is no AS clause then the name of the column is unspecified and may change from one release of SQLite to the next.

https://www.sqlite.org/c3ref/column_name.html
TIL!


adds command line argument support as described in

https://github.com/WolfgangFahl/appbundler-plugin

This issue will be fixed with #11. Thanks you for your contribution.

Sorry this is greek to me. Git's user interface stays mostly an enigma to me.


Add Edit Profile Feature

Add a page for viewing profile once logged in
Add an edit capability - for users to change profile values
This was requested by user Martin per comment:
http://michaelsoriano.com/building-a-user-registration-system-part-1-new-user-form/#comment-73589

Not Found
The requested URL was not found on this server.
Apache/2.4.46 (Win64) OpenSSL/1.1.1g PHP/7.2.34 Server at localhost Port 80
i have getting error when i run http://localhost/user-registration-codeigniter-master/main/login/


Feat-transient-base-ingestor

Mint Ingestor: Transient
Functionality Supported

Ingesting from URL: Yes
Ingesting from Contract address: Yes
Supported Networks: Base

Before you submit

[x] Ensure your generated MintTemplate works 😄
[x] Ensure that your code is restricted to a single folder in src/ingestors
[x] Ensure that all required assets are included (e.g. ABIs)
[x] Ensure ABIs are trimmed to include only methods (1) used in the ingestor or (2) required to mint
[x] Ensure that all exported methods are prefixed with the name of your ingestor e.g. myMintingPlatformGetContractDetails
[x] Ensure that a test exists for generating a MintTemplate that will always succeed
[x] Ensure that your code accesses no external resources except those passed in the resources object

fix #8

Hello @christinehall
I was able to add an ingestor for the transient network.
I noticed the mint contract was different from the nft contract too

Thank you for this submission!! 🥳 🙏
We've gotten a little behind on reviewing these, but will be spending some time over the next 48 hours, so look out for some feedback soon! Thank you! 🙏

@chrismaddern I have made the necessary corrections, should be good now

Hi @Myestery
Are you able to run the tests locally?
If you:

Add an ALCHEMY_API_KEY var in your local .env
Run yarn test

I've also just added support for simulating transactions to the tests basicIngestorTests
Can you merge the floornfts/mobile-minting branch into yours? There are several failing manual tests already, but this also indicates that the constructed payload does not execute successfully onchain:

Let me know if you have any questions, otherwise, making the tests pass is the right next step 😊

Thanks for fixing the tests,
I'll run them now

I actually have some trouble running the test
I still get ts errors after merging main branch

All local machines and CI seem to be building it okay which is odd - I'm not 100% sure what the problem is:
Setup

MacOS Sonoma
Node 20.9.0 (we could probably use a node version lock file in the repo actually)
The rest of the deps should be pinned in yarn.lock (I assume you used yarn install?)

All local machines and CI seem to be building it okay which is odd - I'm not 100% sure what the problem is:
Setup

MacOS Sonoma
Node 20.9.0 (we could probably use a node version lock file in the repo actually)
The rest of the deps should be pinned in yarn.lock (I assume you used yarn install?)

Do you have any global TS config that could be applying?
Ah, if you're having a hard time running yarn install, you may want to try removing the .npmrc file locally -- that's designed for building and distribution, but can interact with yarn install too.
git update-index --assume-unchanged .npmrc
rm .npmrc

This will remove it locally, while preventing that change from being pushed to git

I finally got it to work using node 20

@chrismaddern The tests are passing now
I noticed switching the simulate env made my tests pass but some of fxhash to fail

Amazing! Seeing the same thing on my end!!!

Nice work... I'll wait for the final types (they're just different minter addresses, hopefully?)  and then we can get this in and unlock the bounty!! 🥳 🚀

All done @chrismaddern

I added more tests to ensure the other contract types are working and fixed some minor flaws with the ingestor.
I think its completed !

Amazing!
Could you add example URLs for each to the successUrls for the basicIngestorTests?
Currently only the one URL is being simulated in tests:

Also, you can run simulations during testing locally by adding the following to your .env:
SIMULATE_DURING_TESTS=true

When I do this locally:
basicIngestorTests(new TransientIngestor(), resources, {
    successUrls: [
      'https://www.transient.xyz/stacks/kansas-smile',
      'https://www.transient.xyz/stacks/volumina-8',
      'https://www.transient.xyz/stacks/16384',
    ],

If you need to fix the blockHash at which the tests run the simulation you can do so here:
https://github.com/floornfts/mobile-minting/blob/main/test/ingestors/prohibition-daily.test.ts#L27
Note that all test cases currently need to be able to simulate successfully at the same blockhash (i.e. have been live & available at the same time)

Amazing!
Could you add example URLs for each to the successUrls for the basicIngestorTests?
Currently only the one URL is being simulated in tests:
Also, you can run simulations during testing locally by adding the following to your .env:
SIMULATE_DURING_TESTS=true

When I do this locally:
basicIngestorTests(new TransientIngestor(), resources, {
    successUrls: [
      'https://www.transient.xyz/stacks/kansas-smile',
      'https://www.transient.xyz/stacks/volumina-8',
      'https://www.transient.xyz/stacks/16384',
    ],

If you need to fix the blockHash at which the tests run the simulation you can do so here: https://github.com/floornfts/mobile-minting/blob/main/test/ingestors/prohibition-daily.test.ts#L27
Note that all test cases currently need to be able to simulate successfully at the same blockhash (i.e. have been live & available at the same time)

I fixed the tests, I noticed a slight change with the ABI for ERC721TL and ERC7160TL contracts

All done 💯

Huzzah! Will review for merge.
Meanwhile, I'll DM you on the Twitter profile on your Github page with follow up for the bounty 🙂

@Myestery did you get the DM? 👀

@Myestery did you get the DM? 👀

yes, seen now

@Myestery did you get the DM? 👀

yes, seen now

Filled.
Thanks

Hey @chrismaddern
I noticed the test failed recently and I did some investigation
I found out that they could close the nft sale before the public sale date ended
that was the issue for kansas-smile

Hey @chrismaddern I noticed the test failed recently and I did some investigation I found out that they could close the nft sale before the public sale date ended that was the issue for kansas-smile

It got closed some minutes ago

@Myestery will observed!
I added a blockhash to the basicIngestor tests in this PR here → https://github.com/floornfts/mobile-minting/pull/31

You should be able to merge main now! 😊


Speed up WebGL rendering

Speed up webgl rendering
The main change is prevention of allocation of intermediate lists. Take eg
    List.range 0 (rows * cols - 1)
        |> List.map (matrixIndex ( rows, cols ))
        |> List.map rect
        |> List.concat
        |> WebGL.triangles

Here range creates a list, then both maps and the concat do too, so 4X the input is allocated.
The concat actually is worse than that. the rect function would allocate a 2-element list for every cell. By passing in the accumulator, those two elements can be cons'd onto the accumulator, thus preventing that allocation.
I've also unpacked the position : Vec3 field into three floats. There is still some discussion whether this is better. I saw a lot of time spent in allocating Vec3s, but it might be that the cost of sending the floats separately is not reported well in the chrome devtools. This needs more testing.

Really nice Folkert!


fix spelling error

Did you try contacting the maintainer?  I'll include the obvious fix, but the upstream version should also be fixed.

hello, how can I take a pull request in upstream

------------------ Original ------------------
From: @.>;
Date:  Fri, Nov 18, 2022 06:07 PM
To: @.>;
Cc: @.>; @.>;
Subject:  Re: [vim/vim] fix spelling error (PR #11571)

Did you try contacting the maintainer?  I'll include the obvious fix, but the upstream version should also be fixed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Runtime files are maintained by each maintainer.
So, normally, the fix should be included in upstream at the maintainer, then the maintainer should send the updated version to Bram.
The maintainer is written at the top of each file. E.g.:
https://github.com/vim/vim/blob/4654d63dec03650825875006c06bb0b0ae43283f/runtime/syntax/ptcap.vim#L3-L4


no tag for 0.2.5

Lots of users use r10k with git rather than the forge, which is more difficult without release tags. Might you be willing to add a tag for the latest forge release 0.2.5.
Thanks!

I second pizzaops comment. We too use this module with r10k.
Thanks.

Appreciate you using the module!
I've pushed updated tag 0.2.5. Will stay on top of that for future releases too. Sorry about the oversight

Thank you!


Mod Manager

Acknowledgement of preliminary instructions

[x] I have read and acknowledged the preliminary instructions.

What idea do you have?
So my idea is that you can add normal folders that includes ExtraContent and Content and bloxstrap will apply the themes either every launch or every time roblox gets updated also any theme should be updated automaticly to the new atlas when new theme is applied it should still apply themes no matter a update or nothing, this will be a tab under the mods file opening
Features :
Switch for disabling or enabling the mods
A file icon to locate the mods place
the starting order (if you set the mod you want to load in like you got a theme but you dont like its mouse so you get a other mouse theme and make its loading order to 1 so it applies first
also a community workshop for themes (optional because bloxstrap might not have the servers required)

duplicate suggestion


verify throwing an error in JSON::JWT.decode

In https://github.com/onli/sinatra-browserid/blob/88ae06ebf8248a277759f9917eb65249cf6711c2/lib/sinatra/browserid.rb#L35 I'm calling decode on string which is generated in https://github.com/callahad/authbackend/blob/e14f16899fc7a3dadf84651b897eac2eccc1d74d/server.rb#L381, by JWT.encode. If not skipping verification, this is leading to an error:
NoMethodError - undefined method `verify' for #<String:0x00000003e86478>:
    /home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.5.2/lib/json/jws.rb:94:in `valid?'
    /home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.5.2/lib/json/jws.rb:25:in `verify!'
    /home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.5.2/lib/json/jws.rb:162:in `decode_compact_serialized'
    /home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.5.2/lib/json/jwt.rb:77:in `decode_compact_serialized'
    /home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.5.2/lib/json/jose.rb:39:in `decode'

I'm assuming I have to wrap the jwt-token-string in something. But this is not covered by the docu in https://github.com/nov/json-jwt/wiki/JWS#verifying, where that function is called with a normal string. Thus I assume this is a bug in docu or implementation.

Thank you for putting this doc here, I was having problems in Rails with this, and couldn't spin my head around.
I would suggest to check the algorithm you are using, and should be HMAC for strings!
The document you provided actually states it:

`Supported key representations are
String (for shared key)
OpenSSL::PKey::RSA
OpenSSL::PKey::EC
JSON::JWK
JSON::JWK::Set
skip_verification # NOTE: magic word for skipping signature verification
For HMAC keys, String, JSON::JWK and JSON::JWK::Set instances are available.

For RSA/ECDSA keys, OpenSSL::PKey::RSA, OpenSSL::PKey::EC, JSON::JWK and JSON::JWK::Set > instances are available.`

I'm not sure I follow. Could you point out more directly what the solution would be? Instead of JSON::JWT.decode params[:id_token], public_key for decoding the encoded string, I would use a different call? Or would the server have to change something?

I assume your public_key on  JSON::JWT.decode params[:id_token], public_key call is a String, and your JWT header includes alg=RS256.
In that case, you need to put a OpenSSL::PKey::RSA or JSON::JWK as the public_key.
like JSON::JWT.decode params[:id_token], OpenSSL::PKey::RSA.new(public_key)

Hi @nov, thanks for your answer!
My JWT header indeed includes alg=RS256. But public_key is not a string, it is already a JSON::JWK. params[:id_token] is a String, but this is the whole idea of the decode function, isn't it? This is the relevant code on my side:
public_key_jwks = URI.parse(URI.escape(settings.browserid_url + '/jwks.json')).read
public_key = JSON::JWK.new(public_key_jwks)
id_token = JSON::JWT.decode params[:id_token], public_key

The jwks.json on the server is (linked above) defined like this:
json ({
  keys: [{
    kty: 'RSA',
    alg: 'RS256',
    use: 'sig',
    kid: settings.kid,
    n: Base64.urlsafe_encode64([settings.pubkey.params['n'].to_s(16)].pack('H*')).gsub(/=*$/, ''),
    e: Base64.urlsafe_encode64([settings.pubkey.params['e'].to_s(16)].pack('H*')).gsub(/=*$/, '')
  }]
})

I think it is something in the internals of JSON::JWT.decode that makes the verify try to work on a string.
I did not highlight that properly, but the JWT.encode that encodes params[:id_token] for transport is coming from the 'jwt' gem, not 'json/jwt'. A incompatibility?

Ah, JWKS (JSON::JWK::Set, an array of JWKs) is different from JWK (JSON::JWK).
Try this.
jwks_json = {
  keys: [{
    kty: 'RSA',
    alg: 'RS256',
    use: 'sig',
    n: 'a',
    e: 'b'
  }]
}
jwks = JSON::JWK::Set.new jwks_json
JSON::JWT.decode params[:id_token], jwks

Thanks for the answer, and sorry for the delay.
That is sadly leading to a different error message:
 /home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.6.2/lib/json/jose.rb in with_jwk_support
        end.try(:to_key) or raise JWK::Set::KidNotFound
/home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.6.2/lib/json/jws.rb in valid?
      public_key_or_secret = with_jwk_support public_key_or_secret
/home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.6.2/lib/json/jws.rb in verify!
        public_key_or_secret && valid?(public_key_or_secret) or
/home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.6.2/lib/json/jws.rb in decode_compact_serialized
        jws.verify! public_key_or_secret unless public_key_or_secret == :skip_verification
/home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.6.2/lib/json/jwt.rb in decode_compact_serialized
          JWS.decode_compact_serialized jwt_string, key_or_secret
/home/onli/Dropbox-decrypted/ursprung.git/vendor/bundle/ruby/2.2.0/gems/json-jwt-1.6.2/lib/json/jose.rb in decode
          decode_compact_serialized input, key_or_secret
/home/onli/Dropbox-decrypted/sinatra-browserid.git/lib/sinatra/browserid.rb in block in registered
                  id_token = JSON::JWT.decode params[:id_token], public_key

I debugged this as far as I could. In with_jwk_support in jose.rb, https://github.com/nov/json-jwt/blob/master/lib/json/jose.rb#L28, this is how key looks like:
{"k"=>"{\"keys\":[{\"kty\":\"RSA\",\"alg\":\"RS256\",\"use\":\"sig\",\"kid\":\"5b6eab5fafe3a0c681c4dab6847242264889b885\",\"n\":\"rcgjgnPWAO7ANqwqkmfLSGzUp_BA_bx2uaF1QnYA8-gfRRLVi5l6RNbAddK_NzqfFOqXPGF1-dbLrtwC_3L8iS6nP71w-FcOmaho0S62puPy_zlaXtraznN8emLDvOJn55AMcoXeTeWofdQ45Rt9H44-9OAZeVcvozP2jkD8VTH5hlxcp0WBXIFbapIRGG3yd_Bnfcd60oCsz2Y3egr6tg1SmhiO1vTT1fCYMIwrYNoGmNk0mMF0HMPRGr6C998RuoX-joRnnq2eacxSr6h-zf9hkg9-hR5eJGfspSJGiH1LA_WpKhkxk4NOLFL7biRXRojUXjlg2vDwte5Ud9Ozlw\",\"e\":\"AQAB\"}]}", "kty"=>:oct, "kid"=>"6Y3ITVdZL5w5zFYr96kH4vjoY3Lcxr_SuNiVvDznmDw"
}

Please notice the kid below k, and the other kid above. The kid at the top level is coming from the jwk constructor in jwk.rb:
self[:kid] ||= thumbprint rescue nil #ignore

thumbprint is what ends up in key. I read up the code of that, it seems to be the base64 encoded sha256 hash of parts of the jwk, e kty and n. But my backend is defining the kid as such:
set :kid, Digest::SHA1.hexdigest(settings.pubkey.to_s)

As far as I know the spec, how kid defined is unspecified. But to change the backend to work with one specific jwk library seems wrong. May I suggest changing that code to work with the inner kid? Assuming I'm not on the wrong track here.

self[:kid] ||= thumbprint rescue nil #ignore

shouldn't overwrite your kid.
see below for more details.
require 'json/jwt'

jwks_json_with_kid = {
  keys: [{
    kty: 'RSA',
    alg: 'RS256',
    use: 'sig',
    n: 'a',
    e: 'b',
    kid: 'your-kid'
  }]
}

jwks_json_without_kid = {
  keys: [{
    kty: 'RSA',
    alg: 'RS256',
    use: 'sig',
    n: 'a',
    e: 'b'
  }]
}

jwks_with_kid = JSON::JWK::Set.new jwks_json_with_kid
jwks_without_kid = JSON::JWK::Set.new jwks_json_without_kid

puts jwks_with_kid.first[:kid] # => 'your-kid'
puts jwks_without_kid.first[:kid] # => 'UnjciMDiBlgL2poMrWAdSjH8JQ_lINur2kt9zvWOxuE'

ah, and your input is handles as a shared secret, since you gave a string, not a hash.

You are right, the test case works:
require 'json/jwt'
require 'open-uri'

jwks_json_with_kid = {
  keys: [{
    kty: 'RSA',
    alg: 'RS256',
    use: 'sig',
    n: 'a',
    e: 'b',
    kid: 'your-kid'
  }]
}

jwks_json_without_kid = {
  keys: [{
    kty: 'RSA',
    alg: 'RS256',
    use: 'sig',
    n: 'a',
    e: 'b'
  }]
}

jwks_json_backend = JSON.parse(URI.parse(URI.escape('https://laoidc.herokuapp.com/jwks.json')).read)

jwks_with_kid = JSON::JWK::Set.new jwks_json_with_kid
jwks_without_kid = JSON::JWK::Set.new jwks_json_without_kid
jwks_backend = JSON::JWK::Set.new jwks_json_backend

puts jwks_with_kid.first[:kid] # => 'your-kid'
puts jwks_without_kid.first[:kid] # => 'UnjciMDiBlgL2poMrWAdSjH8JQ_lINur2kt9zvWOxuE'
puts jwks_backend.first[:kid] # => '5b6eab5fafe3a0c681c4dab6847242264889b885'

The error is in how it is called?

Your code is wrong when creating this key, for some reason.
It is probably generated by calling JSON::JWK.new "non-parsed-json-strong" or such.
{"k"=>"{\"keys\":[{\"kty\":\"RSA\",\"alg\":\"RS256\",\"use\":\"sig\",\"kid\":\"5b6eab5fafe3a0c681c4dab6847242264889b885\",\"n\":\"rcgjgnPWAO7ANqwqkmfLSGzUp_BA_bx2uaF1QnYA8-gfRRLVi5l6RNbAddK_NzqfFOqXPGF1-dbLrtwC_3L8iS6nP71w-FcOmaho0S62puPy_zlaXtraznN8emLDvOJn55AMcoXeTeWofdQ45Rt9H44-9OAZeVcvozP2jkD8VTH5hlxcp0WBXIFbapIRGG3yd_Bnfcd60oCsz2Y3egr6tg1SmhiO1vTT1fCYMIwrYNoGmNk0mMF0HMPRGr6C998RuoX-joRnnq2eacxSr6h-zf9hkg9-hR5eJGfspSJGiH1LA_WpKhkxk4NOLFL7biRXRojUXjlg2vDwte5Ud9Ozlw\",\"e\":\"AQAB\"}]}", "kty"=>:oct, "kid"=>"6Y3ITVdZL5w5zFYr96kH4vjoY3Lcxr_SuNiVvDznmDw"
}

The jwks is created by hand in https://github.com/callahad/authbackend/blob/e14f16899fc7a3dadf84651b897eac2eccc1d74d/server.rb#L384. The jwt encoding is handled by another gem, in https://github.com/callahad/authbackend/blob/e14f16899fc7a3dadf84651b897eac2eccc1d74d/server.rb#L381, but that part seems compatible. You think it is wrong to not define a kid at the top level of the jwks? Are we misreading the spec?
To give some context: This is not a blocker for me. I have a working version using the same gem as used in the backend. But it would be great to have the jwt decoding compatible with multiple libs (also in other languages than ruby, the same problem might arise there), I preferred your way of handling the jwk/jwks, and I wanted to be a good citizen by reporting the issue I encountered. If this incompatibility can't be resolved with a reasonable amount of work, please don't invest too much time in it (though I'm certainly willing to work further on this).

your jwk's kty isn't RSA, but oct.

I just stumbled about this thread again.

your jwk's kty isn't RSA, but oct.

The kty is handcoded to read 'RSA', please see https://github.com/callahad/authbackend/blob/e14f16899fc7a3dadf84651b897eac2eccc1d74d/server.rb#L387.

Ran into same issue, better error message/general fix on the JSON JWT side for handling this case would be very helpful

@nov I ran into this issue while integrating omniauth-openid-connect with Auth0 as openid idp.
I debugged and it seems like Auth0 does not send kid header in it's response.
json-jwt-1.7.2/lib/json/jose.rb:30
jwk[:kid] && jwk[:kid] == kid

so jwk[:kid] == kid is evaluated false all the time.
Regrading to https://tools.ietf.org/html/rfc7515#section-4.1.4 kid header is optional. And i think they do not send kid header when there's only one JWK because it's obvious.
Appreciate to any comments in advance.

you can specify exact jwk for signature verification, not jwk set.
then nonkid is required.

Using OpenIDConnect::Discovery::Provider::Config.discover!, I had to use discover.jwks.first:
expected = { client_id: client_id, issuer: discover.issuer, nonce: session.delete(:nonce) }
id_token = OpenIDConnect::ResponseObject::IdToken.decode(access_token.id_token, discover.jwks.first)
id_token.verify!(expected)

@kofronpi - I did ran into that issue as well, but I get a different error from IdToken.decode when applying the workaround: JSON::JWS::UnexpectedAlgorithm (no implicit conversion of OpenSSL::PKey::RSA into String)
The JWK looks like: {"kid"=>"kL2gw_im-dqAZPKXsI9DM1R2EH8XlePQ8AiwG8h1mRE", "kty"=>"RSA", "alg"=>"RS512", "use"=>"sig", "n"=>"zlzzXasliI5Dr8uJCSh3RpOw6j0L__4I7lTOHYeLTIoiMV2ba14hLVqarosLB4KCHMnS7g2AAoRi1FNpZzjqUgCD51SAVmEujQFuK-romD1kF6JzrmbzGS4JQKOdRH3zlBopcANhOHabfZ_ibtj_-lu70XUjkYoh4CI2ruv2zZMi9fpL-MgUD24Lsc_j0SxoCTNngQQT3xi6iqrID7u9yapluo4WVSP9yOROBxTQWidF3DB62fu8ar4XsTaSGBHBBFe9SngPgkYXg8iDLXkawAUgq7_WMsr0Fc_cnsRczPaWfCrKFmGWvVjF2ZHniPIUUwxFiInDfn-rVQl-J3CdNw", "e"=>"AQAB"}
The code is:
def discover
  @disco ||= OpenIDConnect::Discovery::Provider::Config.discover! @provider_uri
end

# Note: I've tried :basic, changing the scope, etc.. same error.
access_token = oidc_client.access_token!(
  scope: [:openid, :email, :profile],
  client_auth_method: :client_secret_basic
)

jwk = discover.jwks.first
id_token = OpenIDConnect::ResponseObject::IdToken.decode access_token.id_token, jwk

The IdP is KeyCloak. Thoughts? Thanks!

@pgiblock  how do you initialize your client ? I do like this:
      @client ||= OpenIDConnect::Client.new(
        identifier: ENV['CLIENT'],
        secret: ENV['SECRET'],
        redirect_uri: ENV['REDIRECT_URI'],
        authorization_endpoint: discover.authorization_endpoint,
        token_endpoint: discover.token_endpoint,
        userinfo_endpoint: discover.userinfo_endpoint
      )

And then the only difference with your code, I simply call access_token!:
        expected = { client_id: ENV['CLIENT'], issuer: discover.issuer, nonce: session.delete(:nonce) }
        client.authorization_code = params[:code]
        access_token = client.access_token!
        # Validate the access token.
        id_token = OpenIDConnect::ResponseObject::IdToken.decode(access_token.id_token, discover.jwks.first)
        id_token.verify!(expected)

Hope it helps. I don't know Keycloak so I would contact its maintainer directly.


Install-Module with Source will fail each time

using source param will fail each time, as that is passed to the install block:
  def install_command
    command = "Install-Module #{@resource[:name]} -Force"
    command << " -RequiredVersion #{@resource[:ensure]}" unless [:present, :latest].include? @resource[:ensure]
    command << " -Source #{@resource[:source]}" if @resource[:source]
    command
  end

is going to call -Source each time and will fail each time since -Source is not a valid parameter for Install-Module
should set with -Repository after having user set the -Repository name via psrepository
https://docs.microsoft.com/en-us/powershell/module/powershellget/install-module?view=powershell-5.1

Thanks for the report, will get this updated with the correct parameter


Fix tollgate and build icon in README

Links to concourse.bosh.praqma.cloud doesn't work

Links have been fixed


[SP-2678] Backport of PDI-15246 - Group By with include all rows option does not clean up temp files (5.4 Suite)

Closing streams before deleting file
Refactoring
Tests written

More details:
GroupBy

Closing streams before deleting files.
Logging an error if stream can't be closed
Logging detailed message if temp file wasn't deleted. I've chosen this log level because in most cases temp file wouldn't be deleted because streams to this file are not closed (and we do log about close-stream error)
Refactoring

GroupByData

Changed name of streams, pointing that they are related to temp file only.

GroupByMeta

Refactoring some field names

GroupByTest

Updating to JUnit 4.0
Added positive test for temp file deletion
No negative test added, as in this case it would be equivalent to testing logger.

messages

Added message, notifying that temp file wasn't deleting
Refactored a message, notifying that connection to file wasn't closed. Pointing to the path of the file, where an error occurred.

@pamval , could you please take a look at this PR? It's a backport of #2489.


Ubuntu Package

Hi!
Any documentation on how to build a package from the "debian" files?
THX, Georg

Hello!
To be honest, I have no idea :)
The only pointer I can give you is that this module, and the debian files in it, comes from libvmod-example at https://github.com/varnish/libvmod-example
Good luck!

OK THX, I will try my best!


Setting other activations to zero

Hi~ Thank you for developing such a nice visualization tool. Just a small question regrading the test_deconv.py you provided as the demo. If I recall correctly it was said in Matthew's paper (http://www.matthewzeiler.com/pubs/arxive2013/eccv2014.pdf) that this deconvnet could only be used to visualize a single activation in a certain feature map, and thus we have to set the other activations to zero. While the following lines in test_deconv.py
feat = net.blobs['pool5'].data
feat[0][feat[0] < 150] = 0
seems to set only the activations smaller than 150 to zero, and I wonder if this might contradict with the original idea of the paper?
Thank you!

I think this would be open to interpretation of the idea and results. I see no reason why this cannot be used to for multiple features. For example, if you start with only 1 activation in pool5, this will become several activation in a lower layer, such as pool2, and those will all be used to create the image. He never stated that this would only work using 1 activation, I think the paper may have just reported results using 1 activation (though it has been a while since I've read the paper, I could be wrong).


Tips for using Pairwise Inputs?

I tried just passing 'input 1 [SEP] input 2' but kept getting the wrong predicted label from the SingleLabelClassifier -- I assume its because the tokenizer isn't assigning token_type_ids. Is there any hacky-way to fix this?

Hey this has been closed by #99 please use the PairwiseSequenceClassificationExplainer as this now assigns the correct token_type_ids for pairwise problems 😄


MINOR: Refactor log segment deletion code paths

Minor refactoring of the places where we delete log segments, to ensure we always remove the in-memory metadata of the segment before performing physical deletion.

retest this please

Thanks for the PR, the title should ideally describe the change. I'd probably change it to Remove in-memory metadata of the segment before performing physical deletion or something like that. It provides much more useful information than a generic message about refactoring.


Different div class for checkboxes

There is a different div class in the Bootstrap's docs for checkboxes.
https://getbootstrap.com/docs/4.1/components/forms/#overview
Now it's "form-group form-check" but the library generates only the "form-group" div.

For Bootstrap 4.0 (https://getbootstrap.com/docs/4.0/components/forms/#overview) it is only the "form-check" div class.

Alternatively you can use the custom checkbox like this:

  <input type="checkbox" class="custom-control-input" id="id_test_checkbox">
  Check this custom checkbox


Allow negative numbers for default value

What type of PR is this?
Bug Fix
What does this PR do / why is it needed?
Allow numeric primitives properties to have a negative value.
To reproduce:
Setup:
curl https://legend.finos.org/omnibus/start.sh | bash

The following:
curl http://localhost:6900/engine/api/pure/v1/grammar/grammarToJson/model -X POST -H "Content-Type: text/plain" -d "Class domain::Error { description: String[1]; code: Integer[1]; }"
curl http://localhost:6900/engine/api/pure/v1/grammar/grammarToJson/model -X POST -H "Content-Type: text/plain" -d "Class domain::Error { description: String[1] = 'OK'; code: Integer[1] = 0; }"
curl http://localhost:6900/engine/api/pure/v1/grammar/grammarToJson/model -X POST -H "Content-Type: text/plain" -d "Class domain::Error { description: String[1] = 'Description'; code: Integer[1] = 1; }"

works fine, however
curl http://localhost:6900/engine/api/pure/v1/grammar/grammarToJson/model -X POST -H "Content-Type: text/plain" -d "Class domain::Error { description: String[1] = 'Unknown'; code: Integer[1] = -1; }"

gives error, while
curl http://localhost:6900/engine/api/pure/v1/grammar/grammarToJson/model -X POST -H "Content-Type: text/plain" -d "Class domain::Error { description: String[1]; code: Integer[1]; } Class domain::ErrorMessage { error: domain::Error[1] = ^domain::Error(description = 'Unknown', code = -1); }"

works fine.
So, as it is possible to set negative value on property in nested class, it should be also possible to set negative value on property of primitive type.
Other notes for reviewers:
Does this PR introduce a user-facing change?
Default values are not commonly used yet, but user should be able to define a default value in range supported by type.

Can we get a test case to demonstrate this now works as expected?


Remove "Example 1" "Example 2" from all docs and images, it will get annoying to maintain

done for docs, need to update image

cant be bothered updating image, think its clear enough


Allow to send arbitrary extension attributes

Summarizing the chat discussion with @rmja …
It would be good to allow devices (protocol endpoints) to send arbitrary header fields, which translate into CloudEvents (CE) extension attributes.
As some extension attributes cannot be allowed to be set by external actors (like the id value, the "partition key" , or distributed tracing information) such fields need to be either filtered out, or rejected. An alternative would be to simply prefix everything with e.g. drogue-, which would scope/namespace such attributes and prevent any collision.
While the core attributes of CE are known (at this point), the full set of attributes (including all extensions) is not. So using a prefix makes the implementation much easier.
The proposed solution is:

Allow any endpoint to provide additional extension attributes (which must be able to be translated into CE attributes)
Have each endpoint provide a way (API) to let devices specify such attributes (start with HTTP)
Translate the incoming attributes to CE attributes, prefixing them with (e.g.) drogue-.

For HTTP this could simply mean adding every query parameter that starts with attr. (or meta. or ext.) to the extension attributes. Like:
?attr.foo=bar

Resulting in:
drogue-foo: bar

Additional thought: For HTTP, we could allow translating all Drogue-Attr- prefixed headers as extension attributes too.


Bugfix, dem fixing critical rayleigh time step

Description of the problem

The inspection of the DEM time step was wrong. It should be searching for the more restrictive rayleigh time, that is the minimum rayleigh time, not the maximum.

Description of the solution

The rayleigh time step is initialize to infinity.
We use std::min instead of std::max.

How Has This Been Tested?

One test has been updated.
All the other test are still succeeding

Documentation

N/A

Ehmm.... a multicore test is failling on dealii:master but not on dealii:v9.5.0


Possibility to specify source set

Currently when generating jOOQ sources it is hardcoded to use the main source set https://github.com/monosoul/jooq-gradle-plugin/blob/58f4d40bed28e1ac51856252aa1bdb8972146225/src/main/kotlin/dev/monosoul/jooq/JooqDockerPlugin.kt#L45
But there are some cases where you'd want to change that, for example when using library features and you have a different source set for some feature for which you'd want to generate the jooq sources. So it would be a nice addition to be able to configure this parameter.

@Fadelis you can now set the target source set in the codegen task config with targetSourceSet property.

Yes, it works as expected 👍  Thanks for lighting fast turnaround! ⚡