Docs.MS Release Updates for azure-search-documents

Update docs metadata and targeting for release of azure-search-documents

Docs Build status updates of commit eb0fa64:
:clock10: Pending: waiting for processors (62 builds ahead of you)
:warning: Docs Build is busy, currently there are 62 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit eb0fa64:
:clock10: Pending: waiting for processors (62 builds ahead of you)
:warning: Docs Build is busy, currently there are 62 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit eb0fa64:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/latest/search-documents-readme.md
:warning:Warning

Details

package.json
:white_check_mark:Succeeded

docs-ref-services/latest/search-documents-readme.md

Line 2, Column 1: [Warning-ms-prod-and-service] Only one of the following attributes can exist: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 62, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable
Line 66, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/cli/azure/search/service?view=azure-cli-latest#az-search-service-create

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

Docs Build status updates of commit eb0fa64:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/latest/search-documents-readme.md
:warning:Warning

Details

package.json
:white_check_mark:Succeeded

docs-ref-services/latest/search-documents-readme.md

Line 2, Column 1: [Warning-ms-prod-and-service] Only one of the following attributes can exist: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 62, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable
Line 66, Column 1: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? If so, add &preserve-view=true to the URL: https://docs.microsoft.com/cli/azure/search/service?view=azure-cli-latest#az-search-service-create

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


Document Migration guide from JSHint

Since #102 is now completed, we should document a migration guide from JSHint. This probably depends on figuring out some better documentation too, as outlined in: https://github.com/mdevils/node-jscs/issues/129

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

Because:

jshint is pretty slow of removing style related options,
no ones likes to document things and because
this open for a year now,

I think it safe to say this will never be documented. Plus footnotes at the rules page http://jscs.info/rules.html is more or less enough

Yeah, Agreed.


Method max_abs_deviation in stan/mcmc/chainset should be median not max

Summary:
Naming mistake during implementation - assumed the "M" in "MAD" was "max".  Wrong - it's "median".
Description:
The name of this function is inaccurate.  The code shows what's going on:
  /**
   * Compute maximum absolute deviation (mad) for specified parameter.
   *
   * Follows R implementation:  constant * median(abs(x - center))
   * where the value of center is median(x) and the constant is 1.4826,
   * a scale factor for asymptotically normal consistency: `1/qnorm(3/4)`.
   * (R stats version 3.6.2)
   *
   * @param index parameter index
   * @return sample mad
   */
  double max_abs_deviation(const int index) const {
    Eigen::MatrixXd draws = samples(index);
    auto center = median(index);
    Eigen::MatrixXd abs_dev = (draws.array() - center).abs();
    Eigen::Map<Eigen::VectorXd> map(abs_dev.data(), abs_dev.size());
    return 1.4826 * stan::math::quantile(map, 0.5);
  }

Current Version:
v2.35.0

fixing this requires changing the function name (everywhere, including CmdStan's stansummary utility) and the docstring.
it won't actually change the code.   worth doing before the release?

If not before the release, then soon after.  This kind of thing is super confusing if you leave it around.


update nlohmann_json to version 3.0.1

I just released JSON for Modern C++ 3.0.1, see https://github.com/nlohmann/json/releases/tag/v3.0.1. Could you please update the package nlohmann_json?

See https://github.com/ruslo/hunter/pull/1281
Released: https://github.com/ruslo/hunter/releases/tag/v0.19.216

Thanks!


UnicodeEncodeError

As I tried to execute fakenet.exe or fakenet.py,
UnicodeEncodeError: 'ascii' codec can't encode characters in position 33-34: ordinal not in range(128)
error came out.
I think it's about unicode and ASCII encoding error.
Since it's not about single source code, I couldn't use 'encoding:utf-8' method.
Here's my environment
VirtualBox 6.0.8
Windows 7 32bit
Python 2.7.16
I installed every requirements fakenet needs, so that would not be a problem.

@liartist  Thank you for using and supporting Fakenet-NG. Do you mind providing the complete stack trace to help us figure out where things fail?
Thanks,

Thank you for the fast support!
I tried 2 versions of fakenet, the standalone (1.4.3) and python build (1.4.9) version.
Here's 2 stack traces.
fakenet 1.4.3
`C:\Users\Administrator\Desktop\fakenet1.4.3>fakenet.exe

|  /\   | |/ /  | \ | |  | |   | \ | |/ |
| | /  \  | ' /| |  |  | | |     | ||  | | |  __
|  __/ /\ \ |  < |  _| | . |  __|    | |______| . | | | |
| | / ____ | . | || |\  | |____   | |      | |\  | || |
||//    __|__|| _||  ||      || _|_____|
                    Version 1.4.3

               Developed by FLARE Team

06/06/19 01:54:47 PM [           FakeNet] Loaded configuration file: configs\def
ault.ini
06/06/19 01:54:48 PM [          Diverter] Capturing traffic to packets_20190606_
135448.pcap
06/06/19 01:54:48 PM [          Diverter] Using default listener proxytcplistene
r on port 38926
06/06/19 01:54:48 PM [          Diverter] Using default listener proxyudplistene
r on port 38926
06/06/19 01:54:48 PM [          Diverter] WARNING: No gateways configured!
Traceback (most recent call last):
File "fakenet\fakenet.py", line 380, in
File "fakenet\fakenet.py", line 355, in main
File "fakenet\fakenet.py", line 156, in start
File "fakenet\diverters\windows.py", line 97, in init
File "fakenet\diverters\diverterbase.py", line 615, in init
File "fakenet\diverters\winutil.py", line 381, in fix_gateway
File "subprocess.py", line 185, in check_call
File "subprocess.py", line 172, in call
File "subprocess.py", line 394, in init
File "subprocess.py", line 614, in _execute_child
UnicodeEncodeError: 'ascii' codec can't encode characters in position 37-38: ord
inal not in range(128)
[2444] Failed to execute script fakenet
C:\Users\Administrator\Desktop\fakenet1.4.3>`
fakenet 1.4.9
`C:\Users\Administrator\Desktop\flare-fakenet-ng-master\fakenet>python fakenet.py

|  /\   | |/ /  | \ | |  | |   | \ | |/ |
| | /  \  | ' /| |  |  | | |     | ||  | | |  __
|  __/ /\ \ |  < |  _| | . |  __|    | |______| . | | | |
| | / ____ | . | || |\  | |____   | |      | |\  | || |
||//    __|__|| _||  ||      || _|_____|
                    Version 1.4.9

               Developed by FLARE Team

06/06/19 01:57:02 PM [           FakeNet] Loaded configuration file: configs\def
ault.ini
06/06/19 01:57:03 PM [          Diverter] Capturing traffic to packets_20190606_
135703.pcap
06/06/19 01:57:03 PM [          Diverter] WARNING: No gateways configured!
Traceback (most recent call last):
File "fakenet.py", line 437, in
main()
File "fakenet.py", line 412, in main
fakenet.start()
File "fakenet.py", line 168, in start
self.diverter = Diverter(self.diverter_config, self.listeners_config, ip_add
rs, self.logging_level)
File "C:\Users\Administrator\Desktop\flare-fakenet-ng-master\fakenet\diverters
\windows.py", line 97, in init
ip_addrs, logging_level)
File "C:\Users\Administrator\Desktop\flare-fakenet-ng-master\fakenet\diverters
\diverterbase.py", line 644, in init
gw_ok = self.fix_gateway()
File "C:\Users\Administrator\Desktop\flare-fakenet-ng-master\fakenet\diverters
\winutil.py", line 381, in fix_gateway
stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 185, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 614, in _execute_child
args = '{} /c "{}"'.format (comspec, args)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 37-38: ord
inal not in range(128)
C:\Users\Administrator\Desktop\flare-fakenet-ng-master\fakenet>`
Thank you!

This error is cause by Character code.
Maby, your ethernet adapter is not English.
I used Japanese name and same Error.But I changed "Ethernet0" taht was no error.

@tinajn I don't think this problem exists anymore as every adapter name is of the type LPWSTR ( It is a pointer to a null-terminated string of 16-bit Unicode characters)
   IP_ADAPTER_ADDRESSES._fields_ = [
   ...
   ("FriendlyName",  LPWSTR),
   ...
  ]

Some Examples:

@samrath-sudesh-acharya Thanks for testing this out! I have tested on my end and it appears to have been an issue with the way subprocess.check_call() handled non-ASCII characters in Python 2.
As @samrath-sudesh-acharya mentioned this issue is not observed anymore as we have ported to Python 3. @liartist could you confirm?

Closing this issue.


Create utility python file

Create utility python file

Create tools.py to hold utility functions
Functions used for both Rev A and Rev B relay board should be moved to tools.py

Addressed and implemented for the Rev A relay board in this pull request:
https://github.com/ku-cms/eLink_Instrumentation/pull/60

We still need to implement and test the functions from tools.py for the Rev B relay board.
However, at the moment we are only using the Rev A relay board.
We don't want to modify the Rev B relay board code without testing, so we will wait to update the software for Rev B until we can test it.
I will close the issue for now. We should come back to this update for Rev B in the future.

Address for Rev B here: https://github.com/ku-cms/eLink_Instrumentation/pull/64


Multiline input doesn't have a scrollbar when passing rowsMax

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
If you have a text input with a maxRows set, you can continue to type passed the maxRows count, but not be able to scroll back up. This is not an issue when the text is already present in the textarea on first render.
The textarea element rendered by the component seems to have overflow:hidden set on it which isn't removed when the text goes passed the max height.

Expected Behavior 🤔
You should be able to scroll the moment there is more text than can fit in the textarea.

Steps to Reproduce 🕹

Steps:

go to https://material-ui.com/components/text-fields/
scroll down to Outlined section
click on multiline textbox with Controlled written inside it
type enough for it to start overflowing onto 4+ lines
try and scroll

Your Environment 🌎

Tech
Version

Browser
Chrome 76.0.3809.132

@rbhalla Thanks for the report, the mistake comes from ignoring state updates that should impact the render method. What do you think of this diff? Do you want to submit a pull request? :)
diff --git a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.js b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.js
index 325c3fff1..ba4808e6b 100644
--- a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.js
+++ b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.js
@@ -68,17 +68,20 @@ const TextareaAutosize = React.forwardRef(function TextareaAutosize(props, ref)

     // Take the box sizing into account for applying this value as a style.
     const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);
