RecursionError when parsing graph-like data

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
Hi!
I'm using pydantic to parse graph-like data. In pydantic v1 this works fine, but when trying to upgrade to v2 I'm confronted with these RecursionErrors.
I can't really explain it better than the example code below!
Example Code
I've created a script to generate the test code in order to avoid a super long post here.
imports = """
from pydantic import BaseModel, Field
from typing import Union
"""
print(imports)

RECURSIVE_NR = 50

for i in range(RECURSIVE_NR):
     x = f"""
class NodeType{i}(BaseModel):
    attributes: "NodeType" = Field(...)
"""
     print(x)

print("NodeType = Union[")
for i in range(RECURSIVE_NR):
    print(f"    NodeType{i},")
print("]")

for i in range(RECURSIVE_NR):
    print(f"NodeType{i}.model_rebuild()")

then python create_test.py > test.py; python test.py.
For lower values of RECURSIVE_NR, there is no issue.
This example might look silly, but I tried to keep it as minimal as possible.
In reality we are using discriminators (Annotated[NodeType, Field(discriminator='type')]), but these do not seem to influence the RecursionErrors, so I left them out for simplicity.
Python, Pydantic & OS Version
pydantic version: 2.5.3
pydantic-core version: 2.14.6
pydantic-core build: profile=release pgo=true
install path: /home/peejai/miniconda3/envs/pyda2/lib/python3.11/site-packages/pydantic
python version: 3.11.4 (main, Jul  5 2023, 13:45:01) [GCC 11.2.0]
platform: Linux-6.2.0-39-generic-x86_64-with-glibc2.35
related packages: fastapi-0.103.1 pydantic-settings-2.0.3 mypy-1.3.0 typing_extensions-4.7.1