+    const overflow = Math.abs(outerHeight - innerHeight) <= 1;
+
+    // console.log('outerHeightStyle', outerHeightStyle, innerHeight, outerHeight);

     setState(prevState => {
       // Need a large enough different to update the height.
       // This prevents infinite rendering loop.
       if (
-        outerHeightStyle > 0 &&
-        Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1
+        (outerHeightStyle > 0 &&
+          Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1) ||
+        prevState.overflow !== overflow
       ) {
         return {
-          innerHeight,
-          outerHeight,
+          overflow,
           outerHeightStyle,
         };
       }
@@ -125,7 +128,7 @@ const TextareaAutosize = React.forwardRef(function TextareaAutosize(props, ref)
           height: state.outerHeightStyle,
           // Need a large enough different to allow scrolling.
           // This prevents infinite rendering loop.
-          overflow: Math.abs(state.outerHeight - state.innerHeight) <= 1 ? 'hidden' : null,
+          overflow: state.overflow ? 'hidden' : null,
           ...style,
         }}
         {...other}

Can I submit the PR?

Sure :)

@oliviertassinari I appreciate the spot, and the quick fix here. Thank you for your help and the library!

@rbhalla It's not fixed yet, we still have to handle the tests part :).


[Ehrenamtskarte]Add region Landkreis Oberallgäu

Is your feature request related to a problem? Please describe.
The Landkreis Oberallgäu wants to participate to the ehrenamtskarte
Describe the solution you'd like

add the region to the regions table
set activatedForApplication to false

@sarahsporck i think we shouldn't do a migration for this. Since if we would have to run the migrations from baseline once this migration would set the region to activated false.
Not sure how we properly handle this. Probably we should just deactivate them manually after the import with the new region was done with the next release version


Fix small bug traversing users in interface_var_sroa

Fix code that is traversing def-use user structure at the same time
that it is changing it. This is dicey at best and error prone at worst.
This was uncovered making a change to the id_to_user representation.

@kuhar @vettoreldaniele Could you please review if @s-perron is not available?

Sorry, I had looked at this earlier.  I don't know why I did not approve it.


Bash type bug

when using Bash type in pipeline as an action task. if the shell returned an exit code . such as 3 or 4 or others.  the pipeline will returned an error as below first screenshot shown  .
i checked the source code found the the bash module exception handle section has some issues need to fix.

https://github.com/amoffat/sh/blob/1.14.2/sh.py#L337-L399
as you can see, ErrorReturnCode only has full_cmd/stdout/stderr/truncate properties. it should use str(e) here.
and e.exit_code  do exist when the exception is an instance of  ErrorReturnCode_${exit_code} like ErrorReturnCode_4  in this case.
I think it will be a easy fix if you're interested.


[TF-TRT] Adding Mixed Precision Grappler Pass to TF-TRT Conversion

55959

 Quality gate: Failed
82 Issues

 11 Vulnerabilities
 54 Code issues
 17 Anti-patterns

Details

 Quality gate: Failed
82 Issues

 11 Vulnerabilities
 54 Code issues
 17 Anti-patterns

Details


Launches Next don't show Future Lanches

https://api.spacexdata.com/v4/launches/next
show only "date_local": "2020-08-31T20:00:00-04:00" for some days now

This is how we show partial dates, see this section of the docs for more details.
The date for this until last night was 2020 Sep, so the date is only valid to the month level.


Strict python dependencies can conflict with other packages

Currently, openfl and mlcube installations conflict due to overly-strict pip requirements files. This can be worked around by changing the requirements of either project, which implies that both projects are overly strict :)

This is to convert our pip dependencies to >= instead of == I'm guessing?
Can you give an example of the conflict?


Clipboard support for pygame

Thanks to #144 glfw and pysdl2 integrations got their clipboard support. Now it's time to do that for pygame.

Seems that pygame has some built-in clipboard integration but it is still marked as experimental.

I'm marking this as "shelved" because there is no native stable API that we could use at this point.


Added support for function definitions containing override and final

Added support for override and final
Stopped switching files at the end of definition generation when creating inline functions.
Corrected minor typo in README.md

Thx for your pr.


Fix errors in IDN.

Looking at this again, I kind of doubt this is the best solution for the issue. Data gets converted on multiple occasions now, and if I understand it correctly, we only needed idna names in the configuration file.
I would suggest that we revert the previous commit https://github.com/opnsense/core/pull/1892 and add output filters to Jinja2 to be able to only translate when needed.
Which would result in a template change, a bit like :
acl whiteList url_regex {{element|encode_idna|replace(".","\.")}}
And a very small addition to configd, being https://github.com/opnsense/core/commit/cf3ebcae01d2b5a3bc7ea4ca4c9fd55e763981ff

Would this mean we can remove the PHP module for it?

maybe, but there is another pull request which might need it too, although I'm not sure we should pull that one in.

@fichtner we can remove it, the other pull request is not going to be in OPNsense.


Select block call to action requires scroll

Issue/opportunity
In French, the Sélectionner ce bloc / Select block button / CTA is burried and requires user to scroll to access. This could easily be missed and/or cause confusion.
Screenshots

Test case

4.01 (Build + share a form)
Surface Tablet
Microsoft Edge
In French

There are new designs proposed that should help with the scroll issues by breaking the categories up into different tabs.
concept design: figma

This is fixed now


chore(csharp): use openapi repository to generate client

Relatad to https://github.com/influxdata/influxdb-client-csharp/pull/206
Proposed Changes
Use openapi repository to generate csharp client.
Checklist

[x] Rebased/mergeable
[x] Commit messages are in semantic format
[x] Sign CLA (if not already signed)

The CircleCI will pass after merge: https://github.com/influxdata/influxdb-client-csharp/pull/206
Success result for PR branch:


Added Cancelable protocol to reverse tasks.

Hi,
Added this so I can cancel reverse address requests.
Hope it helps,
H.

Hello @malcommac, does this make sense to you? Anything you would change? I am using it to anonymously cancel this tasks in my Rx operations. Thanks.

Hi @hernangonzalez , I think it's okay but I would to add it as default protocol for any activity involved by SwiftLocation; it will make more sense in the context of the library. What do you think?


[Feature] Redesign Footer component

Problem
The current footer is really bad visually and does not meet the current standards of other UI/UX trend
Description
This feature will make the Footer more pleasing to look at and more accessible
Additional context
For me personally as a Frontend Developer the current Footer is way below standard with the ever evolving world of UI/UX
The overall goal for the new footer is to put it in alignment with the current universal footer found on newer Creative Commons sites. See an example here: https://opensource.creativecommons.org/

Implementation

[x] I would be interested in implementing this feature.

Hi, I'ld like to work on this issue

Hi @OsujiPius I will like to work on this issue

@JennySimen Already working on it

@possumbilities I'll like to work on this project.

@OsujiPius thanks for adding more clarification, and I appreciate your enthusiasm!
I agree the footer needs to be updated, as does a lot of the visual aesthetic of the site. The overall goal for the new footer should be to put it in alignment with the current universal footer found on newer Creative Commons sites. See an example here: https://opensource.creativecommons.org/
That's definitely inline with the direction you were already headed.

@possumbilities thank you. I will get to work right away

@OsujiPius can you update the original issue to expand a bit with this information about following the other universal footers?

@OsujiPius can you update the original issue to expand a bit with this information about following the other universal footers?

Sure I can do that

Hi @OsujiPius are you still working on this? Or can I get on it? 😊

Hey @PreciousOritsedere I am on it

Resolved in new site merge: https://github.com/creativecommons/search/pull/206


smrl_cfvqa_rubi is TOO slow to train

I can train all the other versions except smrl_cfvqa_rubi with batch_size = 256, I have to change it to 64 preventing CUDA out of memory. But the training is too slow, which takes a day to train a epoch with three 3090.
I wonder what is the difference between smrl_cfvqa_rubi and other versions making it so speical, and is it normal to train so slowly? or is it because I did something wrong?

It is wired. Could you also try smrl_cfvqasimple_rubi as it has the same function as smrl_cfvqa_rubi?
BTW, I will delete smrl_cfvqa_rubi to avoid confusion as it is redundant.

I have trained smrl_cfvqasimple_rubi, and it works well.
I realized the only difference between smrl_cfvqasimple_rubi and smrl_cfvqa_rubi is q_single = True in smrl_cfvqa_rubi while False in smrl_cfvqasimple_rubi.
Also, smrl_cfvqa_rubi has mlp_v, but may not work because fusion_mode is rubi.
Is it because q_single? What dose this parameter really mean? And why do we need a single text encoder?

The q_single option uses a separate text encoder for the QA branch. In our implementation, the main branch and QA branch share the same text encoder, following RUBi, \ie, q_single=False. For mlp_v, you are right, this option does not work when we implement the 'cfvqasimple' option. You can use smrl_cfvqasimple_rubi for applying RUBi+CF-VQA.

Okay! I got it.
Thank you very much for your patient reply!


Add NetEase Cloud Music lyrics provider

See https://github.com/spicetify/spicetify-cli/blob/master/CustomApps/lyrics-plus/ProviderNetease.js

Closed as completed in #89


V0.3 feedback

Regarding User Guide:
Good job updating how the GUI of the product will look like.
Perhaps you guys can look into adding partial screenshots capturing the use of your command(s)?
The 'Command summary' section will be used heavily by our testers. Try to make it easy to use as possible. e.g. give examples for each command.
Regarding Developer Guide:
Good job adding a comprehensive product survey, perhaps it can be represented in a table?
Do make sure the the diagrams are updated to represent your task manager and not the addressbook.
For the user stories:
Good job having comprehensive user stories.
Perhaps task could be split into the three categories? Floating, deadline and event(start time and end time)?
For the use cases:
Under Use Case ends I believe it should be on a new line by itself, do modify for all of your use cases.
For the NFRs:
Recall from tutorial that it should not be that vague like Good OOP principles and so on. It should be tangible like Should execute within 0.5s.
For the glossary:
Do make the appropriate modifications to it. Is Private contact detail really in the task manager?
It may be more practical to give a few examples of interesting test cases and explain the thinking behind how you arrived at those test cases, rather than try to give a comprehensive list of all test cases.
Perhaps explain how your design support undo/redo. There are multiple ways this can be done, so it will be useful to explain how you do it and why you chose to do it that way.
Overall
Recall from tutorial about dog-fooding your product, perhaps think of ways to improve the command format?
Also try to do a peer review on each other's PR.
Please close this issue after reading it.

For your reading
@benwongwf @huanhock

Thanks @brandonyeoxg ! Will keep your feedback in mind moving forward


Running server gives ERROR:   [Errno 99] error while attempting to bind on address ('::1', 8000, 0, 0): cannot assign requested address

ERROR:    [Errno 99] error while attempting to bind on address ('::1', 8000, 0, 0): cannot assign requested address

It sounds like something is already listening to port 8000.
lsof -i -n


'Create Pool' button doesn't work after rejecting transaction in Metamask

Describe the bug
When creating a locked pool, in the last step after I click 'Create Pool' the metamask opens up. I reject the transaction in Metamask, I am unable to again click 'Create Pool' button  to re-initiate the transaction as it does nothing.
To Reproduce
Steps to reproduce the behavior:

Go to https://app.poolz.finance/dashboard
Click on 'Locked Deals'
Click 'Add Locked Deal' button
In 'Token Information' Enter Token Contract Address  as 0x200944BB9427bBdcDB36d15A8e29CfF7083C03E7
Click 'Set Trust Ratio'
Enter amount as 500
Click Confirm
Click Reject in the Metamask.
Click Create Pool button to re-initiate the metamask approval. This is the place the button doesnt work.

Expected behavior
Until a pool is approved I should be able to Open Metamask approval multiple times when 'Create Pool' button is clicked
Screenshots

Desktop (please complete the following information):

OS: Windows 10
Browser : Vivaldi
Version : 3.5

Wallet address
0xdD5F5feE4Db473ACa5A0b52EE459Abd35D098BEE

this test is not for the locked deal section, we will get to it later stage.
thanks for the report.

this test is not for the locked deal section, we will get to it later stage.
thanks for the report.

@Lomet This is happening for the regular new pool creation scenario as well..

@Lomet This is happening for the regular new pool creation scenario as well..


CSharp | Enum value is modified after serialization

When a request contains an enum value it is modified during serialization. The first letter is changed to lowercase ex.
enum value NORMAL is changed to nORMAL
Complete example:
OpenApi specification:
openapi: 3.0.0
info:
    title: test
    version: 1.0.0

paths:
    /users:
        post:
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UserRequest'
            responses:
                '200':
                    description: OK

components:
    schemas:
        UserRequest:
          required:
          - name
          - userType
          type: object
          properties:
            name:
              type: string
            userType:
              $ref: '#/components/schemas/UserType'

        UserType:
              enum:
              - NORMAL
              - ADMIN
              type: string

Example code:
using ApiSdk;
using ApiSdk.Models;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;

var authProvider = new AnonymousAuthenticationProvider();
var adapter = new HttpClientRequestAdapter(authProvider)
{
    BaseUrl = "http://localhost:8585"
};
var client = new ApiClient(adapter);

await client.Users.PostAsync(new UserRequest
{
    Name = "test",
    UserType = UserType.NORMAL
});

The server receives:
{"name":"test","userType":"nORMAL"}

After investigation, I found probably the cause: https://github.com/microsoft/kiota-serialization-json-dotnet/blob/bea429a32e2eba9fe481fdd9d8b0014a81573e27/src/JsonSerializationWriter.cs#L247

Hi @sirmrowa
Thanks for reporting this.
We had a PR a couple of days to address some of the shortcomings of enum serialization from @vadrsa #77.
It was a progress in the right direction, and since the enum member serialization value is now "stored" in an attribute, it means no more normalization needs to be done in the serialization code.
Would you be willing to submit a pull request to remove the calls to ToFirstCharacterLowerCase please and add a couple of unit tests for that case specifically?


[explorer] Update all explorer URL references

We're moving to a network-agnostic explorer, and this updates all references to point to the new explorer. We'll also set up a redirect so any missed paths should be fine.

thanks for updating docs!


Merge problem_tags and problem_editorial tables and patch the code accordingly.

Major / Risky deploy.

Deployment procedure.


Updated Quarkiverse docs

Hey @dufoli this splits out the docs into a more manageable set of docs (instead of the gigantic one we had before).  I also added a few sections in the index page that we haven't tracked, such as contract vs code first, sample code and issues and support sections.

Not exactly the same structure you proposed here: https://github.com/quarkiverse/quarkus-cxf/issues/147#issuecomment-783203096 but it is pretty close :)


Node.js: Potential memory leak

Ref: https://github.com/GoogleCloudPlatform/google-cloud-node/issues/2135
See the above customer reported issue of a memory leak with the @google-cloud/logging library. I can reproduce the leak (sample code below). Looking a memory usage, JS heap and Node.js external memory is constant but RSS increases. This suggest that this is memory leaking from a native module.

Testcase
const logging = require('@google-cloud/logging')();
const plugins = require('restify-plugins');
const restify = require('restify');
const util = require('util');

const log = logging.log('logging-log');
const metadata = {
  resource: {
    type: 'global'
  }
};

const server = restify.createServer({
  name: 'myapp'
});

server.use(plugins.acceptParser(server.acceptable));
server.use(plugins.queryParser());
server.use(plugins.bodyParser());

server.get('/echo/:name', function (req, res, next) {
  const entry = log.entry(metadata, `got /echo request: ${req.params.name}`);
  log.info(entry, {}, function() {});
  res.send(req.params);
  return next();
});

server.listen(8080, function () {
  console.log('%s listening at %s', server.name, server.url);
});

setInterval(() => {
  const m = process.memoryUsage();
  console.log(`rss ${m.rss} heap ${m.heapTotal} external ${m.external}`);
}, 5 * 1000);

Even with mild load, the above leaks memory fairly rapidly.
This does require $GCLOUD_PROJECT to be set and valid credentials to be available.
/cc @murgatroid99

I have found a couple of memory leaks in the C++ glue code caused by calls to CreateSliceFromString that are not followed by grpc_slice_unref. There also appears to be a memory leak in the core code for handing metadata from call credentials (which is used to connect google-auth-library with gRPC), but so far, I have been unable to track down the root cause.

We too have a confirmed memory leak when upgrading from 1.1 to 1.2. We tried to deploy 1.2.1 as well a few hours ago, and the leak persists.  See the graphs below:

We too took heap dumps, and found that the memory was not registered in the Node.js heap dump, so is definitely a native memory leak.

FYI. It is very easy for us to reproduce this issue and we have hundreds of nodes we can deploy this on. If anyone has any suspected SHAs that they think may have introduced the bug, I'd be happy to run a few different version for a few hours and post the results.

@murgatroid99 I have created a repo which detects this leak by using a git bisect.
The memory leak, according to my tests which can reproduce the problem, first started with your commit that disabled GRPC_UV.
Whilst I can see that GRPC_UV appears to have been reintroduced later, running my tests against v1.2.1 results in the memory climbing rapidly and an assertion crash:
E0405 02:34:16.121913000<PHONE_NUMBER>90848 sync_posix.c:60]              assertion failed: pthread_mutex_lock(mu) == 0
./install_and_test_leak.sh: line 33: 99610 Abort trap: 6           node ./test_grpc_leak.js
~/code/Ably/forks/grpc_test

Are there any node specific tests where a memory leak test could be added to prevent future regressions? Our platform relies extensively on gRPC, and whilst we will now add our own tests to prevent this type of regression, I am sure it would benefit everyone to have something similar.
Shout if I can do anything further to help.

@murgatroid99 please see my PR at https://github.com/grpc/grpc/pull/10476 which fixes this issue in the 1.1.* branch

I'm not comfortable enabling GRPC_UV in 1.1.x. There have been changes since then that make GRPC_UV work properly. Plus, that clearly can't be the root cause of the leak.

Plus, that clearly can't be the root cause of the leak.

Well that's the commit that introduced the leak, and 8f60965 fixes the leak, so what do you suggest?

I'm not comfortable enabling GRPC_UV in 1.1.x. There have been changes since then that make GRPC_UV work properly. Plus, that clearly can't be the root cause of the leak.

Understood, but surely it's more uncomfortable having a known memory leak?

I've created PR #10503, which fixes this problem, at least using the repro case provided above. It might be possible to backport those changes to 1.1.x, but you'd probably be better off updating to 1.2.x after that change is published.

I have published<EMAIL_ADDRESS>which includes fixes for this leak.

Awesome! I can confirm that the memory leak I was observing with the test-case above is fixed.

I believe this can be closed from my point view.


copr, json: handle u64 json correctly

What is changed and how it works?
Issue Number: Close #16512
What's Changed:
Previously, the u64 given by serde is parsed into i64 or float64. However, it should be u64 to be compatible with TiDB and MySQL.

Related changes

[ ] PR to update pingcap/docs/pingcap/docs-cn:
[x] Need to cherry-pick to the release branch

Check List
Tests

[x] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Release note
Fix the issue that the JSON integers which exceed the i64 range but are within the u64 range are parsed as f64 instead of u64.

/cc @breezewish @AilinKid

/cc @gengliqi

@breezewish @gengliqi Could you help me to triage the issue? It seems that I cannot use /affects command to add tags to the issue 🤔 .

/run-check-issue-triage-complete

@breezewish @gengliqi and /merge, please? ❤

/merge

/cherry-pick release-7.5
/cherry-pick release-7.1
/cherry-pick release-6.5


Logging in Elixir Plugin

Hello,
I have some errors to log and I do this with Elixirs default backend console and some metadata.
config :logger, backends: [:console]

config :logger, :console,
  format: "$time [$level] $message - $metadata",
  metadata: [:foo, :bar, :baz],
  level: :info

If i call
Logger.error("Uups", [foo: "foo"])

I find my log in erlang.log.*
14:44:03.257 [error] Uups

without the metadata.
Can I config VerneMQ that the log goes to the console or console.log?
It seems log.console = console has no effect.

@NickNeck thanks, that's a really good question. I have no real answer though.
In case we haven't done any general thinking on this, we could start a discussion here.

How should plugins do logging?
Should plugins be allowed to log to the VerneMQ logs?
Are there any specifics for Elixir plugins?
What is the current situation?
and of course hopefully clear up your questions.

VerneMQ uses Lager to do all logging and it is likely the interplay between the Elixir default backend and Lager which is causing problems. I do not know how this should work, but I would look into what existing problems/issues/solutions people have come up with for making logging work from Elixir together with Lager.  One possible solution could maybe be to use a Lager backend for the Elixir logger. I found some information about that here: https://github.com/erlang-lager/lager#elixir-support, though I've never tried it.

Thank you, for your answer.
I have tried LoggerLagerBackend but with no success. The plugin compiles and the server can be started. But the logs go still to erlang.log.*.
My config:
config :logger, backends: [LoggerLagerBackend]

config :logger, LoggerLagerBackend,
  format: "$time [$level] $message - $metadata",
  metadata: [
    :foo
  ],
  level: :warn

From the LoggerLagerBackend docu:

This sends all messages of level debug or higher to lager. They will then be subject to filtering and routing according to whichever lager config you have in place.

How can I figure out the lager config?

The next try. To be flexible I have written my own LogLagerBacken. The test worked fine. If I do the same in my plugin I get a crash report.
The code in my plugin:
Logger.add_backend LogLagerBackend