@PidgeyBE,
Thanks for reporting this, and thanks for providing code such that we can easily reproduce the error. Documenting here, I was able to reproduce the error, with this repeating message:
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 547, in <dictcomp>
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 898, in _generate_md_field_schema
    common_field = self._common_field_schema(name, field_info, decorators)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 1014, in _common_field_schema
    schema = self._apply_annotations(
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 1708, in _apply_annotations
    schema = get_inner_schema(source_type)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_schema_generation_shared.py", line 82, in __call__
    schema = self._handler(__source_type)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 1689, in inner_handler
    schema = self._generate_schema(obj)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 712, in _generate_schema
    schema = self._post_process_generated_schema(self._generate_schema_inner(obj))
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 739, in _generate_schema_inner
    return self.match_type(obj)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 822, in match_type
    return self._match_generic_type(obj, origin)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 846, in _match_generic_type
    return self._union_schema(obj)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 1084, in _union_schema
    choices.append(self.generate_schema(arg))
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 469, in generate_schema
    from_property = self._generate_schema_from_property(obj, obj)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 622, in _generate_schema_from_property
    schema = get_schema(
  File "/Users/programming/pydantic_work/pydantic/pydantic/main.py", line 579, in __get_pydantic_core_schema__
    return __handler(__source)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_schema_generation_shared.py", line 82, in __call__
    schema = self._handler(__source_type)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 712, in _generate_schema
    schema = self._post_process_generated_schema(self._generate_schema_inner(obj))
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 734, in _generate_schema_inner
    return self._model_schema(obj)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 547, in _model_schema
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 547, in <dictcomp>
    {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 898, in _generate_md_field_schema
    common_field = self._common_field_schema(name, field_info, decorators)
  File "/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py", line 982, in _common_field_schema
    from .. import AliasChoices, AliasPath
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/Users/programming/pydantic_work/pydantic/pydantic/__init__.py", line 381, in __getattr__
    module = import_module(module_name, package=package)
  File "/Users/programming/anaconda3/envs/pydantic_env/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1047, in _gcd_import
  File "<frozen importlib._bootstrap>", line 970, in _sanity_check
RecursionError: maximum recursion depth exceeded while calling a Python object

I just had a quick look, it seems that union triggers the _union_schema (which makes sense).
Here, _union_schema will try to generate the schema  of all member of the union type:
        for arg in args:             if arg is None or arg is _typing_extra.NoneType:                 nullable = True             else:                 choices.append(self.generate_schema(arg))
the generate_schema will add approximatily 19 items on the stacks frame each type it tries to resolve a type inside the Union.
What happens it the following flow during resolving the type of Union[T1, T2, Ti..., Tn]:
Take Ti, and generate the schema.
When generating the schema, if it was already generated we are fine,
Other way, we need to resolve the type inside Ti properties. So we add the 18 items on the stacks, and tries to resolve  Union[T1, T2, Ti..., Tn] again. We generate the schema up to Ti, but we need to generate the Ti+1 now.
This leads, in the proposed case to n*18 stack frame in the call stacks per item in the Union type, when all the type inside the union refers to the union. This get close to the default stack limit of python (1000 I guess ?) at 48 and crashes at 49.
I guess the resolution of a Union type should be avoided when it tries to resolve itself from one of it's type, so it will only loop once ?

What @Smixi is saying makes complete sense - there's no infinite recursion going on here (hence why it works for you with fewer members of the union), just that we really are hitting Python's default recursion limit.
The short term solution therefore is to add
import sys
sys.setrecursionlimit(10_000)

to your code, which does indeed prevent the error.
Long term, I think https://github.com/pydantic/pydantic-core/pull/1099 might help in both improving performance and avoid the recursion error by running the deeply recursive code in Rust where there isn't the same stack frame costs.

@PidgeyBE,
Hopefully this workaround for now helps you to move to V2. Let us know if you run into any other issues!

Even better fix for this - use a discriminator on the union, this both avoids the recursion error and will provide an up to 50x improvement in performance - Pydantic will be able to know which member of the union to do validation against, rather than having to try each one in turn.
I'm therefore closing this on the basis that "a union with 50+ members and no discriminator is not supported unless you want to edit the recursion limit".

Example with a discriminator
# import sys
# sys.setrecursionlimit(10_000)

from pydantic import BaseModel, Field
from typing import Union

from typing_extensions import Annotated, Literal

class NodeType0(BaseModel):
    type: Literal["0"]
    attributes: "NodeType"

class NodeType1(BaseModel):
    type: Literal["1"]
    attributes: "NodeType"

class NodeType2(BaseModel):
    type: Literal["2"]
    attributes: "NodeType"

class NodeType3(BaseModel):
    type: Literal["3"]
    attributes: "NodeType"

class NodeType4(BaseModel):
    type: Literal["4"]
    attributes: "NodeType"

class NodeType5(BaseModel):
    type: Literal["5"]
    attributes: "NodeType"

class NodeType6(BaseModel):
    type: Literal["6"]
    attributes: "NodeType"

class NodeType7(BaseModel):
    type: Literal["7"]
    attributes: "NodeType"

class NodeType8(BaseModel):
    type: Literal["8"]
    attributes: "NodeType"

class NodeType9(BaseModel):
    type: Literal["9"]
    attributes: "NodeType"

class NodeType10(BaseModel):
    type: Literal["10"]
    attributes: "NodeType"

class NodeType11(BaseModel):
    type: Literal["11"]
    attributes: "NodeType"

class NodeType12(BaseModel):
    type: Literal["12"]
    attributes: "NodeType"

class NodeType13(BaseModel):
    type: Literal["13"]
    attributes: "NodeType"

class NodeType14(BaseModel):
    type: Literal["14"]
    attributes: "NodeType"

class NodeType15(BaseModel):
    type: Literal["15"]
    attributes: "NodeType"

class NodeType16(BaseModel):
    type: Literal["16"]
    attributes: "NodeType"

class NodeType17(BaseModel):
    type: Literal["17"]
    attributes: "NodeType"

class NodeType18(BaseModel):
    type: Literal["18"]
    attributes: "NodeType"

class NodeType19(BaseModel):
    type: Literal["19"]
    attributes: "NodeType"

class NodeType20(BaseModel):
    type: Literal["20"]
    attributes: "NodeType"

class NodeType21(BaseModel):
    type: Literal["21"]
    attributes: "NodeType"

class NodeType22(BaseModel):
    type: Literal["22"]
    attributes: "NodeType"

class NodeType23(BaseModel):
    type: Literal["23"]
    attributes: "NodeType"

class NodeType24(BaseModel):
    type: Literal["24"]
    attributes: "NodeType"

class NodeType25(BaseModel):
    type: Literal["25"]
    attributes: "NodeType"

class NodeType26(BaseModel):
    type: Literal["26"]
    attributes: "NodeType"

class NodeType27(BaseModel):
    type: Literal["27"]
    attributes: "NodeType"

class NodeType28(BaseModel):
    type: Literal["28"]
    attributes: "NodeType"

class NodeType29(BaseModel):
    type: Literal["29"]
    attributes: "NodeType"

class NodeType30(BaseModel):
    type: Literal["30"]
    attributes: "NodeType"

class NodeType31(BaseModel):
    type: Literal["31"]
    attributes: "NodeType"

class NodeType32(BaseModel):
    type: Literal["32"]
    attributes: "NodeType"

class NodeType33(BaseModel):
    type: Literal["33"]
    attributes: "NodeType"

class NodeType34(BaseModel):
    type: Literal["34"]
    attributes: "NodeType"

class NodeType35(BaseModel):
    type: Literal["35"]
    attributes: "NodeType"

class NodeType36(BaseModel):
    type: Literal["36"]
    attributes: "NodeType"

class NodeType37(BaseModel):
    type: Literal["37"]
    attributes: "NodeType"

class NodeType38(BaseModel):
    type: Literal["38"]
    attributes: "NodeType"

class NodeType39(BaseModel):
    type: Literal["39"]
    attributes: "NodeType"

class NodeType40(BaseModel):
    type: Literal["40"]
    attributes: "NodeType"

class NodeType41(BaseModel):
    type: Literal["41"]
    attributes: "NodeType"

class NodeType42(BaseModel):
    type: Literal["42"]
    attributes: "NodeType"

class NodeType43(BaseModel):
    type: Literal["43"]
    attributes: "NodeType"

class NodeType44(BaseModel):
    type: Literal["44"]
    attributes: "NodeType"

class NodeType45(BaseModel):
    type: Literal["45"]
    attributes: "NodeType"

class NodeType46(BaseModel):
    type: Literal["46"]
    attributes: "NodeType"

class NodeType47(BaseModel):
    type: Literal["47"]
    attributes: "NodeType"

class NodeType48(BaseModel):
    type: Literal["48"]
    attributes: "NodeType"

class NodeType49(BaseModel):
    type: Literal["49"]
    attributes: "NodeType"

NodeType = Annotated[
    Union[
        NodeType0,
        NodeType1,
        NodeType2,
        NodeType3,
        NodeType4,
        NodeType5,
        NodeType6,
        NodeType7,
        NodeType8,
        NodeType9,
        NodeType10,
        NodeType11,
        NodeType12,
        NodeType13,
        NodeType14,
        NodeType15,
        NodeType16,
        NodeType17,
        NodeType18,
        NodeType19,
        NodeType20,
        NodeType21,
        NodeType22,
        NodeType23,
        NodeType24,
        NodeType25,
        NodeType26,
        NodeType27,
        NodeType28,
        NodeType29,
        NodeType30,
        NodeType31,
        NodeType32,
        NodeType33,
        NodeType34,
        NodeType35,
        NodeType36,
        NodeType37,
        NodeType38,
        NodeType39,
        NodeType40,
        NodeType41,
        NodeType42,
        NodeType43,
        NodeType44,
        NodeType45,
        NodeType46,
        NodeType47,
        NodeType48,
        NodeType49,
    ],
    Field(discriminator='type'),
]
NodeType0.model_rebuild()
NodeType1.model_rebuild()
NodeType2.model_rebuild()
NodeType3.model_rebuild()
NodeType4.model_rebuild()
NodeType5.model_rebuild()
NodeType6.model_rebuild()
NodeType7.model_rebuild()
NodeType8.model_rebuild()
NodeType9.model_rebuild()
NodeType10.model_rebuild()
NodeType11.model_rebuild()
NodeType12.model_rebuild()
NodeType13.model_rebuild()
NodeType14.model_rebuild()
NodeType15.model_rebuild()
NodeType16.model_rebuild()
NodeType17.model_rebuild()
NodeType18.model_rebuild()
NodeType19.model_rebuild()
NodeType20.model_rebuild()
NodeType21.model_rebuild()
NodeType22.model_rebuild()
NodeType23.model_rebuild()
NodeType24.model_rebuild()
NodeType25.model_rebuild()
NodeType26.model_rebuild()
NodeType27.model_rebuild()
NodeType28.model_rebuild()
NodeType29.model_rebuild()
NodeType30.model_rebuild()
NodeType31.model_rebuild()
NodeType32.model_rebuild()
NodeType33.model_rebuild()
NodeType34.model_rebuild()
NodeType35.model_rebuild()
NodeType36.model_rebuild()
NodeType37.model_rebuild()
NodeType38.model_rebuild()
NodeType39.model_rebuild()
NodeType40.model_rebuild()
NodeType41.model_rebuild()
NodeType42.model_rebuild()
NodeType43.model_rebuild()
NodeType44.model_rebuild()
NodeType45.model_rebuild()
NodeType46.model_rebuild()
NodeType47.model_rebuild()
NodeType48.model_rebuild()
NodeType49.model_rebuild()

Weird, I thought I saw the RecursionError stop with use of a discriminator, must have been my mistake.

Ye, I think the issue here is the slow building of core schema (not so much the recursion issue), which is a known issue.
I think https://github.com/pydantic/pydantic-core/pull/1099 could help a lot with this once we adopt the new pyo3 API. Beyond that, I also have some ideas on other ways to speed it up, but those will take longer to work on/adopt.

What about Smixi's proposal?

I guess the resolution of a Union type should be avoided when it tries to resolve itself from one of it's type, so it will only loop once ?

Or this one of the things that "will take longer to work on/adopt?"

PR welcome to try that. My guess is that given the complexity of the schema building logic, it will be very hard to be certain we're resolving all references - @adriangb @dmontagu who wrote a lot of this might think otherwise.
One advantage is that I think we have pretty thorough tests for this, so if you can get something to run and pass all tests, it has a decent chance of being correct.


Implement Frontend of Signup and Login Screen

Refer the readme of this repository and implement code of sign up and login screen.

can I do this

please let me work on this, i would appreciate if it could be assigned to me


Typo and Paste in blocks

Does this plug-in work with Kirby's text block? It doesn't seem to, but maybe I've not configured it correctly? Using the opt+T menu, I can't insert any characters into the text block, nor does the plugin seem to support adding a button to the text block's context menu that appears when the user highlights content within the block.

hey there,
you can add the button to a custom textblock like this:
fields:
  blocks:
    label: Blocks
    type: blocks
    fieldsets:
      custom:
        wysiwyg: true
        preview: text
        fields:
          text:
            type: writer
            label: Text
            toolbar:
              inline: true
              marks:
                - bold
                - italic
                - underline
                - strike
                - code
                - '|'
                - typo-and-paste

Add the moment, the plugin only adds the characters into your clipboard.

got it, thanks so much!


compatibility with rxjs v7

is this library still maintained? rxjs 7 has been out for a while and, currently, jest-marbles is not compatible with it.
any chances this library is going to be upgraded in the near future?

Done. New major version 3.x.x supports RxJs 7.

thanks!


Try to fix CI with conanfile.py

Picking only the changes related to the CI from here https://github.com/froglets/flappy-frog/pull/20

The error ERROR: Build-require 'automake' cannot be found in lockfile doesn't make any sense, since the package has been added to the lockfile:
Build requirements
    automake/1.16.4 from 'conancenter' - Downloaded

...and locally it works (I'll try with a clean cache)


Enforce scope claim via authorization bit mask

OAuth2 JWT Bearer tokens can include a scope claim, containing a list of authorized scopes.
These should be enforced by the authorization bit mask.

Fixed by #21.


Build error when compiling for Windows from Linux

Godot version: Git https://github.com/godotengine/godot/commit/bde3e884c7b1506dd74cb39ea479ea98dd04e7a1
OS/device including version: Fedora 28, GCC 8.1.1
Issue description:
Compiling for Windows from Linux using MinGW fails with the following error:
Compiling ==> modules/websocket/lws_client.cpp
modules/websocket/lws_client.cpp: In member function 'virtual Error LWSClient::connect_to_host(String, String, uint16_t, bool, PoolVector<String>)':
modules/websocket/lws_client.cpp:87:41: error: invalid conversion from 'const char*' to 'size_t {aka long long unsigned int}' [-fpermissive]
  strncpy(abuf, addr_str.ascii().get_data(), 1023);
                ~~~~~~~~~~~~~~~~~~~~~~~~~^~
modules/websocket/lws_client.cpp:87:49: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
  strncpy(abuf, addr_str.ascii().get_data(), 1023);
                                                 ^
modules/websocket/lws_client.cpp:87:49: error: too few arguments to function 'errno_t strncpy_s(char*, size_t, const char*, size_t)'
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:190:0,
                 from ./core/os/copymem.h:42,
                 from ./core/dvector.h:34,
                 from ./core/variant.h:41,
                 from ./core/method_ptrcall.h:36,
                 from ./core/method_bind.h:35,
                 from ./core/class_db.h:34,
                 from ./core/reference.h:34,
                 from ./core/io/stream_peer.h:34,
                 from modules/websocket/lws_helper.h:36,
                 from modules/websocket/lws_client.h:36,
                 from modules/websocket/lws_client.cpp:32:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/sec_api/string_s.h:39:27: note: declared here
   _CRTIMP errno_t __cdecl strncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
                           ^~~~~~~~~
modules/websocket/lws_client.cpp:89:38: error: invalid conversion from 'const char*' to 'size_t {aka long long unsigned int}' [-fpermissive]
  strncpy(hbuf, p_host.utf8().get_data(), 1023);
                ~~~~~~~~~~~~~~~~~~~~~~^~
modules/websocket/lws_client.cpp:89:46: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
  strncpy(hbuf, p_host.utf8().get_data(), 1023);
                                              ^
modules/websocket/lws_client.cpp:89:46: error: too few arguments to function 'errno_t strncpy_s(char*, size_t, const char*, size_t)'
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:190:0,
                 from ./core/os/copymem.h:42,
                 from ./core/dvector.h:34,
                 from ./core/variant.h:41,
                 from ./core/method_ptrcall.h:36,
                 from ./core/method_bind.h:35,
                 from ./core/class_db.h:34,
                 from ./core/reference.h:34,
                 from ./core/io/stream_peer.h:34,
                 from modules/websocket/lws_helper.h:36,
                 from modules/websocket/lws_client.h:36,
                 from modules/websocket/lws_client.cpp:32:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/sec_api/string_s.h:39:27: note: declared here
   _CRTIMP errno_t __cdecl strncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
                           ^~~~~~~~~
modules/websocket/lws_client.cpp:91:38: error: invalid conversion from 'const char*' to 'size_t {aka long long unsigned int}' [-fpermissive]
  strncpy(pbuf, p_path.utf8().get_data(), 2047);
                ~~~~~~~~~~~~~~~~~~~~~~^~
modules/websocket/lws_client.cpp:91:46: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
  strncpy(pbuf, p_path.utf8().get_data(), 2047);
                                              ^
modules/websocket/lws_client.cpp:91:46: error: too few arguments to function 'errno_t strncpy_s(char*, size_t, const char*, size_t)'
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:190:0,
                 from ./core/os/copymem.h:42,
                 from ./core/dvector.h:34,
                 from ./core/variant.h:41,
                 from ./core/method_ptrcall.h:36,
                 from ./core/method_bind.h:35,
                 from ./core/class_db.h:34,
                 from ./core/reference.h:34,
                 from ./core/io/stream_peer.h:34,
                 from modules/websocket/lws_helper.h:36,
                 from modules/websocket/lws_client.h:36,
                 from modules/websocket/lws_client.cpp:32:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/sec_api/string_s.h:39:27: note: declared here
   _CRTIMP errno_t __cdecl strncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
                           ^~~~~~~~~
scons: *** [modules/websocket/lws_client.windows.opt.tools.64.o] Error 1
scons: building terminated because of errors.

Full build log on GitLab CI
This is likely a regression from https://github.com/godotengine/godot/commit/b902a2f2a7438810cdcb053568ed5c27089b1e8a.

CC @dualtagh @Faless

Any progress? Builds have been broken for 2 days.

A quick fix would likely be to remove defined(MINGW_ENABLED) ||  in the offending file.

Trying
#if !defined(MINGW_ENABLED) && defined(_MSC_VER)
#define strncpy strncpy_s
#endif


FP - 'Dockerfile' contains the 'chown' flag'

Expected Behavior
Kics should not report a "The 'Dockerfile' contains the 'chown' flag'" vulnerability if the chown flag is used in the regular
"COPY --chown=node . $WORKDIR" that is a standard command: https://docs.docker.com/engine/reference/builder/#copy
Steps to Reproduce the Problem
Please scan https://github.com/OWASP/NodeGoat with kics
Thanks !

Hi @fredericmalo, I will update the query description so it is more clear, Thank you!


add get_info, enhance load, remove normalization option to load

I enhanced the load function to allow specifying an offset and number of desired frames, so that you can load just part of a long file.  I also added a get_info convenience function since you often will need to know the length of the audio before reading it with an offset.  I also made an incompatible API change by removing the normalization option from load and just making the normalization=True behavior the default.  I think this is more intuitive since the terminology "normalization" is a little weird for a simple rescaling, and other libraries like librosa just return audio in [-1,1], and it is simple for the user to rescale it to another interval if desired.
Further enhancements could try to make the functions work as similarly to possible to librosa, for instance one discrepancy currently I believe is that librosa will produce 1d tensors for mono (and also supports a "mono" option that monoizes the audio).
However, one bad thing about librosa is it requires you to specify offset and amount of audio to read in seconds, which could lead to rounding issues.  I think it is better to specify this info in frames.  (By the way, I'm not sure if "frame" is the best terminology.  What do you call the thing that a CD has 44,100 of per second?  I am saying "frames".  You could also say "samples", but arguably it has twice that many samples because of stereo.)

One issue I just realized with my PR is that currently the library claims to support non-floating point tensors in some form, but I guess removing the option to not do normalization will break that.  On the other hand, do these non-floating point tensor versions of the load function even work correctly now?  They are not tested, and it wouldn't surprise me if no one uses them.  I don't really understand how these generic tensor macros work, but currently the 32 bit integers returned by sox are cast to "real" in libthsox_(read_audio), and I wonder if this will really work for non-floating point (especially less than 32 bits).  Possibly the non-floating point versions should just be removed unless someone is willing to think a bit about how they should work.
Also, it would be logical to move normalization to C and just do it in the initial loop copying from the sox buffer to the tensor, although it might not give a noticeable speedup since the normalization  operation should already be pretty fast.

It looks like there are some conflicts now that would have to be resolved before this pull request could be merged, but what in general is holding it up?  Loading just a small piece of an audio file is much faster with this patch than with librosa or (even slower) loading the whole file with sox and then just taking what you need.

See https://github.com/pytorch/audio/blob/master/torchaudio/torch_sox.cpp and https://github.com/pytorch/audio/blob/master/torchaudio/torch_sox.h , they are the only C++ files in the repo now.

@dhpollack has rewrote and merged in #59


chore(main): release 1.1.0

:robot: I have created a release beep boop
1.1.0 (2022-04-19)
Features

Add sign-up page (#5) (ba49d82)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/Gibby/ferdium-server/releases/tag/v1.1.0 :sunflower:


Create a collection of HY_Catchment objects to iterate through in the driver instead of formulation objects

The driver currently builds up a collection of catchment features, builds up a collection of formulations based on those catchments, then iterates upon those formulations to generate their results. Instead, HY_Catchment objects should be created from the get-go and those should be iterated through since they all contain the formulations needed.
This can be found around lines 169 and 174 of ngen.cpp.

With that in place, there should be 1-1 correspondence between hydrofabric catchment graph and the formulation manager, then we  could iterate the features and access the relevant HY_Catchment/Formulation via the fomulation manger get_formulation(std::string id).  This isn't as direct, but gets closer.  This might actually be useful to maintain some differentiation between the topology and the implementation of fomulations.


goggle meet url not opening

when i am clicking googlemeet url inside the webview thats not opening.
When i am upload image also not working,

To manage URLs with custom schemas, you need to implement your specific logic by yourself, for example, implementing the shouldOverrideUrlLoading event.
For example, using it with the url_launcher plugin:
shouldOverrideUrlLoading: (controller, navigationAction) async {
  var uri = navigationAction.request.url!;

  if (![
    "http",
    "https",
    "file",
    "chrome",
    "data",
    "javascript",
    "about"
  ].contains(uri.scheme)) {
    if (await canLaunch(url)) {
      // Launch the App
      await launch(
        url,
      );
      // and cancel the request
      return NavigationActionPolicy.CANCEL;
    }
  }

  return NavigationActionPolicy.ALLOW;
}


Akka dependency unified

LGTM. It is important to test this change against YARN and Mesos since they provided an Akka dependency

:shipit:

A job will handle this PR ASAP on Jenkins

Rebase && testing in progress

Coverage remained the same at 53.365% when pulling 16c648f21b09e0726e0b36b6db3ba3bd625775a1 on compae:bug/akka-dependency into a58c9a463e6bc325e2b551871fc4c919ccc61978 on Stratio:master.

A job will handle this PR ASAP on Jenkins

Rebase && testing in progress


flip sides source and target when we check signature relations

and report errors during contravariant check. This is partial rollback of 5e69332cdadc6e3922df2cef89069180fbe87e22 that introduced perf regressions #7293, #7082.
Note: errors in baselines has changed but personally I like new errors more since they more accurately reflect runtime behavior. I.e.
let a: (s: string) => void;
let b: (s: number) => void;
a = b;
// a("42");

used to be
t.ts(3,1): error TS2322: Type '(s: number) => void' is not assignable to type '(s: string) => void'.
  Types of parameters 's' and 's' are incompatible.
    Type 'number' is not assignable to type 'string'.

now
t.ts(3,1): error TS2322: Type '(s: number) => void' is not assignable to type '(s: string) => void'.
  Types of parameters 's' and 's' are incompatible.
    Type 'string' is not assignable to type 'number'.

In runtime a will have argument of type string that is not assignable to type number that is expected by b and this is exactly what is said in new error message.

:+1:

:+1:

:+1:


-webkit-details-marker is deprecated

[Deprecation] ::-webkit-details-marker pseudo element selector is deprecated. Please use ::marker instead
I've got this warning when using google chrome (version 89). I see halfmoon put below code. I don't know whether this change will affect a lot or not in the future.
.collapse-header::-webkit-details-marker {
    /* Chrome */
    display: none;
}

see: https://github.com/GoogleChrome/lighthouse/issues/12089


Need to get output in csv fromat without html tags embedded in it.

how can i get csv file as an output? just by giving output file  as .csv file?
i tried it by giving like that and getting even html cells like tr,td in the csv file.
how can i avoid getting those in the csv file?

needed the same thing, added support for -csv option which toggles csv output instead of html.
See commit 309428e3c7aea7be43c584487461569908efc7d5


Formik Components

Just some examples of components we can use :)

Looks good, I added a quick readme but any additional documentation you want to add would be great. I'm gonna merge it in for now.

Looks good, I added a quick readme but any additional documentation you want to add would be great. I'm gonna merge it in for now.


Show all workspaces, different color

Is it possible to show all workspaces, but those workspaces with no activity on them to be gray or with customizable color  ?

Yeah never mind, I realized later that's not possible.


App Insights data plane metrics, events, query

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[x] My extension description/summary conforms to the Extension Summary Guidelines.

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/alexeldeib/azure-cli-extensions.git@ai#subdirectory=src/$EXT&egg=$EXT"

Hi! One thing I couldn't figure out, was how to actually run tests? I must have done it before for log-analytics but I'm struggling now? I created a venv after cloning the repo, ran dev_setup.py, and tried invoke azdev test with various file/class names corresponding to the test I included. Any insights to what I'm missing?

Seems like CI is upset about the metadata configuration containing azext.isPreview: true, but I see this in all of the other extensions? I copied the config from another cmdlet, any insights to what is wrong with the index here?

Thanks @williexu! I added it to the file, but seems like the same issue?

Did you generate a new whl and reupload/update the index?

@williexu That was part of it, but I still can't seem to get the index to validate? I tried a few more times, I'm pretty confident I've built it with the metadata, uploaded the new whl file, and synced the hash.

@williexu just bumping this after the weekend -- let me know if I should fix the tests to pass in py 2.7 or if this is good to go. I guess I happened to use a 3+ specific type check.

@alexeldeib Yes, please try to fix the CI to pass for 2.7.

@williexu is there a way to override help generation for only a single parameter? I want to change app-id, event-id, metric-id to app, event, and metric, but these are all non-customized commands. When I change from g.command() to g.custom_command(), I lose all of the automatic help generation from the SDK. Otherwise, I can copy the help from the existing params into _help.py

And also, is there a way to access the cli_ctx inside a custom_command? I'm working around the GUID issue by doing the below on invocation, where cf_components is the management plane SDK.
I am not sure how to access cli_ctx from the custom.py (the chain between user executing commands and invocation of custom functions is not clear to me).
def get_id_from_azure_resource(cli_ctx, app):
    if is_valid_resource_id(app):
        resource_group, name = parse_resource_id["resource_group"], parse_resource_id["name"]
        return cf_components(cli_ctx, _).get(resource_group, name)["app_id"]
    return app

One more tangential question: azdev test azext_applicationinsights --live seems to always output the ouput to my ~/.azure/cliextension? No related env vars set as far as I can tell. Is this a matter of pip installing the extension elsewhere when I run the tests?

@alexeldeib glad you were able to figure it out :)
As for the question about azdev test, I'll have to look into that, ideally, the recordings should output in the same folder as where you set AZURE_EXTENSION_DIR

For --app on query command, here's what I did. A user can provide any of the following:
Single application:
-a 578f0e27-12e9-4631-bc02-50b965da2633
--app 578f0e27-12e9-4631-bc02-50b965da2633
--apps ace-test -g ace-test
--ids /subscriptions/b98981de-4152-480f-a515-59b099299283/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test
A list of mixed GUID/Azure resource ID:
--app 578f0e27-12e9-4631-bc02-50b965da2633 /subscriptions/b98981de-4152-480f-a515-59b099299283/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test
A list of only Azure resource IDs, via the --ids parameter:
--ids /subscriptions/b98981de-4152-480f-a515-59b099299283/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test /subscriptions/b98981de-4152-480f-a515-59b099299283/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test
And lastly, using an RG with a component name restricts you to querying a single resource (no lists):
--apps ace-test 578f0e27-12e9-4631-bc02-50b965da2633 -g ace-test --> doesn't work
I removed the separate parameter for extra apps.

Ran into a few more minor issues 🙁 This subscription can't be found in CI build, but copy-pasting the failed command works for me. Live tests too: https://travis-ci.org/Azure/azure-cli-extensions/jobs/451772284#L926
Any tips?

And for events list, can I disable the no_ids_for_list_commands lint rule? I think the use case makes sense? If disabling it is fine, how can I do so? I saw examples in the main CLI repo but couldn't find an extension with the same.

@alexeldeib what is the status of this PR?

@williexu pinged you offline with further details. I'll fix outstanding comments here and merge from master. Also will be working to complete control plane CLI -- let me know if you'd like me to roll that in as an extension or add it to the core module.

@williexu One remaining CI error and pending question about start/end/interval time format.
This CI error seems erroneous? The quotation is inded closed.
-  FAIL: faulty_help_example_parameters_rule
    Help-Entry: `monitor app-insights query` -
	There is a violation:
	"az monitor app-insights query --app e292531c-eb03-4079-9bb0-fe6b56b99f8b --analytics-query 'requests"
	has no closing quotation. Tip: to continue an example command on the next line, use a "\" followed by a newline.
	If needed, you can escape the "\", like so "\\".

@adewaleo I believe your linter rule caught something it shouldn't have.

@alexeldeib I should have this fixed by the end of today. Hopefully earlier.

@williexu I also played a bit further with get_datetime_type() -- I think I understand how this works, except it seems like % characters are double encoded? Is this bug on our end or in SDK? Not sure what the expected result is here:
timespan=2018-02-28T10:30:00-08:00/2018-02-28T10:30:00-08:0 # plaintext
timespan=2018-02-28T10%253A30%253A00-08%253A00%252F2018-02-28T11%253A30%253A00-08%253A00 # cli produces (accepted by other monitor commands)
timespan=2018-02-28T10%3A30%3A00-08%3A00%2F2018-02-28T10%3A35%3A00-08%3A00 (what we accept)

I did some testing via other tooling for urlencode/decode to test -- e.g. : should encode to %3A but it encodes to %253A which would be urlencoded %3A? Seems like python agrees:
>>> urllib.parse.quote(':',safe='')
'%3A'

And here's the code that does that: https://github.com/Azure/msrest-for-python/blob/master/msrest/serialization.py#L628
Am I missing something? Other commands seem to have used this without issue

@alexeldeib I am still on the linter issue, but should be done soon (one or two working days). Here is the PR.

@alexeldeib, @williexu, the issue has been fixed.

@alexeldeib in response to your datetime question:
Unless I'm missing something, get_datetime_type() doesn't do any url query serialization, it simply takes your datetime string and returns a iso-formatted string: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/commands/parameters.py#L37-L85
In regards to @tjprescott 's comment before, it would be nice if your commands followed:
Time Arguments
    --end-time            : End time of the query. Defaults to the current time. Format: date (yyyy-
                            mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm).
    --interval            : The interval over which to aggregate metrics, in ##h##m format.
                            Default: 1m.
    --offset              : Time offset of the query range, in ##d##h format.  Default: 1h.
        Can be used with either --start-time or --end-time. If used with --start-time, then the end
        time will be calculated by adding the offset. If used with --end-time (default), then the
        start time will be calculated by subtracting the offset. If --start-time and --end-time are
        provided, then --offset will be ignored.
    --start-time          : Start time of the query. Format: date (yyyy-mm-dd) time (hh:mm:ss.xxxxx)
                            timezone (+/-hh:mm).

(Taken from az monitor metrics list)

@williexu Found the issue, I copied monitor metrics a little too closely (quote_plus).
That solved my issue. I did also notice, the time parsing does not seem to accept negative TZ offsets, e.g. I think these should be the same, but aren't:
--start-time 2019-03-05 15:00:00        --end-time 2019-03-05 15:35:00        # when executed from local TZ -08:00 (Redmond)
--start-time 2019-03-05 23:00:00 -08:00 --end-time 2019-03-05 23:35:00 -08:00 # manually provide offset from UTC

I was thinking this line should be parser.isoparse rather than parser.parse, but not 100%.
Anyway...I think that's everything

@alexeldeib
the timezone offsets look fine to me. the code essentially does:
>>> dateutil.parser.parse("2019-03-05 15:00:00 -8:00").isoformat()
'2019-03-05T15:00:00-08:00'
>>> dateutil.parser.parse("2019-03-05 15:00:00 +8:00").isoformat()
'2019-03-05T15:00:00+08:00'

@tjprescott can you re-review?

Thanks for the hard work @alexeldeib!


Fix how warnings/errors are displayed to avoid a crash

The code linked to in https://github.com/FuelLabs/sway/issues/2240 crashes with the following panic:
thread 'main' panicked at 'SourceAnnotation range `(92, 1272)` is bigger than source length `1268`', /Users/mohammad/.cargo/registry/src/github.com-1ecc6299db9ec823/annotate-snippets-0.9.1/src/display_list/from_snippet.rs:286:9

from https://github.com/rust-lang/annotate-snippets-rs/blob/448b80421b5a9c39c3ed1a708636014aec82eac1/src/display_list/from_snippet.rs#L287
This wasn't happening in 0.17.0 because the problematic warning was dropped in DCA but now shows up due to https://github.com/FuelLabs/sway/pull/2230.
The requirement is here is that the length of input is at least as big as *end_ix.
With this change, the problematic warning shows up as intended:

Honestly, I'm not 100% sure that this is the best way to fix this. I don't fully understand how construct_window() works 🤔 . Soliciting help if someone has a better idea.

Hm, so in this case, after DCA, we essentially remove any warnings that have spans that  got eliminated? Or, shorten any spans that have regions which got eliminated?
I'm not sure this is the best way forward. Ideally, we can perform DCA maybe after rendering warnings, so they're not lost based on the result of optimizations. Compile errors and warnings are effectively outputs of the compiler, and optimizations should not cause them to get malformed or omitted.

Hm, so in this case, after DCA, we essentially remove any warnings that have spans that  got eliminated? Or, shorten any spans that have regions which got eliminated?
I'm not sure this is the best way forward. Ideally, we can perform DCA maybe after rendering warnings, so they're not lost based on the result of optimizations. Compile errors and warnings are effectively outputs of the compiler, and optimizations should not cause them to get malformed or omitted.

I agree that something fishy is going on. I don't know that the warning and its span have been modified... it's just that in this file, we construct a window into the code (input) based on the span and display that but this is a case where the calculations were a bit off. This particular warning is from DCA before any optimizations happen. Do you think there is something wrong with the formation of the warning itself? Or do you think the problem is in construct_window? My fix to construct_windows is a bit of a bandaid fix.


Build w/FIPS Support

Issue:

Problem

Solution

Adds the ability to manipulate the binary names for the server and the agent as well as adds the ability to update the build image used.
Testing

Engineering Testing
Manual Testing

Automated Testing

QA Testing Considerations

Regressions Considerations

Is there any docs for how we build for FIPS so I can check if this is in line? Besides that change I think it is just formatting? Is this for 2.6.8/2.7.0?

Not meant for any coming releases specifically. As for building with FIPS, this will be a requirement later after the "plus" stuff goes out. As for how it'd work, it'll be the exact same as how we do RKE2.  https://docs.rke2.io/security/fips_support/#use-of-fips-compatible-go-compiler

Hi @briandowns what is the status of this PR, please? Can we go ahead and review it?


[8.x] Allow nullable columns for AsArrayObject/AsCollection casts

When using either of these casts and allowing the column to be null it throws an undefined error whenever you access the attribute.
This fixes that issue.

Hi @tomirons and @taylorotwell 🙌
I just updated one of my apps and this is a breaking change for me.
I have a user table with JSON settings column which is null by default:
Usage like this is no longer working:
auth()->user()->settings->get('mode', false);
auth()->user()->settings->put('hide_price', $state);

This now results in:
Call to a member function get() on null
Call to a member function put() on null

I think I can fix it by making the default column value {}. But again this might break applications who expected to always get a collection by default.

@PhiloNL this PR allows you to have null for these casts. It's up to you how the data is structured.


fix: Add secret for wait-for-mariadb container in maxscale

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


Pusher

In the application.yml the following data is put
PUSHER_APP: xxxxx
PUSHER_KEY: xxxxxx
PUSHER_SECRET: xxxxxx
PUSHER_HOST: api.pusherapp.com
PUSHER_PORT: 80
But in the page of pusher there is an extra data
Cluster = "us2"
Where is it placed?

I already got the solution thanks

you can skip this setting in some cases.

If but I really failed the Pusher and I never connect, muhammed told me by mail that it is configured on host as api-us2.pusher.com.

as I see there is no cluster preference in source code of peatio. so it (pusher protocol) uses default cluster if cluster isn't defined.

Then when you change the configuration to api-us2.pusher.com. That's when I really worked

I think this address is default api address for chosen pusher zone (zone defines a cluster). that is why it works.

hello, i changed yml files. but it is not working. can i more modify code for pusher?
PUSHER_HOST: api-ap1.pusher.com


Cant Bringup turtlebot3 on VirtualBox

ISSUE TEMPLATE ver. 0.4.0

Which TurtleBot3 platform do you use?

[ ] Burger
[ ] Waffle
[ X] Waffle Pi

Which ROS is working with TurtleBot3?

[ X] ROS 1 Kinetic Kame
[ ] ROS 1 Melodic Morenia
[ ] ROS 1 Noetic Ninjemys
[ ] ROS 2 Dashing Diademata
[ ] ROS 2 Eloquent Elusor
[ ] ROS 2 Foxy Fitzroy
[ ] etc (Please specify your ROS Version here)

Which SBC(Single Board Computer) is working on TurtleBot3?

[ ] Intel Joule 570x
[X ] Raspberry Pi 3B+
[ ] Raspberry Pi 4
[ ] etc (Please specify your SBC here)

Which OS you installed on SBC?

[ ] Raspbian distributed by ROBOTIS
[ X] Ubuntu MATE (16.04/18.04/20.04)
[ ] Ubuntu preinstalled server (18.04/20.04)
[ ] etc (Please specify your OS here)

Which OS you installed on Remote PC?

[X ] Ubuntu 16.04 LTS (Xenial Xerus)
[ ] Ubuntu 18.04 LTS (Bionic Beaver)
[ ] Ubuntu 20.04 LTS (Focal Fossa)
[ ] Windows 10
[ ] MAC OS X (Specify version)
[ ] etc (Please specify your OS here)

Specify the software and firmware version(Can be found from Bringup messages)

Software version: [x.x.x]
Firmware version: [x.x.x]

Specify the commands or instructions to reproduce the issue.

roslaunch turtlebot3_bringup turtlebot3_robot.launch

Copy and Paste the error messages on terminal.

ido@ido-VirtualBox:~$ roslaunch turtlebot3_bringup turtlebot3_robot.launch
... logging to /home/ido/.ros/log/476cb566-fda9-11eb-9dff-0800277fefa9/roslaunch-ido-VirtualBox-28319.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://<IP_ADDRESS>:46783/
SUMMARY
PARAMETERS

/rosdistro: kinetic
/rosversion: 1.12.17
/turtlebot3_core/baud: 115200
/turtlebot3_core/port: /dev/ttyACM0
/turtlebot3_core/tf_prefix:
/turtlebot3_lds/frame_id: base_scan
/turtlebot3_lds/port: /dev/ttyUSB0

NODES
/
turtlebot3_core (rosserial_python/serial_node.py)
turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics)
turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher)
ROS_MASTER_URI=http://<IP_ADDRESS>:11311
process[turtlebot3_core-1]: started with pid [28336]
process[turtlebot3_lds-2]: started with pid [28337]
process[turtlebot3_diagnostics-3]: started with pid [28338]
[ERROR] [1629018924.260907861]: An exception was thrown: open: No such file or directory
[turtlebot3_lds-2] process has died [pid 28337, exit code 255, cmd /opt/ros/kinetic/lib/hls_lfcd_lds_driver/hlds_laser_publisher __name:=turtlebot3_lds __log:=/home/ido/.ros/log/476cb566-fda9-11eb-9dff-0800277fefa9/turtlebot3_lds-2.log].
log file: /home/ido/.ros/log/476cb566-fda9-11eb-9dff-0800277fefa9/turtlebot3_lds-2*.log
[INFO] [1629018924.903113]: ROS Serial Python Node
[INFO] [1629018924.911257]: Connecting to /dev/ttyACM0 at 115200 baud
[ERROR] [1629018924.916405]: Error opening serial: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
[turtlebot3_core-1] process has finished cleanly
log file: /home/ido/.ros/log/476cb566-fda9-11eb-9dff-0800277fefa9/turtlebot3_core-1*.log

Please describe the issue in detail.
Get error when trying to bringup the robot, roscore and ssh worked well.

Hi @IdoSegal1234 .
It is not find to '/dev/ttyACM0' port.
Please type following command to find the serial port number.
ls /dev/ttyACM
If the port exists, enter the command below to change the permission.
sudo chmod a+rw /dev/ttyACM0
thank you.

This issue will be closed due to prolonged inactivity. Please try again with the Humble or Noetic versions, and if the issue persists, feel free to reopen it.


docs: add SemanticMask and InstanceMask example in quick_start/examples

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 86.756%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
6105

Relevant Lines:
7037

💛  - Coveralls


Update README.md

unneeded pip install removed

Actually, I like this UI, I think it is simple and understandable. But still requires work, especially with strategy stats plots. Are you trading with this code?

Absolutely not, it's just a very early under development UI, i have to add so many things to be fully usable :)


[Bug] Fix the zero calculation in Pythagorean Theorem Calculator

Description
The current implementation of the hypotenuse calculator has a bug where it incorrectly calculates the hypotenuse when one of the sides is entered as zero.
Steps to Reproduce:

Open the calculator and input 0 as one of the sides (e.g., side a).
Enter a non-zero value as the other side (e.g., side b).
The calculator incorrectly calculates the hypotenuse.

What I want to improve

Fix the bug

Input Handling:
Allow users to input values into three fields: side a, side b, and hypotenuse.
Calculations: Implement logic to:

Calculate the hypotenuse if two sides are given.
Calculate the missing side if the hypotenuse and one side are given.
Validate the triplet if all three sides are given.

Screenshots

Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSOC'24 contributor.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

Go ahead @srilekha279

Go ahead @srilekha279
Should I fix the bug first and then raise a separate issue for the enhancement?

What kind of enhancement @srilekha279

You just fix the bug in this issue by creating a PR, we already have Pythagorean Triples Calculator @srilekha279

You just fix the bug in this issue by creating a PR, we already have Pythagorean Triples Calculator @srilekha279

I understand that the current Pythagorean Triples Calculator validates triplets, but I believe adding the following feature will significantly enhance its functionality
Calculate Missing Side: If the hypotenuse and one side are given.
The current Pythagorean Triplet Calculator only checks whether a triplet is valid. I propose to calculate any side of a right triangle, not just the hypotenuse.

@Rakesh9100
Please accept my pull request.


updated the closure to be serialized. fixes #466

This will need unserializing in the service provider

Is this something that should be done here as there are several other places in the configuration where you may provide closures.

Maybe this needs fixing at the laravel level?

Yeah maybe? See what Taylor thinks. If it's a widespread issue.
On Fri, 19 Jun 2015 18:20 Graham Campbell<EMAIL_ADDRESS>wrote:

Maybe this needs fixing at the laravel level?
—
Reply to this email directly or view it on GitHub
https://github.com/dingo/api/pull/471#issuecomment-113428173.

Hey @GrahamCampbell, what ever came of this? I'm not too keen on merging it here as it doesn't seem appropriate. Did anything ever get mentioned on the Laravel side of things?


Bracket pair colorization in regexes

From time to time I see bracket pairs in regexes get highlighted.

Probably, this is a manifestation of #132249, but it looks super useful as it improves the readability of long regexes a lot. Please consider turning this into a feature.
Version: 1.60.2 (user setup)
Commit: 7f6ab5485bbc008386c4386d08766667e155244e
Date: 2021-09-22T12:00:31.514Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043

/assign @hediet

This makes it much more complex and unfeasable for the existing bracket pair detection infrastructure.

Huh I thought that would make it easer as you would have logical pairs that are guaranteed to have a closing bracket right?