The crash report:
19:10:07.448 [error] CRASH REPORT Process <0.397.0>
with 0 neighbours exited with reason:
no case clause matching {'EXIT',{undef,[{'Elixir.LogLagerBackend',
init,['Elixir.LogLagerBackend'],[]},{gen_event,server_add_handler,4,
[{file,"gen_event.erl"},{line,429}]},{gen_event,handle_msg,5,
[{file,"gen_event.erl"},{line,274}]},{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,247}]}]}} in'Elixir.Logger.Watcher':init/1 line 25
in gen_server:init_it/6 line 352

Let's see what I try next.

It is logging! I have learned the last day's something about umbrella apps and distillery. I will publish my package today and write a little howto in my next comment. I am sure that LoggerLagerBackend will also work in a VerneMQ plugin, but I will do some things in a little bit different way.

That's great! Very cool. If you feel like it you're very welcome to add the howto to the wiki section: https://github.com/erlio/vernemq/wiki

LogLagerBackend is available on hex.
The backend can be configured in an Elixir Plugin like this:
defmodule MyVernePlugin.Application do
...
  def start(_type, _args) do
    Logger.remove_backend(:console)
    Logger.add_backend(LogLagerBackend)
    Logger.configure_backend(
      LogLagerBackend,
      format: "$message - $metadata",
      metadata: [:foo],
      level: :info
    )
...
  end
end

I will add this info to the wiki if I find a little bit time.
A configuration via config/config.exs does not work. I guess the sys.config will be not read when the plugin starts.
console.log:
2018-03-05 15:26:22.873 [warning] <0.499.0>@Elixir.MyVernePlugin:on_publish/6:31 How Do You Do - foo=bb-8
2018-03-05 15:26:22.873 [error] <0.499.0>@Elixir.MyVernePlugin:on_publish/6:31 Da, Gefahr! - foo=bb-8

Next update, last update 😉
Logging in your Elixir Plugin
Add LogLagerBackend to your plugin deps {:log_lager_backend, "~> 0.0.1"}.
Add an advanced.config file next to your vernemq.conf file (same folder eg. /etc/vernemq).
%% advanced.config
[
 {logger,
     [{backends,['Elixir.LogLagerBackend']},
      {handle_otp_reports,false},
      {level,debug},
      {'Elixir.LogLagerBackend',
          [{format,<<"$message - $metadata">>},
           {metadata,[fool]},
           {level,warn}]}]}
].

If you don't want metadata, delete it.
The option {handle_otp_reports, false} prevents that otp reports will be logged twice.
Use Logger as usual.

You rock! :smile: :+1:


Move production BABEL_ENV to npm script

Sorry, this commit is wrong, because it will overwrite dev mode. (gulpfile.babel.js)
my bad :/

Thanks, @jhen0409. I've added you as a collaborator to the project if you don't mind.


Serve Intl for Blackberry Browser

Fixes #748.

Hi @ruiaraujo, thanks for this.  Can you follow the steps listed here to help us merge this?

@ruiaraujo Could you post a screenshot showing that the polyfill works on blackberry 6, 7, 8, 9 and 10 please? We don't have blackberry in our automated testing, it is one of the few which need to be tested manually.

I thought I had a Blackberry VM stashed in a old Linux PC, but it had been cleared already so I am closing this PR since I cannot test.


Upgrade skia-canvas to v1.0.2

See https://github.com/Loskir/styled-qr-code/issues/8.
Also updated package-lock.json according to current dependencies, because it was out of sync.

Thank you!


Profiles first commit that I'm sure is not fine

Open to recommendations/explanations plz, that's not that a lot and actually I planned to work from this as a basis heh

Uh, internal conflict


angular-cli feature breaks in conjunction with node feature

Hello,
When:

using both angular-cli and node features
if setting version of the node feature

The angular-cli script will run first and run its own nvm install script. Then, the node feature will run and update the default alias of node. This makes the installed angular-cli inaccessible in the container (by default).
Related/same issue: the angular-cli overlooks nvm installed node regardless of whether a the node feature was used for installation. Presumably because it's not using an interactive shell to check for node.

For anybody having this issue, my workaround is to install nvm/node and angular cli using a Dockerfile.

fixed in  00ec5c281f15c063fc00259aca89c32dc0842d4b


Add @polymerBehavior tags for docs and linting

Following the style guide this will make sure that properties and functions defined in the behaviors can be found by iron-component-page/hydrolysis and the polymer linter.
Fixes #31 and #47

LGTM, thanks for the PR!


Fix 316 - null array-valued attribute causes the compiler internal error

Fix #316
We were missing the 0xFFFFFFFF case indicating a "null" value for arrays

:shipit:


[QUESTION] No Upgrade available from 1.1.1 to 1.1.2

Question
Why can't I upgrade to Longhorn 1.1.2 through the UI? The upgrade-checker is enabled:

However there is no "Upgrade" button anywhere to be found :(
And the 1.1.2 Version also does not show up in the drop down:

Environment:

Longhorn version: 1.1.1
Kubernetes version: 1.20.8
Node config

OS type and version
CPU per node:
Memory per node:
Disk type
Network bandwidth and latency between the nodes:

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal):

Additional context
Add any other context about the problem here.

Apparently you have to upgrade your rancher installation to see the update in cluster explorer.

So this works only with Rancher 2.6.0 and upwards?

Also with the next release like 2.5.10
https://github.com/longhorn/longhorn/issues/2724#issuecomment-903849802

Ok, thank you very much!


Training BERT with Soft Labels

Hi. I need to train BERT using soft labels (e.g. class probabilities [0.4, 0.6]) instead of using hard labels (0 or 1). I need to do this in iterations where I predict logits for an unlabeled set and add these pseudo labels to the training set (which has soft labels) and again train another model. The second part is easy. However, I am not sure how to train BERT with soft labels on first hand.

Even your normal labels are converted to one hot vectors, instead of those one hot vectors use the probabilities.

You mean I can normally input probabilities instead of hard labels in my train.tsv and dev.tsv files and the program should be able to handle them?

No, that would not work, you need to change your code base to handle that, places like create_examples/anywhere else where a hard label is expected, change it to expect a vector instead.


Not working in Microsoft Edge

Was trying to see if I could get around the 404 by using Edge. None of the tools appear in the top bar. See screenshot.

Edge won't be formally supported until the next version is release (of Edge that is). Current Edge we can only do so much to make it mostly work (on the building side of HAXcms that is, viewing side it works though is watered down).  Microsoft is releasing a new version before the end of the year that reaches full compatibility on both viewing and creating side of haxcms


Improve error message if file is called map.tmx.

If the input file is map.tmx, a cryptic error is thrown later during compilation:
In file included from build/src/bntmx_maps_map.cpp:1:
build/include/bntmx_maps_map.h:10:24: error: invalid use of incomplete type 'class bntmx::maps::map'
   10 |     class map : public map
      |                        ^~~

I see no easy fix, so I chose to improve the error message to make it easier to fix for the caller.

Thanks for finding the issue, I pushed this fix instead, it's just a namespace resolution issue and there's no reason map.tmx shouldn't be valid. :)


zoomToDataExtend is broken

Commit: current dev branch
Steps to reproduce

Call hgApi.zoomToDataExtend()

Observed behavior

The viewport will be reset to the initial x and y domain

Expected behavior

The viewport should be set such that all of the data is visible

Should be fixed in v1.2.0.


Add documentation build to Travis CI verifications

Add documentation build to Travis CI
Description
Add the steps to build the documentation to the continuous integration in order to ensure that the documentation is being properly built with the CI verifications
Fixes #352
Type of change

[x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
The new CI configuration has been tested using Travis in a fork repository. This can be checked at:

https://travis-ci.org/Benardi/PyGrid/builds/597119615

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

No problem. Glad to help!


tests: add bug 1449 test

Was private at the time but no need to keep it private.
https://redmine.openinfosecfoundation.org/issues/1449

Merged in #1495, thanks!


⚠ Samsung has degraded performance

In 7fc54c3, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2589 ms

Resolved: Samsung performance has improved in 67aaf1c.


get the main game data for adding to db model of game

@chemeshuggah use json schema of apy (no need FULL SCHEMA!!! Is prototype)

[x] Game object

[x] Players

[x] player1, player2

[x] sides, cards, and other

[x] Game Turns

[x] Steps

[x] Graveyard (have 0 cards with new game)

current_game_data:
	id: int
	players:
		player:
			id: str
			has_priority: bool
			is_bot: bool
			score: int[0-100]
			faction: str['a', 'b']
			player_cards:
				agents_cards:
					winning_objective_cards: []
					agents_cards:
						agent:
							id: str
							is_dead: bool
							is_choosen: bool
							is_active: bool

					...
				group_cards:
					group_cards_deck_top:
						group_card:
							...
					group_card_in_play:
						group_card:
							...

			available_spetials: []
		player:
			...
	game_cards:
		objective_cards:
			objective_card_for_turn: str
			objective_deck_len: int
			objective_pile_len: int
			objective_pile:
			 	objective_card:
			 		-card data
			 	...
			objective_deck_top:
				objective_card:
			 		-card data
			 	...
		group_cards:
			group_cards_deck_len: int
			gtoup_cards_pile_len: int
			gtoup_cards_pile:
				group_card:
				...
	game_steps:
		turn_number: int[min=0]
		turn_phase: str

link

cards in db:

stoplight variant

todo:

[ ] add arrays to schema
[ ] add game_cards


Improve revision handling in the SyncFlows task

Feature description
@brian-mulier-p I checked the SyncFlows implementation again and we need to find a better solution for revision handling. At the moment, we display state OVERWRITTEN and revision 2 even though the synced flows haven't changed and have revision 1. This is not only confusing but also displaying revision 2 while flows have only a single revision is incorrect/misleading.

We should:

either find a better solution to read each flow, see what changed, and only if it changed show state OVERWRITTEN and increment its revision; sure, some race condition could happen that while you check subsequent flows, the previous flow might have changed, but this is an edge case we can deliberately take out of scope for now
or remove the revision property from the output (worst case, it would be better to have it; still, if we can't find a better revision handling, better to remove that from the output entirely)

Ofc it will take longer if we read the flow contents but optimizing the performance of this task is not an issue at this stage 👍

That's exactly what I wanted to showcase you while in huddle friday evening (or something). But sure we can read all files and be lazy about performance for now :+1:


use nn.Embedding() to handle emg_data

Will it be better when I use nn.Embedding(num_embeddings=256) to handle emg_data? Due to its range from [-128,127].
I use Pytorch to reproduce your project. However, my model's accuracy on val data is under 70%. If we directly use 8-dimensional sequence data, will the features be too singular? Here is my code, could you do me a favor to improve that val_result?
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 17:48:07 2024

@author: shrim
"""

import os
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from torch.utils.data import DataLoader, Dataset, TensorDataset, random_split
import torch.optim as optim
from torch.optim.lr_scheduler import ExponentialLR

#data = np.loadtxt(f"{root_path}/12345-1/2.txt", delimiter = ",")
def split_dataset(hand = 'R', train_ratio=0.8):
    #config = TUNADataset_config
    #npz_files = [f for f in os.listdir(config['npz_path']) if os.path.splitext(f)[-1]=='.npz']
    if hand.strip().upper() == 'R':
        root_path = 'myo-readings-dataset-main/_readings_right_hand'
    else:
        root_path = 'myo-readings-dataset-main/_readings_left_hand'
    folders = os.listdir(root_path)
    train_data_num =  int(round(len(folders)*train_ratio))
    val_data_num = len(folders) - train_data_num
    full_index = np.arange(len(folders))
    train_data_index = np.random.choice(full_index, size=train_data_num, replace=False)
    val_data_index = np.setdiff1d(full_index, train_data_index)
    return np.sort(train_data_index), np.sort(val_data_index)

class MyoEMGDataset(Dataset):
    def __init__(self, hand, folders_id):
        self.data = None
        self.label = None

        if hand.strip().upper() == 'R':
            root_path = 'myo-readings-dataset-main/_readings_right_hand'
        else:
            root_path = 'myo-readings-dataset-main/_readings_left_hand'

        folders = os.listdir(root_path)

        for f in folders_id:
            for i in os.listdir(root_path+os.sep+folders[f]):
                try:
                    txt = np.loadtxt(f"{root_path}/{folders[f]}/{i}", delimiter = ",")
                except:
                    print(f"Wrong! -> {folders[f]}/{i}")
                    continue
                data = torch.from_numpy(txt[:,:-1]+128).long()
                labels = torch.from_numpy(txt[:,-1]).long()
                if self.data is None:
                    self.data = data
                    self.labels = labels
                else:
                    self.data = torch.cat([self.data,data],dim = 0)
                    self.labels = torch.cat([self.labels,labels],dim = 0)
    def __len__(self):
        return len(self.data)

    def __getitem__(self, idx):
        # 获取数据和标签
        x = self.data[idx]
        y = self.labels[idx]
        return x, y

class MyoEMGNet(nn.Module):
    def __init__(self):
        super(MyoEMGNet, self).__init__()

        self.embedding = nn.Embedding(num_embeddings=256, embedding_dim=25)

        # First hidden layer
        self.fc1 = nn.Linear(25*8, 256)
        self.bn1 = nn.BatchNorm1d(256)
        self.relu1 = nn.PReLU()
        self.dropout1 = nn.Dropout(p=0.5)

        # Second hidden layer
        self.fc2 = nn.Linear(256, 128)
        self.bn2 = nn.BatchNorm1d(128)
        self.relu2 = nn.PReLU()
        self.dropout2 = nn.Dropout(p=0.5)

        # Third hidden layer
        self.fc3 = nn.Linear(128, 128)
        self.bn3 = nn.BatchNorm1d(128)
        self.relu3 = nn.PReLU()
        self.dropout3 = nn.Dropout(p=0.5)

        # Fourth hidden layer
        self.fc4 = nn.Linear(128, 64)
        self.bn4 = nn.BatchNorm1d(64)
        self.relu4 = nn.PReLU()
        self.dropout4 = nn.Dropout(p=0.5)

        # Fifth hidden layer
        self.fc5 = nn.Linear(64, 64)
        self.bn5 = nn.BatchNorm1d(64)
        self.relu5 = nn.PReLU()
        self.dropout5 = nn.Dropout(p=0.5)

        # Output layer
        self.fc6 = nn.Linear(64, 8)

    def forward(self, x):
        x = self.embedding(x)
        x = x.contiguous().view(x.size(0), -1)

        x = self.fc1(x)
        x = self.bn1(x)
        x = self.relu1(x)
        x = self.dropout1(x)

        x = self.fc2(x)
        x = self.bn2(x)
        x = self.relu2(x)
        x = self.dropout2(x)

        x = self.fc3(x)
        x = self.bn3(x)
        x = self.relu3(x)
        x = self.dropout3(x)

        x = self.fc4(x)
        x = self.bn4(x)
        x = self.relu4(x)
        x = self.dropout4(x)

        x = self.fc5(x)
        x = self.bn5(x)
        x = self.relu5(x)
        x = self.dropout5(x)

        x = self.fc6(x)
        return x

hand = 'L'

train_data_id, val_data_id = split_dataset(hand = hand , train_ratio=0.9)

train_dataset = MyoEMGDataset(hand = hand , folders_id = train_data_id)
val_dataset = MyoEMGDataset(hand = hand , folders_id = val_data_id)
#test_dataset = MyoEMGDataset(hand = 'R', folders_id = val_data_id[-1])

train_loader = DataLoader(train_dataset, batch_size=128, shuffle=True)
val_loader = DataLoader(val_dataset, batch_size=8, shuffle=False)
#test_loader = DataLoader(val_dataset, batch_size=1, shuffle=False)

num_epochs = 1000

criterion = nn.CrossEntropyLoss()
optimizer = optim.Adam(model.parameters(), lr=1e-3)
model = MyoEMGNet()
model.cuda()

for epoch in range(num_epochs):
    model.train()
    train_loss = 0.0
    for inputs, targets in train_loader:
        inputs, targets = inputs.cuda(), targets.cuda()
        optimizer.zero_grad()
        outputs = model(inputs)

        loss = criterion(outputs, targets)
        loss.backward()
        optimizer.step()

        train_loss += loss.item() * inputs.size(0)  # 累计损失

    train_loss /= len(train_loader.dataset)

    model.eval()
    val_loss = 0.0
    correct = 0
    total = 0
    with torch.no_grad():
        for val_inputs, val_targets in val_loader:
            val_inputs, val_targets = val_inputs.cuda(), val_targets.cuda()

            val_outputs = model(val_inputs)

            loss = criterion(val_outputs, val_targets)
            val_loss += loss.item() * val_inputs.size(0)  # 累计损失

            val_outputs = torch.softmax(val_outputs,dim = -1)
            _, predicted = torch.max(val_outputs, 1)

            correct += (predicted == val_targets).sum().item()
            total += val_targets.size(0)

    val_loss /= len(val_loader.dataset)
    val_accuracy = correct / total

    print(f'Epoch {epoch+1}/{num_epochs}, Train Loss: {train_loss:.4f}, Val Loss: {val_loss:.4f}, Val Accuracy: {val_accuracy * 100:.2f}%')

Whitout looking at the code so far: Are you using the curated sessions only to measure results? I'd recommend using a sliding window to preprocess the raw EMG datasamples using a filter of sorts. About 30-100 samples as filter size and using the root mean square (RMS) equation. Let me know how it goes or if you need additional help.

到目前为止，没有查看代码：您是否仅使用精选会话来衡量结果？我建议使用滑动窗口通过某种过滤器预处理原始 EMG 数据样本。大约 30-100 个样本作为过滤器大小并使用均方根 (RMS) 方程。让我知道进展如何或您是否需要其他帮助。

What do you mean by sliding window and RMS processing? Indeed, I think it's a problem with data preprocessing. When it's not 0.txt, I also loaded all the tags in. Is this incorrect?

I've jusr open sourced the solution in python if you need it: https://github.com/aljazfrancic/myo-keras/blob/master/myo-keras.ipynb

如果您需要，我刚刚在 Keras 中开源了解决方案：https://github.com/aljazfrancic/myo-keras/blob/master/myo-keras.ipynb其中也有 RMS 实现。

Many thanks，I will try. Will you use other model like LSTM, Transformer to predict the result？

No, a simple multilayer perceptron should suffice for this task I think.

I'm interested in your results and repo, if you are willing to share.

不，我认为一个简单的多层感知器就足以完成这项任务。

I just experimented with your algorithm in PyTorch. Its accuracy is around 80%, which is still a bit low. My scene is music interaction, so I want to achieve a higher accuracy to better control live sound effects, etc. Do you directly use the results of each judgment in actual engineering? For example, if I make a fist, do I need to collect data based on the window length? Is collecting once enough?

For real time control you will require a buffer (que) to store at least the window size of EMG samples. For example if you have window size 40 samples you would keep the last 40 EMG samples in your buffer and do the calculations of RMS on those. Then on next sample remove the oldest of 40 samples and add newest sample. For the first few moments when you don't have samples you can use whatever samples you have or skip this in training and evaluation.

对于实时控制，您将需要一个缓冲区 (que) 来存储至少 EMG 样本的窗口大小。例如，如果您的窗口大小为 40 个样本，您将在缓冲区中保留最后 40 个 EMG 样本，并对这些样本进行 RMS 计算。然后在下一个样本中移除 40 个样本中最旧的样本并添加最新样本。在您没有样本的最初几分钟内，您可以使用您拥有的任何样本，或者在训练和评估中跳过这一步。
I also consider it this way. For example, if my action frequency is 1 second, and the frequency of EMG is 200Hz, if I use 40 units as the window length, it is equivalent to sampling it 5 times. If the results are the same 5 times, it is best. If the results are different 5 times, take the result with the highest number of times. What do you think of this method?

Sounds good if you only need 1 action per second on your output.

为了实时控制，您将需要一个平面图（que）来存储至少 EMG 样本的窗口大小。例如，如果您的窗口大小为 40 个样本，您将在平面图中保留最后 40 个 EMG 样本，记录这些样本进行RMS计算。然后在下一个样本中移除40个样本中最旧的样本并添加最新样本。在您没有样本的四分之一内，您可以使用您拥有的任何样本，或者在训练和评估中跳过这一步。
我也是这么认为的。比如我的动作频率是1秒，肌电的频率是200Hz，如果我用40个单位作为窗口长度，相当于采样了5次。如果5次结果都一样的话最好。如果结果有5次不同，则取次数最多的结果。你觉得这个方法怎么样？

# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 17:48:07 2024

@author: shrim
"""

import os
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from torch.utils.data import DataLoader, Dataset, TensorDataset, random_split
import torch.optim as optim
from torch.optim.lr_scheduler import ExponentialLR

def split_dataset(hand = 'R', train_ratio=0.8):
    #config = TUNADataset_config
    #npz_files = [f for f in os.listdir(config['npz_path']) if os.path.splitext(f)[-1]=='.npz']
    if hand.strip().upper() == 'R':
        root_path = 'myo-readings-dataset-main/_readings_right_hand'
    else:
        root_path = 'myo-readings-dataset-main/_readings_left_hand'
    folders = os.listdir(root_path)
    train_data_num =  int(round(len(folders)*train_ratio))
    val_data_num = len(folders) - train_data_num
    full_index = np.arange(len(folders))
    train_data_index = np.random.choice(full_index, size=train_data_num, replace=False)
    val_data_index = np.setdiff1d(full_index, train_data_index)
    return np.sort(train_data_index), np.sort(val_data_index)

def pad_sequence_2d(sequence, timesteps = 30, reshape_3d = True):
    sequence = np.array(sequence)
    assert len(sequence.shape)==2
    padding_length = (sequence.shape[0]//timesteps + bool(sequence.shape[0]%timesteps))*timesteps
    num_rows_to_pad = padding_length - sequence.shape[0]
    # Padding to the size (padding_length, feature_nums)
    padding_sequence =  np.pad(sequence, ((0, num_rows_to_pad), (0, 0)), mode='constant', constant_values=0)
    # Reshape to (padding_length//timesteps, timesteps, feature_nums)
    if reshape_3d:
        feature_nums = sequence.shape[1]
        padding_sequence = padding_sequence.reshape(padding_length//timesteps, timesteps, feature_nums)

    return padding_sequence # (feature_nums, timesteps) or (padding_length//timesteps, timesteps, feature_nums)

def pad_sequence_1d(sequence, timesteps = 30, reshape_2d = True, padmode = 'tail'):
    sequence = np.array(sequence)
    assert len(sequence.shape)==1
    padding_length = (sequence.shape[0]//timesteps + bool(sequence.shape[0]%timesteps))*timesteps
    num_rows_to_pad = padding_length - sequence.shape[0]
    # Padding to the size (feature_nums,)
    if padmode == 'tail':
        padding_sequence = np.pad(sequence, (0, num_rows_to_pad), mode='constant', constant_values=0)
    elif  padmode == 'head':
        padding_sequence = np.pad(sequence, (num_rows_to_pad,0), mode='constant', constant_values=0)
    else:
        #sr = 44100
        #num_rows_to_pad_head = num_rows_to_pad//2//(sr//timesteps)
        num_rows_to_pad_head = num_rows_to_pad//2

        num_rows_to_pad_tail = num_rows_to_pad-num_rows_to_pad_head
        print('num_rows_to_pad_head',num_rows_to_pad_head)
        print('1:',num_rows_to_pad)
        padding_sequence = np.pad(sequence, (num_rows_to_pad_head, num_rows_to_pad_tail), mode='constant', constant_values=0)

    if reshape_2d:
        padding_sequence = padding_sequence.reshape(padding_sequence.shape[0]//timesteps, timesteps)
    return padding_sequence # (feature_nums, )

class MyoEMGDataset(Dataset):
    def __init__(self, hand, folders_id):
        self.data = None
        self.label = None

        if hand.strip().upper() == 'R':
            root_path = 'myo-readings-dataset-main/_readings_right_hand'
        else:
            root_path = 'myo-readings-dataset-main/_readings_left_hand'

        folders = os.listdir(root_path)

        for f in folders_id:
            for i in os.listdir(root_path+os.sep+folders[f]):
                try:
                    txt = np.loadtxt(f"{root_path}/{folders[f]}/{i}", delimiter = ",")
                except:
                    print(f"Wrong! -> {folders[f]}/{i}")
                    continue
                data = pad_sequence_2d(txt[:,:-1], timesteps = 50, reshape_3d = True)
                data = torch.from_numpy(data).float()
                labels =  pad_sequence_1d(txt[:,-1], timesteps = 50, reshape_2d = True)
                labels = torch.from_numpy(labels).long()
                if self.data is None:
                    self.data = data
                    self.labels = labels
                else:
                    self.data = torch.cat([self.data,data],dim = 0)
                    self.labels = torch.cat([self.labels,labels],dim = 0)
               # break
            # break
        #print(self.data)
    def __len__(self):
        return len(self.data)

    def __getitem__(self, idx):
        # 获取数据和标签
        x = self.data[idx]
        y = self.labels[idx]
        return x, y

class Encoder(nn.Module):
    def __init__(self, input_dim, hidden_dim, num_layers=1, bidirectional=False):
        super(Encoder, self).__init__()
        self.hidden_dim = hidden_dim
        self.num_layers = num_layers
        self.bidirectional = bidirectional
        timemodel_input_dim = 8

        #self.lstm = nn.LSTM(timemodel_input_dim*1, hidden_dim, num_layers, batch_first=True, bidirectional=bidirectional)
        self.gru = nn.GRU(timemodel_input_dim*1, hidden_dim, num_layers, batch_first=True, bidirectional=bidirectional)

    def forward(self, x):
        # Initialize hidden state and cell state for LSTM
        direction = 2 if self.bidirectional else 1
        h0 = torch.zeros(self.num_layers * direction, x.size(0), self.hidden_dim).to(x.device)
        #c0 = torch.zeros(self.num_layers * direction, x.size(0), self.hidden_dim).to(x.device)

        # Forward propagate LSTM/GRU
        #output, (hn, cn) = self.lstm(x, (h0, c0))
        output, hn = self.gru(x, h0)

        #output = self.fc(output)
        return x, output, hn#(hn, cn)

class Decoder(nn.Module):
    def __init__(self, output_dim, hidden_dim, num_layers=1, bidirectional=False):
        super(Decoder, self).__init__()

        self.hidden_dim = hidden_dim
        self.num_layers = num_layers
        self.bidirectional = bidirectional
        #self.attention = Attention(hidden_dim * (2 if bidirectional else 1))
        #self.lstm = nn.LSTM(hidden_dim + hidden_dim *bool(bidirectional), hidden_dim, num_layers, batch_first=True, bidirectional=bidirectional) #+256
        self.gru = nn.GRU(hidden_dim + hidden_dim * bool(bidirectional), hidden_dim, num_layers, batch_first=True, bidirectional=bidirectional)
        self.relu = nn.PReLU()
        self.fc = nn.Linear(hidden_dim * (2 if bidirectional else 1), output_dim)

    def forward(self, x, hidden):
        # Forward propagate LSTM/GRU
        output, hidden = self.gru(x, hidden)

        output = self.relu(x)
        # Decode the hidden state of the last time step
        output = self.fc(output)
        return output

class MyoEMGNet(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim, num_layers=1, bidirectional=False):
        super(MyoEMGNet, self).__init__()
        self.encoder = Encoder(input_dim, hidden_dim, num_layers, bidirectional)
        self.decoder = Decoder(output_dim, hidden_dim, num_layers, bidirectional)
        #self.dropout = nn.Dropout(0.8)

    def forward(self, x):
        x, encoder_output, hidden = self.encoder(x)
        output = self.decoder(encoder_output, hidden)

        return output

input_dim = 8
hidden_dim = 512  # 可以根据需要调整
output_dim = 8 # 多分类问题的类别数
num_layers = 2
bidirectional = True

hand = 'L'

model = MyoEMGNet(input_dim, hidden_dim, output_dim, num_layers, bidirectional)

train_data_id, val_data_id = split_dataset(hand = hand , train_ratio=0.8)

train_dataset = MyoEMGDataset(hand = hand , folders_id = [0,1,2,3,4,5,6,7])
val_dataset = MyoEMGDataset(hand = hand , folders_id = [8])

train_loader = DataLoader(train_dataset, batch_size=128, shuffle=True)
val_loader = DataLoader(val_dataset, batch_size=16, shuffle=False)

num_epochs = 1000

criterion = nn.CrossEntropyLoss()
optimizer = optim.Adam(model.parameters(), lr=1e-3)

for epoch in range(num_epochs):
    model.train()
    train_loss = 0.0
    for inputs, targets in train_loader:
        inputs, targets = inputs.cuda(), targets.cuda()
        optimizer.zero_grad()
        outputs = model(inputs)

        outputs = outputs.view(-1, output_dim)
        targets = targets.view(-1)

        loss = criterion(outputs, targets)
        loss.backward()
        optimizer.step()

        train_loss += loss.item() * inputs.size(0)  # 累计损失

    train_loss /= len(train_loader.dataset)

    model.eval()
    val_loss = 0.0
    correct = 0
    total = 0
    with torch.no_grad():
        for val_inputs, val_targets in val_loader:
            val_inputs, val_targets = val_inputs.cuda(), val_targets.cuda()

            val_outputs = model(val_inputs)

            val_outputs_ = val_outputs.view(-1, output_dim)
            val_targets_ = val_targets.view(-1)

            loss = criterion(val_outputs_, val_targets_)
            val_loss += loss.item() * val_inputs.size(0)  # 累计损失

            val_outputs = torch.softmax(val_outputs,dim = -1)
            val_outputs = val_outputs.view(-1, output_dim)
            val_targets = val_targets.view(-1)

            #print(val_outputs.shape)
            #print(val_targets.shape)
            _, predicted = torch.max(val_outputs, 1)

            correct += (predicted == val_targets).sum().item()
            total += val_targets.size(0)

    val_loss /= len(val_loader.dataset)
    val_accuracy = correct / total

    print(f'Epoch {epoch+1}/{num_epochs}, Train Loss: {train_loss:.4f}, Val Loss: {val_loss:.4f}, Val Accuracy: {val_accuracy * 100:.2f}%')

Here‘s my newest code. I am trying using sequence to sequence model to solve that problem.  And the following is my results of experiment. The highest accuracy is approximately 89% (overfitted).
 Therefore, it is necessary to take 4 results, and in the final generated sequence (batch size=1, timestep=50, features_num=8), select the index with the most occurrences as the prediction result. Take 4 consecutive times, and if they are consistent, perform the [index] action in that second. What do you think? Thank you for your continuous help and I hope to hear your suggestions!

Since you have 1 second of EMG, you could also have 1 second of RMS values. You are now only using 5 values out of 200 available, if I understand your method correctly. So maybe you could just check which class/gesture has the most classifications in 200 last samples of classification from RMS. Do you know what I mean? Another thing that I would like to point out that there is a difference between training and validation loss and accuracy. If You have 89 % accuracy on validation set that doesn't mean if was overfitting. That's a good result. Just make sure to always use the model from step that had the lowest validation loss. Nice results, BTW. I don't think its possible to push them much further due to the fact that recordings also include the areas of switching between gestures, and are by no means perfect.

I guess the idea is to low-pass filter both the input into the into the neural net (EMG → RMS) as well as the result you get from it (classification → mode of classification). I'd just use mode to calculate the resulting classification from last 200 samples of classification (the mode is the number that occurs most often in last second of classification).

Since you have 1 second of EMG, you could also have 1 second of RMS values. You are now only using 5 values out of 200 available, if I understand your method correctly. So maybe you could just check which class/gesture has the most classifications in 200 last samples of classification from RMS. Do you know what I mean? Another thing that I would like to point out that there is a difference between training and validation loss and accuracy. If You have 89 % accuracy on validation set that doesn't mean if was overfitting. That's a good result. Just make sure to always use the model from step that had the lowest validation loss. Nice results, BTW. I don't think its possible to push them much further due to the fact that recordings also include the areas of switching between gestures, and are by no means perfect.

It's not entirely like this. I split 200 output values (in 1 second) into every 50 values. When the number of output values is less than 50, I use a sequence (0,0,0,0,0,0,0,0) with a label of 0 to fill in and put it into the sequence model. Therefore, the output of one batch size will have 50 labels. Due to the use of cross entropy for multi classification in my training (unlike Keras), I need to reduce the dimensionality of the input sequence tensor from 3D to 2D and the labels from 2D to 1D. Therefore, the accuracy is based on the results of batch size * 50. In practical operation, batchsize=1, so there are both correct and incorrect situations in these labels. Setting aside the incorrect situations, there will also be 0 occurrences. Because the dataset is based on periodic collection, there are also events with a label of 0 occurring in addition to the text in 0.txt. But I think the result should approach the mode of 50 output results, so the mode can be taken as the result of 1/4 second. When the result is the same for four consecutive times, I think this action has occurred. Of course, the results obtained from the experiment are exciting and can serve as a reference, but currently I have not written test code or used the Myo ArmBand provided by my teacher for further verification.

Sounds good, I think I misunderstood a little what you are doing. Best
wishes!
On Sat, Oct 19, 2024, 13:28 shiyi099 @.***> wrote:

Since you have 1 second of EMG, you could also have 1 second of RMS
values. You are now only using 5 values out of 200 available, if I
understand your method correctly. So maybe you could just check which
class/gesture has the most classifications in 200 last samples of
classification from RMS. Do you know what I mean? Another thing that I
would like to point out that there is a difference between training and
validation loss and accuracy. If You have 89 % accuracy on validation set
that doesn't mean if was overfitting. That's a good result. Just make sure
to always use the model from step that had the lowest validation loss. Nice
results, BTW. I don't think its possible to push them much further due to
the fact that recordings also include the areas of switching between
gestures, and are by no means perfect.
It's not entirely like this. I split 200 output values (in 1 second) into
every 50 values. When the number of output values is less than 50, I use a
sequence (0,0,0,0,0,0,0,0) with a label of 0 to fill in and put it into the
sequence model. Therefore, the output of one batch size will have 50
labels. Due to the use of cross entropy for multi classification in my
training (unlike Keras), I need to reduce the dimensionality of the input
sequence tensor from 3D to 2D and the labels from 2D to 1D. Therefore, the
accuracy is based on the results of batch size * 50. In practical
operation, batchsize=1, so there are both correct and incorrect situations
in these labels. Setting aside the incorrect situations, there will also be
0 occurrences. Because the dataset is based on periodic collection, there
are also events with a label of 0 occurring in addition to the text in
0.txt. But I think the result should approach the mode of 50 output
results, so the mode can be taken as the result of 1/4 second. When the
result is the same for four consecutive times, I think this action has
occurred. Of course, the results obtained from the experiment are exciting
and can serve as a reference, but currently I have not written test code or
used the Myo ArmBand provided by my teacher for further verification.
—
Reply to this email directly, view it on GitHub
https://github.com/aljazfrancic/myo-readings-dataset/issues/55#issuecomment-2423774138,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEIL7DXXXFE36SK5YD5B62LZ4I653AVCNFSM6AAAAABQGGX4ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTG43TIMJTHA
.
You are receiving this because you commented.Message ID:
@.***>

I guess the idea is to low-pass filter both the input into the into the neural net (EMG → RMS) as well as the result you get from it (classification → mode of classification). I'd just use mode to calculate the resulting classification from last 200 samples of classification (the mode is the number that occurs most often in last second of classification).

I am a rookie in signal processing, lol
Yes, I understand your approach. The RMS algorithm is very clever, but it is difficult to extract very obvious features from signals with only 8 dimensions. Have you tried changing the RMS window length for multi-scale feature concatenation? This may require a longer sequence, for example, if the sequence length is 80, window lengths of 80, 40, and 20 can be taken. Or use other algorithms to extract features for stitching?

A particularly pleasant conversation, thank you for your patient response and assistance with the materials. I hope we can have almost cooperation in the future!

Sounds good, I think I misunderstood a little what you are doing. Best wishes!
…
On Sat, Oct 19, 2024, 13:28 shiyi099 @.> wrote: Since you have 1 second of EMG, you could also have 1 second of RMS values. You are now only using 5 values out of 200 available, if I understand your method correctly. So maybe you could just check which class/gesture has the most classifications in 200 last samples of classification from RMS. Do you know what I mean? Another thing that I would like to point out that there is a difference between training and validation loss and accuracy. If You have 89 % accuracy on validation set that doesn't mean if was overfitting. That's a good result. Just make sure to always use the model from step that had the lowest validation loss. Nice results, BTW. I don't think its possible to push them much further due to the fact that recordings also include the areas of switching between gestures, and are by no means perfect. It's not entirely like this. I split 200 output values (in 1 second) into every 50 values. When the number of output values is less than 50, I use a sequence (0,0,0,0,0,0,0,0) with a label of 0 to fill in and put it into the sequence model. Therefore, the output of one batch size will have 50 labels. Due to the use of cross entropy for multi classification in my training (unlike Keras), I need to reduce the dimensionality of the input sequence tensor from 3D to 2D and the labels from 2D to 1D. Therefore, the accuracy is based on the results of batch size * 50. In practical operation, batchsize=1, so there are both correct and incorrect situations in these labels. Setting aside the incorrect situations, there will also be 0 occurrences. Because the dataset is based on periodic collection, there are also events with a label of 0 occurring in addition to the text in 0.txt. But I think the result should approach the mode of 50 output results, so the mode can be taken as the result of 1/4 second. When the result is the same for four consecutive times, I think this action has occurred. Of course, the results obtained from the experiment are exciting and can serve as a reference, but currently I have not written test code or used the Myo ArmBand provided by my teacher for further verification. — Reply to this email directly, view it on GitHub <#55 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIL7DXXXFE36SK5YD5B62LZ4I653AVCNFSM6AAAAABQGGX4ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTG43TIMJTHA . You are receiving this because you commented.Message ID: @.>

Sounds good, I think I misunderstood a little what you are doing. Best wishes!
…
On Sat, Oct 19, 2024, 13:28 shiyi099 @.> wrote: Since you have 1 second of EMG, you could also have 1 second of RMS values. You are now only using 5 values out of 200 available, if I understand your method correctly. So maybe you could just check which class/gesture has the most classifications in 200 last samples of classification from RMS. Do you know what I mean? Another thing that I would like to point out that there is a difference between training and validation loss and accuracy. If You have 89 % accuracy on validation set that doesn't mean if was overfitting. That's a good result. Just make sure to always use the model from step that had the lowest validation loss. Nice results, BTW. I don't think its possible to push them much further due to the fact that recordings also include the areas of switching between gestures, and are by no means perfect. It's not entirely like this. I split 200 output values (in 1 second) into every 50 values. When the number of output values is less than 50, I use a sequence (0,0,0,0,0,0,0,0) with a label of 0 to fill in and put it into the sequence model. Therefore, the output of one batch size will have 50 labels. Due to the use of cross entropy for multi classification in my training (unlike Keras), I need to reduce the dimensionality of the input sequence tensor from 3D to 2D and the labels from 2D to 1D. Therefore, the accuracy is based on the results of batch size * 50. In practical operation, batchsize=1, so there are both correct and incorrect situations in these labels. Setting aside the incorrect situations, there will also be 0 occurrences. Because the dataset is based on periodic collection, there are also events with a label of 0 occurring in addition to the text in 0.txt. But I think the result should approach the mode of 50 output results, so the mode can be taken as the result of 1/4 second. When the result is the same for four consecutive times, I think this action has occurred. Of course, the results obtained from the experiment are exciting and can serve as a reference, but currently I have not written test code or used the Myo ArmBand provided by my teacher for further verification. — Reply to this email directly, view it on GitHub <#55 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIL7DXXXFE36SK5YD5B62LZ4I653AVCNFSM6AAAAABQGGX4ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTG43TIMJTHA . You are receiving this because you commented.Message ID: @.>

A particularly pleasant conversation, thank you for your patient response and assistance with the materials. I hope we can have almost cooperation in the future!

I guess the idea is to low-pass filter both the input into the into the neural net (EMG → RMS) as well as the result you get from it (classification → mode of classification). I'd just use mode to calculate the resulting classification from last 200 samples of classification (the mode is the number that occurs most often in last second of classification).

I am a rookie in signal processing, lol
Yes, I understand your approach. The RMS algorithm is very clever, but it is difficult to extract very obvious features from signals with only 8 dimensions. Have you tried changing the RMS window length for multi-scale feature concatenation? This may require a longer sequence, for example, if the sequence length is 80, window lengths of 80, 40, and 20 can be taken. Or use other algorithms to extract features for stitching?

We have tried both PCA and ICA for better feature extraction but alas at no benefit. The pipeline was: EMG, RMS, PCA/ICA, neural net inputs and outputs. We of course tried different window sizes for RMS. I think best value is between 30-80, depending on how fast you want feedback from your system. You can substitute RMS with simple addition of absolute values and that works too.

copy that. Many thanks！


Update the nvm itself

Hello, I am a user of this repository.
I found that nvm doesn't have update itself function, I think it's useful to be able to update itself.
Two functions related to this feature:

nvm update: to detect if a new nvm version can be installed.
nvm upgrade: to install the newest nvm version or specific version.

I wonder if nvm needs to support this feature or is already in development.
If the feature is needed and hasn't been developed yet, I hope I can contribute it.

Duplicate of #400.


Wrong link in Java/Hibernate hello work example

The link to "Install Client Drivers: Hibernate" here, should point to https://www.cockroachlabs.com/docs/v20.1/install-client-drivers#hibernate

That is the current link, but it's not working properly. @yingzhuchin, perhaps you can help figure out why.

That's because the "Hibernate" section is itself on a page identified via a URL fragment, namely https://www.cockroachlabs.com/docs/v20.1/install-client-drivers#java. So to link to Hibernate, you'd have to do https://www.cockroachlabs.com/docs/v20.1/install-client-drivers#java#hibernate, which is not supported. There can be only one anchor link per URL.

If we want to be able to link to "Hibernate," then we should consider making the "Java," "Go," "Ruby" etc. options their own pages with distinct URLs, the way options are done here: https://www.cockroachlabs.com/docs/v20.1/cockroach-cert

Thanks for looking into this, @yingzhuchin. Instead of breaking this page into many pages, perhaps we can just link to https://www.cockroachlabs.com/docs/v20.1/install-client-drivers.html#java, which filters the page to show just Java options. @ericharmeling, @vy-ton, would you be ok with that?


bottomless: ability to replicate using temporary credentials

This PR adds the functionality to use temporary credentials to backup the database to S3. The AWS_SESSION_TOKEN can be optionally passed in to use temporary credentials locally or in an environment like EC2/EKS where roles are attached to the instance.

@ryands17 could you please squash all commits into one? (we use merge queue, so I cannot do that from the PR)


Feature/filter metrics

This adds support for measuring time for the entire request processing, and the request and response filtering steps, in addition to the current measurement of the time used by the request method itself. In addition, support is added for letting users specify the clock to be used. This PR also includes a cherry-pick of randomstatic's thread-safe getters for metrics with custom instantiations from the 3.2 branch.
No extra metrics are added for methods with @Timed annotations that specify an explicit name, as it's not really clear what those extra metrics should be named, and it seems wrong to add attributes to the @Timed annotation for jersey-specific concepts. Ideas for how to add the extra metrics for explicitly named methods welcome!
Corresponding PR for 3.2: #1118

#1118 has been merged to 3.2. and will be included in the 4.0 release.


[Feature Request] Rename table to template name on import

Is your feature request related to a problem? Please describe.
I often load a template, then manually rename the table from the default title "NewTableX" to the name of the template.
Describe the solution you'd like
It would be convenient if it automatically renamed the table to the template name when loading a table from template.
Describe alternatives you've considered
Manually renaming is not a big deal, but I just find myself using the template name as table title most of the time, so it feels like it could be automated and save people some time.

Fair enough, perhaps only if the table name is still at the default? Offering a checkbox makes it the most explicit in terms of expectations, agreed.
Or perhaps instead of having it be a 2 step process of adding a new table followed by loading a template, make it a single action, "add table from template"?

Yeah the template add logic will soon receive a rework, partially based on how protocol import from files looks like:


Brief/long description documentation comments aren't working properly

Issue
It doesn't look nice but fixes the issue. Not sure if there are any side-effects I missed 🤔
Bugsquad edit: Fix #63032

Please amend the commit message so that it actually says what it does (e.g. make it match the PR title).

Thanks!


[FEATURE REQUEST] Add option per package to only skip minor versions

Please confirm these before moving forward.

[X] I have searched for my feature proposal and have not found a work-in-progress/duplicate/resolved/discarded issue.
[X] This proposal is a completely new feature. If you want to suggest an improvement or an enhancement, please use this template.

Describe the new feature
An option in the Software Updates view that lets users choose to skip minor versions of some packages.
Those packages don't show the latest update available if it's a minor version update. (just like Skip this version)
This feature could be even upgraded to support semantic versioning: MAJOR.MINOR.PATCH.BUILD
I would expect the context menu of a package to have an option to select which version levels are relevant to me.
Default would be BUILD which may confuse users, so maybe ALL?
Describe how this new feature could help users
This feature would solve an issue with packages that have daily or weekly updates available, that aren't relavant to some users.
Ignoring the package completely is not the best way to go here and skipping each version is still manual work.
So beeing able to select the level of version the user wants to stay current, is a fitting solution for this issue

My first thought was a custom ignored updates entry as mentioned in #2538, but I think this has a much higher chance of conflicting with a prior declaration than pausing an update does, so should this be an "installation option" in this part of the dialog?

I guess it makes more sense to have it on the "Installation Options menu"

Fine with me. As long as it's discoverable =]
Thanks for the consideration


Let start-react-app provide a simple cli for common tasks?

Inspired by motion. It's very handy that I can type things into npm start to do some common tasks. Vorpal seems like a great tool for this.
Tasks that i can think of:

o, open: open in browser
e, edit: open project root in an editor (atom? 😃)
v, verbose: show/hide all webpack logs

Feel free to ask me any questions on implementing Vorpal :+1: :

Thanks @dthree!

Closing for now as no specific proposals that seem worth implementing.


Support OPTIONS for CORS pre-flight.

OPTIONS requests return 405 method not allowed.

https://enable-cors.org


fprintd: 1.94.1 -> 1.94.2

Description of changes
There is no new release for libfprint yet. This update fixes build with meson 0.61 https://hydra.nixos.org/build/171137264
https://gitlab.freedesktop.org/libfprint/fprintd/-/compare/v1.94.1...v1.94.2
(Why is r-ryantm not trying to bump this? https://r.ryantm.com/log/repology/fprintd/2022-04-01.log, I think https://repology.org/project/fprintd/versions has the correct version info)
(I haven't checked fprintd-tod yet but it also does not build with meson 0.61)
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@ofborg build fprintd

@ofborg build fprintd
I think I will merge soon... Staging-next has been merged a few hours ago...
https://hydra.nixos.org/job/nixpkgs/staging-next/fprintd.aarch64-linux


Remove crypto dependency on secvarctl's generic functions

This pull request edits the crypto functions to not depend on secvarctls generic functions. Functions defined in generic.c are ease-of-use functions that simplify basic I/O tasks. Previously, functions in crypto used these generic functions to save some effort. With the recent goal to move these crypto functions into skiboot, we must remove this dependency. This PR removes all calls from the crypto functions to the generic functions.

I wonder if we should try and bundle together all the changes that are required to get the crypto abstraction layer to compile as part of skiboot, rather than go piecewise into secvarctl? Not wildly fussy though, if you or @erichte-ibm have strong feelings.

I think that is a good idea. When I am done getting this crypto stuff to work on SkiBoot, I will just copy it into secvarctl and commit.

I wonder if we should try and bundle together all the changes that are required to get the crypto abstraction layer to compile as part of skiboot, rather than go piecewise into secvarctl? Not wildly fussy though, if you or @erichte-ibm have strong feelings.

I think that is a good idea. When I am done getting this crypto stuff to work on SkiBoot, I will just copy it into secvarctl and commit.

Thirding this. I don't think it's a bad idea to keep the crypto abstraction in skiboot, in case we decide to switch to openssl (or some other library) in skiboot for some crazy reason. Ideally if libstb is to stand more on its own, then it'd make sense for it to be usable as part of skiboot OR secvarctl without any modification.

I should have possible made another pull request to redefine its scope but I felt lazy so hopefully this will do:
The new commits were all part of the effort to compile a skiboot branch with the crypto abstraction functions. This has been done here. Once I got skiboot to compile, with some edits to the crypto files, I have now copied those files back into secvarctl so that we are one step closer to submoduling.
Some interesting things came up in this porting-a-port process. Mainly, we now have 3 versions of both pkcs7_write.c and pkcs7.c. They both exist in skiboot, mbedtls PR's and secvarctl. I believe, as of this PR, all of the pkcs7_write.c are equivalent. But the pkcs7.c files all contain different functionalities and return codes. We should look to update these soon. Additionally, while adding crypto to skiboot, I realized we don't need any of the crypto_write... functions and therefore we do not need pkcs7_write.c in skiboot. I added it to the source tree but do not compile it.

Additionally, while adding crypto to skiboot, I realized we don't need any of the crypto_write... functions and therefore we do not need pkcs7_write.c in skiboot. I added it to the source tree but do not compile it.

Hmm, the main focus for NO_CRYPTO was probably for skiroot (not skiboot). Is there value in still having an actually fully NO_CRYPTO'd build? How much functionality is lost? Obviously we can't generate updates, but can we still enroll and display variables?
Either way, we shouldn't need to include pkcs7_write.c at all in skiboot, I'd #ifdef out any references to those functions in the other secvar/ctl code.

Is there value in still having an actually fully NO_CRYPTO'd build?
Because the macro name NO_CRYPTO implies there being no crypto functions, I have changed it to CRYPTO_READ_ONLY.  This is mainly because crypto library functions are still required for reading and updating secvars (things like mbedtls_x509_parse). I know this isn't exactly "crypto" but I think it makes more sense as CRYPTO_READ_ONLY. At this moment, CRYPTO_READ_ONLY completely #idfef's out all of secvarctl generate related code as well as all of the crypto functions that are specific to secvarctl generate . There was one final #ifdefing that occurs is edk2-svc-validate.c because it was using a  function in pkcs7_write.c (if CRYPTO_READ_ONLY then certificates can only be parsed in DER, input certs in PEM are not accepted). I think this makes sense, it has been some time since I examined the difference in executable size but I am not sure what else to remove.

Either way, we shouldn't need to include pkcs7_write.c at all in skiboot, I'd #ifdef out any references to those functions in the other secvar/ctl code.
I have removed pkcs7_write.c and reverted any changes made to libstb/crypto/pkcs7/ . Rebased and tested everything works fine with preprocessor directives factoring out unnecessary functions.

Rebased to match crypto files with most recent of those in my skiboot branch. The changes are limited to adding a preprocessor directive around #include pkcs7_write.h and fixing some whitespace in source code.

Mostly looks fine to me, going to defer to @daxtens 's judgement to merge as he still has the open changes requested.


Add entries query option in plugin configuration

Pull Request
Related issue
Fixes #536
Fixes #263
Fixes #85
What does this PR do?
A lot of users were asking for more control over what entries are indexed in Meilisearch and how.
For example:

the batch sizes which has a default value of 500.
the locale support to fetch all entries of every language

This PR adds a new setting entriesQuery that lets you set exactly how Meilisearch should fetch documents from your database. These options are provided directly by the findMany API of strapi (see doc).
Further explanation on how it works isn provided in the README of this PR.
❌ Breaking changes
The setting populateEntryRule in the plugin configuration is removed in favor of populate in entriesQuery.
PR checklist
Please check if your PR fulfills the following requirements:

[x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
[x] Have you read the contributing guidelines?
[x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

bors merge


{{ site_name }} is returning host name instead of site name

In customizing the Wagtail login page, I set up the following using {{ site_name }} as documented:
{% extends "wagtailadmin/login.html" %}
{% block branding_login %}Sign in to {{ site_name }}'s CMS{% endblock %}

I expected (and wanted) to see the site name on the login page, but instead it renders the host name.  Is this how it is supposed to behave?
Technical details

Python version: 3.6
Django version: 2.1.4
Wagtail version: 2.4
Browser version: Chrome 71

Digging a bit:
Wagtail subclasses the Django LoginView.
The django.contrib.auth.views.LoginView#get_context_data uses the get_current_site method from django.contrib.sites.shortcuts this is based on the Django sites framework.
We don't need the Django Site we need a Wagtail site. Something like:
wagtail.core.sites.get_site_for_hostname or wagtail.core.models.Page#get_site

Thank you.  I won't have time to do anything on this for at least several months so am hopeful someone else can pick up on this.