Run react-components/dev:build-library script.

The print links were still showing even though they had been commented out in the code. I think it might've because the compiled react-components files were not merged in after running the dev:build-library script. Does that seem right?

@lublagg I think you need to run npm run build instead and then commit the built files.


04## - LeetCode Problem Title

Median of Two Sorted Arrays
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
Follow up: The overall run time complexity should be O(log (m+n)).
Input: nums1 = [1,2], nums2 = [3,4]
Output: 2.50000
Explanation: merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5.
Link To The LeetCode Problem
https://leetcode.com/problems/median-of-two-sorted-arrays/

Pls assign this issue to me.

i want to solve this issue in C and python

Hii @Mitali-laroia  please assign this issue to me.

Please assign me i will definately work on this issue

I would love to contribute to this problem if it hasn't been assigned.

hey @Mitali-laroia can I implement this in Java?

I would like to contribute to this problem . Please assign this issue to me

why was this issue closed ?

@wasimafser it is already there in code base.

ok, thank you for the information


find the max and min number from three integer

Description
Description
Domain
CPP
Type of Contribution
Addition
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of LearnCPP.

/assign

/assign

/assign

\assign

/assign

/assign


[UI] Add Connection Stats Chart

Notes for Reviewers

Adds Connection Stats Chart
Makes legend svgs square
Adds a  column name valid check

Signed commits

[x] Yes, I signed my commits.

Sure @leecalcote 🚀

Thank you @aabidsofi19 Everything looks good to me but is there a chance of mentioning deleted connections as 0 instead of not mentioning the parameter with which we are comparing? I am new to reviewing PRs. So, this took me long to review this.

Thank you @aabidsofi19 Everything looks good to me but is there a chance of mentioning deleted connections as 0 instead of not mentioning the parameter with which we are comparing? I am new to reviewing PRs. So, this took me long to review this.

we can , but it will add more breaking points as  we have 5-6 different states  . as i in future we add a new state  , or rename or remove some we dont need to change anything here .

Is the empty state considered for here?

👍

Empty State:

We could use an improvement on the empty state message, which could report "No connections available." and present this button:

You can test the empty state easily by using the Local (None) Provider


启动服务后 浏览器报错~

vue.js:584 [Vue warn]: Error in nextTick: "TypeError: on.appear.fn is not a function"
应该是vue更新了
"vue": "^2.1.10",
"vue-router": "^2.3.0",
"weex-vue-render": "^0.2.0",
"weex-vue-router": "^0.0.4"

破了吗


Gaussian Process Regression | Python

Gaussian Process Regression
Implement Gaussian Process Regression in Python
Type of Issue -
Please add/delete options that are not relevant.

[x] Adding New Code

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

[x] Python

Self Check

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

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

@div-bargali can you please assign this to me?

Can I work on this issue?


Update buildroot version to latest

First of all, thank you so much for sharing this project. The README is very detailed and was super useful!
I used it to run GDB in the browser (with v86 + Buildroot), and mentioned Browser VM the blog post where I explain how I did it. 🙏
This PR updates Buildroot to the latest version, 2021-02-rc2. Fortunately, there aren't many config changes - but I had to explicitly tell it to use kernel 4.19.172 (LTS, until Dec 2024), as the current LTS kernel (5.10) seems to break the Plan 9 FS in v86.

@urish Thanks so much for taking the time to share your success, and for the update to my code so that the next person who finds it can benefit!
I loved your blog post.  I've been down that same road, so I was nodding along as I read.


Add support for Join/Leave methods to Endpoint

Added support for Join/Leave methods to Endpoint.
Removed sandbox key argument from CreateEndpoint.
Refactored bridge driver code to remove sandbox key.
Fixed bridge driver code for gaps in ipv6 behavior
observed during docker integration.
Updated test code, readme code, README.md according
api change.
Fixed some sandbox issues while testing docker ipv6
integration.

Signed-off-by: Jana Radhakrishnan<EMAIL_ADDRESS>

Is the motivation here for endpoints to have a lifetime independent of being attached to a container, or something more innocuous?

@squaremo The motivation here is actually the former. As mentioned earlier in other threads, the idea is to keep the endpoint lifetime independent of containers. Then endpoint actually provides the abstraction of a service which is advertised on the network and the container the actual provider of the service. This separation facilitates different containers attached to the same endpoint at different times providing the service. This can be completely transparent to the client. The end-to-end implementation (in terms of UI and such) are not available yet but we would like to settle down on the api pretty early.

LGTM

As mentioned earlier in other threads, the idea is to keep the endpoint lifetime independent of containers.

Is there still a useful interpretation for "Endpoints are garbage collected when they no longer belong to any Sandboxes."? (https://github.com/docker/libnetwork/blob/master/ROADMAP.md#concepts)

@squaremo I think not and didn't realize that this wording existed in ROADMAP.md. We should fix it as part of this PR. I will take care of it. Thanks for pointing this out.

@mrjana Thanks for making this change. It is important to have the life-cycles decoupled. LGTM.

I anticipate a couple of problems with this design.
Firstly, it appears to me that Join and Leave create and destroy sandboxes (i.e., the network namespace) respectively, and methods on endpoint are an odd place to put these side-effects. In particular, it's going to be tricky to run a container that has no endpoints, which is a perfectly reasonable thing to do.
Secondly, resources are committed at endpoint creation time rather than when a container is actually run. This commits resources before they are needed (or even without them being needed), and in the case of e.g., IP addresses, makes it more likely that scarce resources will be exhausted inadvertently by the user. It makes more sense that the contract of Join/Leave is to make sure resources are committed and decommissioned, and for the drivers to be invoked to ensure this.
Surely it would be better to have the sandbox creation be explicit (and separate), for Join and Leave to only add and remove interfaces to a sandbox at the time they are needed; and for Join/Leave to be reflected in the driver SPI.

@squaremo Actually the sandbox is created only on the first Join that the container has on any endpoint and is destroyed only when the container leaves the last endpoint. And when you say "to run a container that has no endpoints" I am assuming you are talking about the equivalent of running a container with --net=none. This is already supported by the null driver which got committed in #100 so container if it wants to run without any network connectivity it will run. So docker core will make sure that before such a container is run it will create an endpoint on a network in null driver and therefore creates a sandbox with only the loopback interface in it for example. This is all done without complicating libnetwork or docker core for just only a few bytes of overhead.
Secondly this premise of committing certain resources during endpoint creation time is to facilitate the endpoint as a service model. With this model any client container can reach a service with just the endpoint name regardless of which container is providing the service. This facilitates workflow such as someone wants to test out a dev version of their software so they can swap out a prod version with a dev version completely transparently to the clients and then put back the prod version when testing is done. It makes possible sophisticated load balancing architectures possible. It also facilitates IP address and port binding stability when a container moves from one host to another. Host movement for the container is simply done container leaving the endpoint in a given host and re-joining in a different host.
I am aware of the downsides of this such as user not removing the container and therefore locking in some network resources but this is something that we need to educate the users about. That a container not removed might hold up some network resources etc.
Nevertheless, I can assure you that Join/Leave hooks will be provided in the driver api so the driver can optimize on lazily plumbing certain things and delay until a Join on the endpoint happens. For example it may decide not to hook the veth pair onto the bridge until a Join happens etc. We just haven't reached there as we are focusing on setting down the northbound api so that we can finish the docker core integration.

@mrjana have you looked at the volumes design?  cc @icecrime @crosbymichael @lukemarsden

Nevertheless, I can assure you that Join/Leave hooks will be provided in the driver api so the driver can optimize on lazily plumbing certain things and delay until a Join on the endpoint happens.

But won't CreateEndpoint and Join always be called together -- or are you saying that Join will be called "at the last minute", in other words, when the container is actually started; and similarly, Leave will be called when the container stops? If not that latter, it will make no difference to the ability of the driver to do things lazily, since it will still bear no relation to whether the container needs the resources or not.
Actually the ideal situation is one in which the driver chooses when to commit the resources. For example, we(ave) would like in general to allocate an IP address at the time the container is started, and release it when the container stops. However, it's also plausible that a driver (or indeed weave, when given a particular flag) will want to allocate at the time the endpoint is created, so that e.g., a specific container gets the same IP each time it starts.

@mrjana you say "I am aware of the downsides of this such as user not removing the container and therefore locking in some network resources but this is something that we need to educate the users about. That a container not removed might hold up some network resources etc".
You are essentially proposing that users can be educated to release distributed locks on shared resources.  But, this is exactly why giving a distributed lock to a user has come to be seen as an anti pattern....

Host movement for the container is simply done container leaving the endpoint in a given host and re-joining in a different host.

This implies some rather onerous requirements on the part of drivers -- doesn't this mean, for example, that a plugin will need to be prepared to accept a Join call for which it has not seen a CreateEndpoint call?

@monadic I don't see how this design element has any impact on the end-user needing to have any knowledge on distributed locks or even shared resources. The entirety of the Join/Leave design is to make sure there is a clean separation between a service life-cycle and a sandbox life-cycle.
Regarding the resources being locked, it is mostly applicable for ip-address & it infact addresses a long-standing request of IP-Address stability.
The rest of the possible resources applied on the sandbox can be lazily executed during the Join call.

Regarding the resources being locked, it is mostly applicable for ip-address & it infact addresses a long-standing request of IP-Address stability.
The rest of the possible resources applied on the sandbox can be lazily executed during the Join call.

It's users inadvertently running out of IP addresses that we are mostly concerned about. I understand the IP stability requirement, but it is not a universal requirement (i.e., a MAY rather than a MUST), and there are ways to support it without mandating it.

@mavenugo what @squaremo said.

@squaremo I think there seems to be some things that I haven't explained well in my previous reply.
First of all for endpoints which are implicitly created for a container run the CreateEndpoint and Join will be called together. So when CreateEndpoint and Join are called together and Leave and endpoint Delete called together nobody needs to be worried about unnecessary resource blockage when this happens during container start and stop.
But with this model endpoint becomes a first class resource like a container and in fact it takes some of the responsibility of the container which is networking related. So creating an endpoint is akin to creating a service and the driver allocates all the necessary resources needed for providing that networking service. In fact in the future you are likely see UI which creates an endpoint independently without a container (UI looking more like docker service create), exposes a set of ports on the endpoint(very similar things as what happens in container with -P option) and along with it UI to join a container to this service. This is the main reason for decoupling endpoints from container Joins.
The IP address stability is mostly a secondary goal which we nicely achieve with this model without doing much.
All of these things are possible because we have a nice set of composable apis such as CreateEndpoint/Delete and Join/Leave.

@monadic I haven't looked at volumes design. What about it that relates to this conversation?

This implies some rather onerous requirements on the part of drivers -- doesn't this mean, for example, > that a plugin will need to be prepared to accept a Join call for which it has not seen a CreateEndpoint > > call?

@squaremo Driver will never get a Join for an endpoint that it has never seen

Driver will never get a Join for an endpoint that it has never seen

Ok put it this way: if CreateEndpoint("network1", "abc123", options) is called on two different hosts, are the drivers on those hosts required to return the "same" endpoint? Otherwise, how is this endpoint migration scenario intended to work.
(And to be a broken record, where are these requirements written down?)

@mrjana Thank you for the expanded explanation. I understand how this model requires an IP address at endpoint creation time.
I think it is fair to say this is not a technical requirement, since the IP address is only needed when the interface is moved inside the namespace, and it is only necessary that this is before the container is started. So it seems like a sub-requirement of the "independent lifetimes" model you describe.
Another mode of use (more in line with the requirements given in #9983 and in the roadmap) is that endpoints are an ephemeral means of connecting a container to a network; and in this case, a more useful semantic requirement is that the IP address and other resources are allocated on demand, and released when no longer needed. And it seems like the driver SPI could make this possible by leaving to the driver the choice of when resources, including IP addresses, are committed -- so long as they are in place when they are technically needed.

@mrjana  Should I raise an issue to track I can assure you that Join/Leave hooks will be provided in the driver api?
I'm very interested in the exact semantics of when these hooks will be called (an.d in fact when EndpointDeleted is called too for implicitly created endpoints. What guarantees are given about this method being called).
On the issue of IP address assignment at endpoint creation time, for Calico, this is desirable since policy is attached to endpoints and is (ultimately) implemented in terms of IP addresses. IP assignment at creation time would also be useful when dealing with very short lived containers. It means we can set up pools of endpoints (with IPs) so that routing information can be distributed before short-lived containers are started.
Having said that, without a public requirements or design doc it's difficult to comment to whether this is the best approach overall.

@tomdee am working on the driver api for join/leave as we speak. Expect PR shortly.
Also I will update the design.md shortly.

@mavenugo Perfect, thanks.

I will update the design.md shortly.

Where is this design.md?

@squaremo I've added one in https://github.com/docker/libnetwork/pull/104
While not complete, it should at least form a reasonable basis for documentation-based PRs or for contributors to document any features that they are committing.

@dave-tucker Aha! Thanks


use C-S-6

https://youtrack.jetbrains.com/issue/VIM-1846

Thank you for the fix. I added a TODO in the code. In this way we will remember to change it once the issue will be fixed :)

@MarcoIeni
I don't think that this comment is necessary:

" TODO:  is the default key binding associated to this action.
"       Calling the action by name does not work for now. See:
"       https://youtrack.jetbrains.com/issue/VIM-1846
"       When this issue is fixed, check if this can be restored:
"       nnoremap     :action VimFilePrevious
"       vnoremap  :action VimFilePrevious

<C-S-6> is exactly how you should use this action in mappings. And the linked issue is about the bug that <C-^> doesn't work in mappings even it's the same keystroke as <C-S-6> (well, at least that's how I understand this ticket :).

I tought that <C-S-6> was an intellij shortcut, not a vim one. Sorry.
Solved in commit d623509.


CI for Node

Game › Game › Starts the game with a random player

Game › Game › Starts the game with a random player


Split image versions output

Seems like AWS is now enforcing a 1024 char limit to output fields.

PR merged, release created


Required variable not set: apex_function_hello

If you have a bug report please let us know the following:

Operating system (OSX 10.11.4 (15E65))
Version (Apex version 0.9.0)

I'm having an issue below.

I've cloned this repo
cd to /_examples/api-gateway
run apex init

Then apex infra plan
thomasreggi@zx:api-gateway$ apex infra plan
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  * 1 error(s) occurred:

* Required variable not set: apex_function_hello
   ⨯ Error: exit status 1

example is busted :( I'll remove it for now until I have time to fix


[UserCenter] about-us: create about-us page

create about-us page
TODO: contributor detail page

Coverage increased (+0.7%) to 63.697% when pulling 8cbea8df1899f0527e5d0441b0130be4790ad714 on airt:master into b6ef8894a3436105bace6c0d12668d9fb368a61b on phodal:master.


How to use this package?

Hello everyone,
I am also developing a React Native application. The app is using React Native version 0.59 and I want to integrate live agent chat inside it. Can anybody let me know how can I achieve the desired functionality? I did check the tutorial for integration of react native live agent chat into mobile app but it needs the application to be created from beginning, but I already have my React Native app up and running. Also, it's live in stores. So I do not want to create a new app now and want to continue using RN v0.59 or above only.
Any help will be appreciated.
Thanks in advance!

@AndrewBestbier When can we expect the package to support the latest version of react-native?


Feature request: Go To Definition support for .jsx extension filename

VSCode Version: Code 1.8.1 (ee428b0eead68bf0fb99ab5fdc4439be227b6281, 2016-12-19T14:49:23.350Z)
OS Version: Windows_NT ia32 6.1.7601

Is there any way to support "Go To Definition" for .jsx extension filename?

I set jsx settings in my jsconfig,json, and it works!
{     "compilerOptions": {         "target": "ES6",         "module": "commonjs",         "experimentalDecorators": true,         "jsx": "react"     }     "exclude": [         "node_modules"     ] }


Named and destructable self

Rendered.

Destruction and destructuring are two rather different things.

The "Rendered" is a dead link.

(fixed link)

Thank you for posting this.
I actually believe the intention, during the UFCS design, was to add this feature (or something very much like it).  In particular, you can today already write:
struct Foo(u32, String);

impl Foo {
    fn bar(x: Self) -> String {
        x.1
    }
}

(note however, that one is currently forced to call the above via the syntax Foo::bar(..); the expression f1.bar() for f1: Foo does not yet work; see the comment thread attached to #395 for a little more discussion on this point.)

Anyway, we do already have a start to what you describe.  Of course, in addition to the method call issue noted above, it also does not yet allow destructuring. (But I suspect this was an oversight, not a concious design choice.)
@nikomatsakis can you comment on whether the UFCS RFC needs an amendment?

reassigning to @nikomatsakis

Indeed, the already accepted RFC 48 permitted this sort of syntax. That was not implemented. I have some concerns that we may not be able to implement it backwards compatibly -- in particular, we currently use the self keyword to designate methods that should be considered for method dispatch, and growing that set can create ambiguities. Now that we are moving towards 1.0 we'll have to see what is possible and desirable in the future. Nonetheless, I'm going to close this RFC since it is already the official plan, and the limiting factor is more backwards compatibility and implementation time and effort. Thanks very much for the suggestion!


Macro: When monomers are selected 'Del' and 'Backspace' hotkey delete selected monomers and switches to Erase tool

Steps to Reproduce

Switch to Macro mode
Add some monomers on canvas
Select with 'Selection tool' some monomers and press 'Del' or 'Backspace'

Actual behavior
When monomers are selected 'Del' and 'Backspace' hotkey delete selected monomers and switches to Erase tool
Expected behavior
When monomers are selected, pressing 'Del' or 'Backspace' hotkey deletes selected monomers without switching to the Erase tool. Should work like in Micro mode.
Desktop (please complete the following information):

OS: Windows 11
Browser Chrome
Version 112.0.5615.138 (Official Build) (64-bit)

Ketcher version
[Version 2.18.0-rc.3]

Bug prioritized as requested @vanoprenko

Fixed.
Ketcher Version 2.21.0-rc.1 Build at 2024-04-15; 20:00:15
Indigo Version 1.20.0-rc.1.0-g8e8ffc3c3-wasm32-wasm-clang-12.0.0


about reward calculation

Thanks for your great work. I want to ask where you define your reward in your code.

Thank you for your kind words. The reward is defined here: https://github.com/wayveai/mile/blob/main/carla_gym/core/task_actor/ego_vehicle/reward/valeo_action.py


Notebooks entire .actions-container changes cursor to pointer

This should only happen when over the buttons.

Fixed.


Creator of pull request can chose to start review when commenting but never submit them

Gitea version (or commit ref): b9d1fb6
Git version: n/a
Operating system: n/a
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[X] SQLite

Can you reproduce the bug at https://try.gitea.io:

[X] Yes: https://try.gitea.io/themightychris/test/pulls/1/files#issuecomment-12063
[ ] No
[ ] Not relevant

Log gist:

Description
If you create a pull request and then go to comment within that pull request, you're offered the option to just add a comment or start a review. If you start a review, every comment you post after that becomes part of the review and is held in a "Pending" status. But then you can't submit the review because you created the pull request and your comments can never be posted.
At the very least, if submitting a review is not an option then "start review" should not be an option when commenting. Ideally though, any admin or whitelisted review should be able to submit a review even if they created the pull request. I know this behavior was copied from GitHub per #4728 but its problematic: being the creator of a pull request does not mean you're the author of all/any of the commits within it. At the least it should be a branch option whether whitelisted reviewers can review their own pull requests. My use case is that I open develop->master pull requests for each release as the maintainer of the project and want to then review the release. It seems entirely common that maintainers on small teams might open the pull requests for others' pushed branches to create a review context, it seems silly that it should need to be a rule that maintainers wait for people to open their own PR in order to be able to start reviewing a branch
Screenshots

So, how to finish the review?

One should not review himself PR.

@lunny Gitea's job isn't to force some notion of best practice for teams by having a broken UI
Also I explained in the original post two use cases where it does make sense to be reviewing a PR you created

Maybe this could be a config item to allow user approval/reject himself PR on protected branch and default false.

Maybe, but this issue is about the UI getting into an unresolvable state by it's own invitation

OKay. I think pull request creator should not be allowed to click start review button. This should be a bug.

I would argue there are definite use cases for having the author be able to review their own pull requests. Most of them being covered in the first post of the issue. The person who opened the pull request is not always the person who made the most changes. Pull requests are sometimes opened as a "should we merge this?" or even "let's get this to a workable" rather than "let's merge this" so being able to review a pull request even if you authored it so, for example, if someone else has made a change after you opened the pull request, you can review their changes.
In any case, if the author cannot review their own pull request, following that line of thinking, shouldn't anyone who authored or committed to the branch should not be able to review the pull request? But, depending on the workflow of the organization, it is possible everyone has had some part in contributing to a branch that is going to be merged in meaning noone can review the pull request.
Essentially, the pull request author is not necessarily in a better or worse position then anyone else to be reviewing the pull request.
Maybe opening the pull request is an approval in an of itself but it also often isn't.

@gary-kim see my comment https://github.com/go-gitea/gitea/issues/7289#issuecomment-512262635

There is still a bug here that is pretty serious and has a pretty simple solution: prevent someone from starting a review if they're not going to be allowed to submit it. Without this fix, PRs can be taken into a stuck state via the UI that they can't be recovered from

You should be able to start review and in review dialog "Comment" button should be allowed

@lafriks that's the current situation.

Yes and I don't see a problem with that

OK, I couldn't reproduce the problem
I've just tested on my dev server (1.10.0+dev-411-g0e90b506c, 633cd7f473c24ee379e98b9f33ef79c7d664b32e).
The steps I did were:

Log in, create a PR from the UI.
Go to the code review tab.
Select a line of code.
Enter a message, click "Start Review".
The comment is created, but marked as "Pending".
Click the "Review" button, the "submit review" dialog shows up.
The "Comment" button is kinda dim, but I press it.
My review is added no problem.

Here's a snapshot of the "submit review" dialog:

Testing with my production 1.9.4 gave me the exact same results. Adding more than one comment before submitting worked fine too.
So, perhaps it's just a styling issue.


Steppedweddge implementation

Codecov Report
Patch coverage: 26.66% and project coverage change: -1.84 :warning:

Comparison is base (ba732a7) 97.88% compared to head (6b98d61) 96.05%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   97.88%   96.05%   -1.84%
==========================================
  Files           9        9
  Lines         568      583      +15
==========================================
+ Hits          556      560       +4
- Misses         12       23      +11

Impacted Files
Coverage Δ

cluster_experiments/random_splitter.py
90.97% <21.42%> (-8.19%)
:arrow_down:

cluster_experiments/power_config.py
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


automatic derivation of SRS from shapefile input.

If GDAL is installed (pip GDAL) this is easy.  But GDAL can be difficult to install, so plan is to leave GDAL an optional component, but use when available, so users don't need to explicitly specify proj4text.

Done. (as of v0.4.0)


The link in the readme for the Slack channel is broken

The link in the readme for the Slack channel is broken

fpchat.com seems down.
You can join from https://fpchat-invite.herokuapp.com/

Entered a valid email, pressed invite, and I see please wait for minutes...

This is not ours BTW, it is a community driven slack and it has automatic approval...


Plugin configuration

Hi,
Is there any possibility to customize plugin? For example, based on project or language. I have 2 cases:

Search for function in python code performed among all python frameworks (also, that are not installed in docsets). Here's search for string join function, that I got in Zeal:
python3,python,django,twisted,sphinx,flask,tornado,sqlalchemy,numpy,scipy,salt,cvp,matplotlib:about

I have to use PyQt5 and there's no convenient in-line documentation presented. PyQt5 documentation mostly links to Qt site. Thus, if I want to look-up something about Qt function, I ought to search Qt documentation instead. There's difficulty - Qt is written in C++ notation (ClassName::methodName), while python search performed in another way (classname.methodname).

Can we do something with these cases? For example, create custom rules for specific situations?

hey @erakli,

it is correct that the filters passed to your documentation browser include a list of frameworks that are expected to be used in the given language. not installed docsets should not cause any trouble and will be ignored. your documentation browser should sort results in order of the keys passed. this way a result from the python documentation should be the first result, as python3 and python are the first two keys.

transforming the query passed to your documentation browser would be out of scope for this plugin. yet when you actively select the word you are searching for, this will be the only term passed to your documentation browser.

there is also the option to not use language detection by selecting "Search all Documentation in ..." from the Tools menu.

Is it possible to configure the filter? I would like to add other keys to the search, for example "TensorFlow-2.1" for my ".py" files.


About the reproduction of results

Dear authors, sorry to interrupt.
I wonder have you ever tested the influence of python packages/cuda version/gpu on the result?
I tested the code with my own environment and found that the R2 is 80.5%.
The running cmd is the same as what you suggest and the weight file is downloaded from suggested url, its filename is [uniformer_small_k400_16x8.pth], i wonder if there is anything i didnot notice?
Thanks.

to be more precisely, the cmd is like following:
python main.py --exp_no 0 --exp_name full
--model_name uniformer_small
--batch_size 25
--epochs 45
--pretrained True
--frames 36
--frequency 4
--data_dir ../data/EchoNet-Dynamic/
--weights  weights/uniformer_small_k400_16x8.pth

Also num_workers is modified from 4 to 0, to make sure the code is runnable.

packages do influence a lot. The question is over.


Add new modules

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!

[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/quantms branch on the nf-core/test-datasets repository.

[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

Wow that was quick. Great work. I will need some time to go over everything.

I am also learning DSL2, and many codes may be optimized and corrected.


Cannot reproduce graph optimization step with inline_functions

I tried to reproduce http://dask.pydata.org/en/stable/optimize.html#example but the inline_functions step does not work for me:
>>> dsk2
{'count1': (<method 'count' of 'str' objects>,
  'apple orange apple pear orange pear pear',
  'orange'),
 'count2': (<method 'count' of 'str' objects>,
  'apple orange apple pear orange pear pear',
  'apple'),
 'nwords': (<function len>,
  (<method 'split' of 'str' objects>,
   'apple orange apple pear orange pear pear')),
 'out1': (<function __main__.format_str>, 'count1', 'orange', 'nwords'),
 'out2': (<function __main__.format_str>, 'count2', 'apple', 'nwords'),
 'print1': (<function __main__.print_and_return>, 'out1'),
 'print2': (<function __main__.print_and_return>, 'out2'),
 'val1': 'orange',
 'val2': 'apple',
 'words': 'apple orange apple pear orange pear pear'}
>>> dependencies
{'count1': set(),
 'count2': set(),
 'nwords': set(),
 'print1': {'count1', 'nwords'},
 'print2': {'count2', 'nwords'},
 'val1': set(),
 'val2': set(),
 'words': set()}
>>> inline_functions(dsk2, [len, str.split], dependencies=dependencies)
{'count1': (<method 'count' of 'str' objects>,
  'apple orange apple pear orange pear pear',
  'orange'),
 'count2': (<method 'count' of 'str' objects>,
  'apple orange apple pear orange pear pear',
  'apple'),
 'nwords': (<function len>,
  (<method 'split' of 'str' objects>,
   'apple orange apple pear orange pear pear')),
 'out1': (<function __main__.format_str>, 'count1', 'orange', 'nwords'),
 'out2': (<function __main__.format_str>, 'count2', 'apple', 'nwords'),
 'print1': (<function __main__.print_and_return>, 'out1'),
 'print2': (<function __main__.print_and_return>, 'out2'),
 'val1': 'orange',
 'val2': 'apple',
 'words': 'apple orange apple pear orange pear pear'}

As it can be seen, the graph does not simplify.

If I try this other think, it throws a KeyError:
>>> inline_functions(dsk2, [], [len, str.split], dependencies=dependencies)

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-61-fd0647c743bd> in <module>()
----> 1 inline_functions(dsk2, [], [len, str.split], dependencies=dependencies)

/home/jlcano/.miniconda3/envs/b2c36/lib/python3.6/site-packages/dask/optimize.py in inline_functions(dsk, output, fast_functions, inline_constants, dependencies)
    266     if keys:
    267         dsk = inline(dsk, keys, inline_constants=inline_constants,
--> 268                      dependencies=dependencies)
    269         for k in keys:
    270             del dsk[k]

/home/jlcano/.miniconda3/envs/b2c36/lib/python3.6/site-packages/dask/optimize.py in inline(dsk, keys, inline_constants, dependencies)
    218     for key, val in dsk.items():
    219         if key not in dsk2:
--> 220             for item in keys & dependencies[key]:
    221                 val = subs(val, item, keysubs[item])
    222             dsk2[key] = val

KeyError: 'out2'

Thanks for the bug report, this was due to a change in api not getting propagated to the docs. Fixed by #1990.
Note that unless you're working directly with graphs or maybe dask.delayed, you shouldn't need to use the optimizations directly at all.

Note that unless you're working directly with graphs or maybe dask.delayed, you shouldn't need to use the optimizations directly at all.

Sure! Just trying to reproduce the examples for learning purposes :) Thanks for the quick fix!


updated rel descriptions, moved info to best practice

Related Issue(s): #929
Proposed Changes:

Refactored 'rel' information to move the common IANA stuff to best practices, and tweaked the language of the sections so they just talk about the custom stac stuff. Note the decision to leave catalog more minimal in its language was deliberate, since there I didn't see how any of the official IANA ones applied, but I'm open to tweaking it with mroe.

PR Checklist:

[x] This PR is made against the dev branch (all proposed changes except releases should be against dev, not master).
[x] This PR has no breaking changes.
[x] a CHANGELOG entry is not required.

I went back and forth in my head on derived_from:

The best practices currently is just the official IANA rel's, and it seems weird to 'introduce' a custom rel only in the best practice.
Collection does list derived_from now. Catalog didn't make sense to me to have a derived_from, since it's just a structure for organization.

But I see the argument as to why it feels less mature than the others. I think in my ideal world it eventually drops away in favor of a real 'provenance' extension, that is based on some other 'real' provenance work, instead of us just making stuff up. But I do feel it's really important to emphasize in STAC, in the core specs, that marking where something has come from is essential.
So to me it's a case of not letting 'great' be the enemy of good, so I think overall I prefer it in the core spec, vs burying it in a new extension. I could potentially be convinced otherwise, but I don't think we should introduce new rels in a best practice.

I went back and forth in my head on derived_from:

The best practices currently is just the official IANA rel's, and it seems weird to 'introduce' a custom rel only in the best practice.
Collection does list derived_from now. Catalog didn't make sense to me to have a derived_from, since it's just a structure for organization.

But I see the argument as to why it feels less mature than the others. I think in my ideal world it eventually drops away in favor of a real 'provenance' extension, that is based on some other 'real' provenance work, instead of us just making stuff up. But I do feel it's really important to emphasize in STAC, in the core specs, that marking where something has come from is essential.
So to me it's a case of not letting 'great' be the enemy of good, so I think overall I prefer it in the core spec, vs burying it in a new extension. I could potentially be convinced otherwise, but I don't think we should introduce new rels in a best practice.

Good arguments, I'm convinced to leave it as it is for now. Thanks!

Good arguments, I'm convinced to leave it as it is for now. Thanks!

Cool, thanks for your review and bringing it up.

Cool, thanks for your review and bringing it up.


[SPARK-19389][ML][PYTHON][DOC] Minor doc fixes for ML Python Params and LinearSVC

What changes were proposed in this pull request?

Removed Since tags in Python Params since they are inherited by other classes
Fixed doc links for LinearSVC

How was this patch tested?

doc tests
generating docs locally and checking manually

@wangmiao1981  Would you mind checking this?  It has small fixes I noticed when reviewing your PR for Python LinearSVC.

Test build #72094 has started for PR 16723 at commit fa522e6.

Test build #72094 has finished for PR 16723 at commit fa522e6.

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

Merged build finished. Test PASSed.

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

@jkbradley Sorry for replying late! I was out for Chinese new year this weekend. I will check the issue mentioned by HyukjinKwon otherwise, it looks good to me.

I delayed too!  I just pushed a fix.  I couldn't test it since it looks like the Java 8 doc gen has already been broken again.  (Thanks a lot for the efforts to fix it!  Btw, are you pinging the people who break it whenever you see issues?)

Test build #72265 has started for PR 16723 at commit ffd4756.

Ah, I fixed the others in https://github.com/apache/spark/pull/16741 Yes, I understand it is super easy to break. So I am trying to inform committers or frequent contributors purely as a kind comment so that we could avoid and fix them by ourself (not at all blaming purpose).

Test build #72265 has finished for PR 16723 at commit ffd4756.

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

Merged build finished. Test PASSed.

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

(I just rebased it based on this PR and built the javadoc8 for sure. I believe it should emit an error if this PR introduce the break but it seems not. So, LGTM for doc changes.)

OK thanks a lot @HyukjinKwon and @wangmiao1981 !
Merging with master


⚠ Bofrost.be has degraded performance

In 781ae52, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1868 ms

Resolved: Bofrost.be performance has improved in 0889a5a.


Adding support for explicit children in builder

Before, when an xml was parsed with the options preserveChildrenOrder and explicitChildren set to true, the xml2js builder failed to rebuild the xml file from the javascript object. The xml2js builder has been extended now to support this use case.

Your changes broke a lot of unit tests, can you make it less invasive?

Coverage decreased (-1.4%) to 95.601% when pulling 7f83dd99b16f3cd4bcd9cf6d0d011408f8fd7ef4 on JasperTack:master into 7b2a93a605c994a1141b1134810db0dc950a431b on Leonidas-from-XIV:master.

Coverage decreased (-1.4%) to 95.601% when pulling 5b0e9ba9585d3ab78ec310be4d9a0ede5b0d4b5f on JasperTack:master into 7b2a93a605c994a1141b1134810db0dc950a431b on Leonidas-from-XIV:master.

I'm very eager to use this. I'm parsing translation files with XML placeholders in various places in a text. Now the Parser returns all character data as a single string and the placeholders as an array which is not usable.


Docker image build hang for arm/v7

Related to #312
The build of the image hangs for armv7 on node:22-alpine image, it's a known issue (https://github.com/nodejs/docker-node/issues/2077)
It seems to work with non-alpine images (like node:22-slim), I'm testing to have a multi-stage Dockerfile to build on non-alpine and release on alpine

Sorry to cause such a headache. Thanks for trouble shooting though 😅

No problem @Zoobdude :v:

Thanks very much @CorentinTh :D


LayoutLM v2 on FUNSD-like dataset - index out of range in self

I'm using transformers to finetune  microsoft/layoutlmv2-base-uncased on my custom dataset that is similar to FUNSD.  After a few iterations of training I get this error :
 Traceback (most recent call last):
  File "layoutlmV2/train.py", line 137, in <module>
    trainer.train()
  File "..../lib/python3.8/site-packages/transformers/trainer.py", line 1409, in train
    return inner_training_loop(
  File "..../lib/python3.8/site-packages/transformers/trainer.py", line 1651, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "..../lib/python3.8/site-packages/transformers/trainer.py", line 2345, in training_step
    loss = self.compute_loss(model, inputs)
  File "..../lib/python3.8/site-packages/transformers/trainer.py", line 2377, in compute_loss
    outputs = model(**inputs)
  File "..../lib/python3.8/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
    return forward_call(*input, **kwargs)
  File "..../lib/python3.8/site-packages/transformers/models/layoutlmv2/modeling_layoutlmv2.py", line 1228, in forward
    outputs = self.layoutlmv2(
  File "..../lib/python3.8/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
    return forward_call(*input, **kwargs)
  File "..../lib/python3.8/site-packages/transformers/models/layoutlmv2/modeling_layoutlmv2.py", line 902, in forward
    text_layout_emb = self._calc_text_embeddings(
  File "..../lib/python3.8/site-packages/transformers/models/layoutlmv2/modeling_layoutlmv2.py", line 753, in _calc_text_embeddings
    spatial_position_embeddings = self.embeddings._calc_spatial_position_embeddings(bbox)
  File "..../lib/python3.8/site-packages/transformers/models/layoutlmv2/modeling_layoutlmv2.py", line 93, in _calc_spatial_position_embeddings
    h_position_embeddings = self.h_position_embeddings(bbox[:, :, 3] - bbox[:, :, 1])
  File "..../lib/python3.8/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
    return forward_call(*input, **kwargs)
  File "..../lib/python3.8/site-packages/torch/nn/modules/sparse.py", line 158, in forward
    return F.embedding(
  File "..../lib/python3.8/site-packages/torch/nn/functional.py", line 2203, in embedding
    return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self

After further inspection (vocab size, bboxes, dimensions, classes...) I noticed that there's negative numbers inside the input tensor causing the error. These negative numbers are returned by _calc_spatial_position_embeddings(self, bbox) in modeling_layoutlmv2.py line 92 :
h_position_embeddings = self.h_position_embeddings(bbox[:, :, 3] - bbox[:, :, 1])
What does this line exactly do ? Assuming that the negative values are the cause of the issue, what could I do to prevent the input values from becoming negative ? Thanks in advance !

Hi @naourass,
I had a similar issue with different data. Validating that both height and width are larger than 0 is a good start. (y1-y0 > 0 and x1-x0 > 0)  You could check for this and increase the bbox size manually. This might be a "-" character for example that after normalization has a height <= 0.
Good luck!
-Hector

Thanks for your suggestion @hrabago
I've already done a first review before posting :

All bbox coordinates are unsigned positive
All widths and heights are superior to zero (sometimes it's 1)
I'll double check to see if I missed anything !

After a double check, that was indeed the culprit. I removed labels with zero width/height and everything working fine now !


Remove nose

As it won't work with python 3.9/3.10

This is a good idea, if we do it we need to

make sure doctests are also being run
update the many tests that are skipped under pytest because pytest mocks stdin

Thanks, adapted to run pytest without interfering with stdin and also enabled doctests.

Thanks, adapted to run pytest without interfering with stdin and also enabled doctests.


I added a custom column with add and minus buttons to every row and I want onClick each + buttons, counter will be updated for that particular row only not every row?

code:
const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
        return (

 addToCart(rowIndex)}>

 {formatExtraData}

 removeFromCart(rowIndex)}>

        );
    };

and
...
formatExtraData: this.state.counter,
...
const addToCart = (index) => {
this.setState({counter: this.state.counter + 1});
}
...

Hi, you want that when a + button is clicked the counter increase just for that specific row of the button clicked? Is that correct?

yes

Hi, you want that when a + button is clicked the counter increase just for that specific row of the button clicked? Is that correct?

Yes

Could you provide the code for that component so I can help you more efficiently?

Could you provide the code for that component so I can help you more efficiently?
........
constructor(props) {
super(props);
this.state = {
counter: 0
};
}
......
const columns = [{
{
dataField: '',
text: 'Qty',
formatter: dataFormatter,
formatExtraData: this.state.counter,
headerStyle: () => {
return {width: '15%', textAlign: 'center', fontSize: '12px', color: '#7F7F7F'};
},
}];
.......

const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
    return (

 addToCart(rowIndex)}>

 {formatExtraData}

 removeFromCart(rowIndex)}>

    );
};

..........
const addToCart = (index) => {
console.log(index)
this.setState({counter: this.state.counter + 1});
}
.....

The problem is in the state, all the rows of the table are receiving the same state variable, so when you update one row the state is the same for all the others.
In order to make each row increase the counter individually, you need to have one counter for each row.

The problem is in the state, all the rows of the table are receiving the same state variable, so when you update one row the state is the same for all the others.
In order to make each row increase the counter individually, you need to have one counter (state) for each row.

can we do something with rowIndex?If not how we are gonna have counters for each row?can you please suggest the best way to achieve this?

The items to be displayed in the table are received as props in the component?

The items to be displayed in the table are received as props in the component?

yes

The items to be displayed in the table are received as props in the component?

yes

My approach is the following after you receive your table data as props you can iterate through then, this way you add a default counter for each row.
  state = {
    tableCounters: []
  };
  componentDidMount() {
    const tableCounters = [];
    const tableData = this.props.myTableData;

    tableData.forEach(() => {
      tableCounters.push({ counter: 0 });
    });

    this.setState({ tableCounters });
  }

After that, you can implement the method getCounter and pass it to your formatExtraData
  getCounter = rowIndex => {
    if (this.state.tableCounters[rowIndex] !== undefined) {
      return this.state.tableCounters[rowIndex].counter;
    }
  };

And your dataFormatter will look like this
const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
  return (

 addToCart(rowIndex)}>

 {formatExtraData(rowIndex)}

 removeFromCart(rowIndex)}>

  );
};

With that done you need to update your addToCart in order to update the counter for the specific row index

The items to be displayed in the table are received as props in the component?

yes

My approach is the following after you receive your table data as props you can iterate through then, this way you add a default counter for each row.
  state = {
    tableCounters: []
  };
  componentDidMount() {
    const tableCounters = [];
    const tableData = this.props.myTableData;

    tableData.forEach(() => {
      tableCounters.push({ counter: 0 });
    });

    this.setState({ tableCounters });
  }

After that, you can implement the method getCounter and pass it to your formatExtraData
  getCounter = rowIndex => {
    if (this.state.tableCounters[rowIndex] !== undefined) {
      return this.state.tableCounters[rowIndex].counter;
    }
  };

And your dataFormatter will look like this
const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
  return (

 addToCart(rowIndex)}>

 {formatExtraData(rowIndex)}

 removeFromCart(rowIndex)}>

  );
};

With that done you need to update your addToCart in order to update the counter for the specific row index

Hey I tried like below but does not seem to work.
....
this.state = {
counter: 0,
tableCounters: []
};
....
componentDidUpdate(prevProps, prevState) {
    const tableCounters = [];
    const tableData = this.props.data;
    tableData.forEach(() => {
        tableCounters.push({counter: 0});
    });
    if (this.props.data !== prevProps.data) {
        this.setState({tableCounters: tableCounters});
    }
}

getCounter = rowIndex => {
    if (this.state.tableCounters[rowIndex] !== undefined) {
        return this.state.tableCounters[rowIndex].counter;
    }
};

....
const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
return (

 addToCart(rowIndex)}>

 {formatExtraData(rowIndex)}

 removeFromCart()}>

);
};
........
const addToCart = (index) => {
this.setState({counter: this.state.tableCounters[index].counter + 1});
}

Hi @dashName , your state should be like this
  state = {
    tableCounters: []
  };

And your addToCart method should loop through the array of state counters and then update the state counter for the specific row, the way that you implemented it will do not work because it is setting the state on the "global" counter.
I think this will do the trick
  addToCard = rowIndex => {
    this.setState(prevState => ({
      tableCounters: prevState.tableCounters.map((item, index) => {
        if (index === rowIndex) {
          return { counter: item.counter + 1 };
        }
        return item;
      })
    }));
  }

And the componentDidUpdate should be componentDidMount

Hi @dashName , your state should be like this
  state = {
    tableCounters: []
  };

And your addToCart method should loop through the array of state counters and then update the state counter for the specific row, the way that you implemented it will do not work because it is setting the state on the "global" counter.
I think this will do the trick
  addToCard = rowIndex => {
    this.setState(prevState => ({
      tableCounters: prevState.tableCounters.map((item, index) => {
        if (index === rowIndex) {
          return { counter: item.counter + 1 };
        }
        return item;
      })
    }));
  }

And the componentDidUpdate should be componentDidMount

ComponentDidMount was returning props value as undefined so i used componentDidMount..Thanks a lot for the solution..it works..really appreciate

Hi @dashName , your state should be like this
  state = {
    tableCounters: []
  };

And your addToCart method should loop through the array of state counters and then update the state counter for the specific row, the way that you implemented it will do not work because it is setting the state on the "global" counter.
I think this will do the trick
  addToCard = rowIndex => {
    this.setState(prevState => ({
      tableCounters: prevState.tableCounters.map((item, index) => {
        if (index === rowIndex) {
          return { counter: item.counter + 1 };
        }
        return item;
      })
    }));
  }

And the componentDidUpdate should be componentDidMount

ComponentDidMount was returning props value as undefined so i used componentDidUpdate..Thanks a lot for the solution..it works..really appreciate

No problem

Hi @dashName , your state should be like this
  state = {
    tableCounters: []
  };

And your addToCart method should loop through the array of state counters and then update the state counter for the specific row, the way that you implemented it will do not work because it is setting the state on the "global" counter.
I think this will do the trick
  addToCard = rowIndex => {
    this.setState(prevState => ({
      tableCounters: prevState.tableCounters.map((item, index) => {
        if (index === rowIndex) {
          return { counter: item.counter + 1 };
        }
        return item;
      })
    }));
  }

And the componentDidUpdate should be componentDidMount

ComponentDidMount was returning props value as undefined so i used componentDidUpdate..Thanks a lot for the solution..it works..really appreciate

No problem

On above context:
 {formatExtraData(rowIndex)}
Currently it takes {formatExtraData(rowIndex)}  data as the value but I want to support userInput as well , i.e make the div editable so is it possible to support both features?
I tried with cell property but it is undefined

Hi, you can change the div that contains the number to a input so you can attach onChange method to it and support user input.
  const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
    return (

 addToCart(rowIndex)}>

        <input
          id="input-quantity"
          value={formatExtraData(rowIndex)}
          onChange={// Custom on change goes here}
        />

 removeFromCart(rowIndex)}>

    );
  };

Hi, you can change the div that contains the number to a input so you can attach onChange method to it and support user input.
  const dataFormatter = (cell, row, rowIndex, formatExtraData) => {
    return (

 addToCart(rowIndex)}>

        <input
          id="input-quantity"
          value={formatExtraData(rowIndex)}
          onChange={// Custom on change goes here}
        />

 removeFromCart(rowIndex)}>

    );
  };

I tried the same thing before but it won't update the value at all

@dashName, you can send your custom onChange method, so I can see if is there any problem?

@dashName, you can send your custom onChange method, so I can see if is there any problem?

 const handleChange = (e) => {
        console.log(e.currentTarget.value,row)
        this.setState(prevState => ({
            tableCounters: prevState.tableCounters.map((item, index) => {
                    return { counter: e.currentTarget.value };
            })
        }));

    };

it is updating the value

Your onChange method is not actually changing the counter for a specific row, you need to pass along with the event the row index that you want to change the counter.
Like this
onChange={e => onChange(rowIndex, e)}

Your onChange method will look like this
  handleChange = (rowIndex, e) => {
    this.setState(prevState => ({
      tableCounters: prevState.tableCounters.map((item, index) => {
        if (index === rowIndex) {
          return { counter: e.currentTarget.value };
        }
        return item;
      })
    }));
  };

Your onChange method is not actually changing the counter for a specific row, you need to pass along with the event the row index that you want to change the counter.
Like this
onChange={e => onChange(rowIndex, e)}

Your onChange method will look like this
  handleChange = (rowIndex, e) => {
    this.setState(prevState => ({
      tableCounters: prevState.tableCounters.map((item, index) => {
        if (index === rowIndex) {
          return { counter: e.currentTarget.value };
        }
        return item;
      })
    }));
  };

yes you are right.Thanks

Hi @dashName, it worked properly?

Hi @dashName, it worked properly?

seems to be working perfectly.Thanks

Hi @dashName, it worked properly?

seems to be working fine.But only thing is handleChange Triggers on Click on add to cart button as well so cart gets messed up

@Ymbere I see that onChange value doesn't update in formatExtraData.

Hi, I didn't understand, can you explain in more details?

Hi, I didn't understand, can you explain in more details?

so in the below logic: handleChange = (rowIndex, e) => {
this.setState(prevState => ({
tableCounters: prevState.tableCounters.map((item, index) => {
if (index === rowIndex) {
return { counter: e.currentTarget.value };
}
return item;
})
}));
};
the tableCounters should update to user input as well as formatExtraData(rowIndex) right..but it doesn't

I think you are missing the e on the formatExtraData, it should be
formatExtraData(rowIndex, e)

I think you are missing the e on the formatExtraData, it should be
formatExtraData(rowIndex, e)

I think it seems to be working.I actually added defaultValue={formatExtraData(rowIndex)} to avoid the warning:Input elements should not switch from uncontrolled to controlled thats why the value was not updating.

I think you are missing the e on the formatExtraData, it should be
formatExtraData(rowIndex, e)

I think it seems to be working.I actually added defaultValue={formatExtraData(rowIndex)} to avoid the warning:Input elements should not switch from uncontrolled to controlled thats why the value was not updating.

You add a default value to the input tag?

I think you are missing the e on the formatExtraData, it should be
formatExtraData(rowIndex, e)

I think it seems to be working.I actually added defaultValue={formatExtraData(rowIndex)} to avoid the warning:Input elements should not switch from uncontrolled to controlled thats why the value was not updating.

You add a default value to the input tag?

yes

I think you are missing the e on the formatExtraData, it should be
formatExtraData(rowIndex, e)

I think it seems to be working.I actually added defaultValue={formatExtraData(rowIndex)} to avoid the warning:Input elements should not switch from uncontrolled to controlled thats why the value was not updating.

You add a default value to the input tag?

let say i want to reset the value of formatExtraData to 0 when add to cart is clicked so how can we do that?


Skip immediate decompression step

The README states that currently only one coverart image per flac file is supported by reflac. I have quite a few files with multiple images embedded, thus unfortunately making reflac not usable with my collection. I then looked into the code to see how hard it'll be to implement multiple embedded images and then started wondering about how reflac handles the recompression.
From what I can gleam from the code, the process works like this:

extract metadata (tags) and embedded images from the flac file using metaflac
decompress to a wav file in the TMPDIR (flac -d)
compress wav file in TMPDIR to flac file
tag flac file with metadata extracted in step 1

I wonder why the immediate decompression step is necessary here? The flac tool supports recompressing existing flac files out of the box, like so:
flac -V -8 input.flac -o output.flac

This operation also preserves all metadata, making the calls to metaflac obsolete and thus would simplify reflac. This also fixes the limitation with the embedded images.

I think when I first made reflac, the normal flac program didn't have the capability to take in flac as input. I haven't noticed the development in being able to do so, either. (Or maybe it always had it and I've just been oblivious)
All good points, I'll check it out and see if I can refactor this thing. Shouldn't pose too much difficulty :)

Thank you for looking into it! ❤


HTTP User-Agent Upgrade

The HTTP User-agent now consists of:
Library name/version; OS name; os/kernel version; processor architecture; processor name; compiler/version.
On Linux, Windows, and Mac OS on x86 or x64 platforms, this is all automatically populated. In other situations, depending on the environment, some of this information may be populated. For any information that cannot be found, an environment variable can be defined (undefined variables for info not automatically detected by the library throw a warning but do not prevent user from continuing).
Tested on Ubuntu, Windows 10, and Mac OS.
The Safe C Stub now contains function strremovews_s, which allows for leading and trailing white space on strings to be safely removed.

Sorry for the delay on that analysis.  They might be false positives to boot. I'm investigating both issues.


feat(chat): add guild kinds, add direct message and room guilds

the protocol shouldn't be strongly opinionated; there are three ways to deal with any invitation anywhere:

accept
decline
ignore

these have different ramifications/social implications that users may want, so we should support all three


Sequence not added in In flow

Description:

I make case in document "Map the Parameters of your Backend URLs with the API Publisher URLs", https://docs.wso2.com/display/AM210/Map+the+Parameters+of+your+Backend+URLs+with+the+API+Publisher+URLs
I commit file on step 13, but on step 14 i can't engage "In Flow" since TestSequence not on the list

By Pavel Kiselev from https://wso2.org/jira/browse/APIMANAGER-6057

This feature is now changed with the new API Policy feature. Please check with the latest 4.2.0


Support shallow validations on template schemas

Changes:

Pulled the templates and factories out into a standalone libraries with basic validations for the schema requirements.
Added UTs to cover valid and invalid scenarios.
Make API changes to use the .NET STANDARD 2.0.

Limitations:

As for now, it's hard to get the rid of factories in validations. The chained factory wrappers are used to handle template variations in the generalized workflow. Another option would be to tweak the JSON.NET library to come up with another framework, which could be very similar but time consuming. On the other side, by having the validation in the factory logic, it also does one stop shop for deserialization and validation together.
This PR hasn't added the deep relational validation yet, for example, the schema requirements sit on multiple objects, like mutual exclusive, or collection of objects, like non-empty etc. That can be done in next iteration or a new revision when the current way gets consented by team.
The whole templating workflow and strategy will be revisited from a higher level with holistic view as well as some new roadmap or requirements. So the goal of this PR is to manage the affecting areas, introducing basic validation logics running for the current templates before the new solution implemented. It also forms shared dependency for other platforms and OSS function runtimes, which will be built with more sharing logic gradually.

Replace this pull request with https://github.com/microsoft/iomt-fhir/pull/56


chore(main): release cli 1.3.0

:robot: I have created a release beep boop
1.3.0 (2024-05-24)
Features

test release & doc update (25ed2ad)
test release & doc update (b497bbf)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/flexydox/flexydox/releases/tag/cli%40v1.3.0 :sunflower:


Open web pages in a custom browser

Other apps open pages in IceCat, but OpenFood starts Chrome (which shows ToS).

Does it switch apps or try to open a webview ?

Switch (a new window appears).

Ok. What is expected is an overlay with ChromeCustom tabs (for systems that have it) that falls back to a Webview (with the default system FOSS webview)

Preparing for other browsers
Remember the user may have more than one browser installed that supports Custom Tabs. If there's more than one browser that supports Custom Tabs and none if them is the preferred browser, ask the user how she wants to open the link
/**
 * Returns a list of packages that support Custom Tabs.
 */
public static ArrayList getCustomTabsPackages(Context context) {
    PackageManager pm = context.getPackageManager();
    // Get default VIEW intent handler.
    Intent activityIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.example.com"));

    // Get all apps that can handle VIEW intents.
    List resolvedActivityList = pm.queryIntentActivities(activityIntent, 0);
    ArrayList packagesSupportingCustomTabs = new ArrayList<>();
    for (ResolveInfo info : resolvedActivityList) {
        Intent serviceIntent = new Intent();
        serviceIntent.setAction(ACTION_CUSTOM_TABS_CONNECTION);
        serviceIntent.setPackage(info.activityInfo.packageName);
        // Check if this package also resolves the Custom Tabs service.
        if (pm.resolveService(serviceIntent, 0) != null) {
            packagesSupportingCustomTabs.add(info);
        }
    }
    return packagesSupportingCustomTabs;
}

Allow the user to opt out of Custom Tabs
Add an option into the application for the user to open links in the default browser instead of using a Custom Tab. This is specially important if the application opened the link using the browser before adding support for Custom Tabs.

https://developer.chrome.com/multidevice/android/customtabs#bestpractices

This is implemented, no? Safe to close?


consecutive set-tier commands errors with "Too many files open"

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az storage blob set-tier
Errors:
HTTPSConnectionPool(host='pittprodrnel.blob.core.windows.net', port=443): Max retries exceeded with url: /rnel-archive-alan-20200304104704/ECoG_Correlation_Plots/DS012R01_CHN_56_corr.emf?comp=tier (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f9a98b6e128>: Failed to establish a new connection: [Errno 24] Too many open files',))
HTTPSConnectionPool(host='pittprodrnel.blob.core.windows.net', port=443): Max retries exceeded with url: /rnel-archive-alan-20200304104704/ECoG_Correlation_Plots/DS012R01_CHN_56_corr.emf?comp=tier (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f9a98b6e128>: Failed to establish a new connection: [Errno 24] Too many open files',))
...
2020-03-04 11:27:42 INFO     containerBlobTier : Command : storage blob set-tier --container-name rnel-archive-alan-20200304104704 --account-name xxxxx --account-key xxxx --output none --tier Archive --name xxxx
The command failed with an unexpected error. Here is the traceback:

[Errno 24] Too many open files: '.azure/commands/2020-03-04.11-27-42.unknown_command.23182.log'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/knack/cli.py", line 206, in invoke
  File "/usr/local/lib/python3.5/dist-packages/azure/cli/core/commands/__init__.py", line 486, in execute
  File "/usr/local/lib/python3.5/dist-packages/knack/cli.py", line 162, in raise_event
  File "/usr/local/lib/python3.5/dist-packages/azure/cli/core/azlogging.py", line 80, in init_command_file_logging
  File "/usr/local/lib/python3.5/dist-packages/azure/cli/core/azlogging.py", line 101, in _init_command_logfile_handlers
  File "/usr/lib/python3.5/logging/__init__.py", line 1008, in __init__
  File "/usr/lib/python3.5/logging/__init__.py", line 1037, in _open
OSError: [Errno 24] Too many open files: '.azure/commands/2020-03-04.11-27-42.unknown_command.23182.log'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az storage blob set-tier --container-name {} --account-name {} --account-key {} --output {} --tier {} --name {}

Expected Behavior
Environment Summary
Linux-4.8.0-53-generic-x86_64-with-LinuxMint-18.2-sonya
Python 3.5.2

azure-cli 2.1.0

Additional Context

HI @Juliehzl could you pls have a look? thanks

add to S167.

@nitrosx , I cannot reproduce this error with the same command. Could you please help provide more information to help us to investigate?


Refactoring build to have a subcommand upload

Hi, I've worked on #11 to get a local build setup.
I've made a few small refactorings:

Using tempfile.TemporaryDirectory instead of custom ensure_tmp_folder_exists to get a truly temporary directory for the build.
Using click.echo instead of print for better console compatibility.
Using Path instead of os for improved readability.
Split the command build into build and upload, the latter as a subcommand that can be chained.

Usage
Build
❯ pystructurizr build --help
Usage: pystructurizr build [OPTIONS] VIEW FILE_PATH COMMAND1 [ARGS]...
                           [COMMAND2 [ARGS]...]...

  Build VIEW into an SVG and save it to FILE_PATH.

  FILE_PATH can be a directory or a file name. If it is a directory, the
  file name will be the view name.

  Can be chained with `upload` to upload the resulting file to a cloud
  storage provider.

Options:
  --help  Show this message and exit.

Commands:
  upload

Example:
pystructurizr build examples.module_example.systemlandscapeview img/

Upload
❯ pystructurizr build examples.module_example.systemlandscapeview img/ upload
 --help
img/examples_module_example_systemlandscapeview.svg
Usage: pystructurizr build VIEW FILE_PATH upload [OPTIONS]

Options:
  --gcs-credentials PATH  Path to the credentials.json file for Google Cloud
                          Storage.
  --bucket-name TEXT      The name of the bucket to use on Google Cloud
                          Storage.
  --object-name TEXT      The name of the object to use on Google Cloud
                          Storage.
  --help                  Show this message and exit.

Example:
pystructurizr build examples.module_example.systemlandscapeview img/ --gcs-credentials <...> --bucket-name <...> --object-name <...>

Thanks for your contribution. Unfortunately your change breaks backward compatibility since it modifies the existing "build" command.
Can you instead add this functionality as a new command, e.g. "buildlocal"?

Hi @nielsvanspauwen , thanks for reviewing this. Should I keep the current "chain" behavior proposed on this PR, or only keep the "buildlocal" part?
This current proposal is not backward compatible to be published into a minor version, but it has the advantage of well integrating the resulting splitting build into two chainable commands. Have you considered a major version bump with a backward incompatible note?


fix glayout workflows

fix the following two workflows:

Opamp parametric simulations
Pcell test script

is this ready?


Added limit calls to rzv_where:...

Added limit parameter call to rz_where:... calls from NSManagedObject
Added baseline tests for limit

Nice idea. It'd be good to have a constant that represents “no limit” instead of passing the 0 literal. Possible names include RZVNoLimit, RZVNoFear, and RZVGottaCatchEmAll.

If you're adding limit, shouldn't offset come along for the ride?  I can see how the former is useful by itself, so I'd go ahead without offset.

Yea, doing this without the offset is a bit weird. And then objective-c does this awesome thing where the number of methods required becomes insane.
Adding fetchRange:(NSRange) is another option, location for the offset and length for the limit.

Any thoughts @dostrander? If this is useful then we should include it, but I'd like for the API to be as clean as we can make it.

@jwatson I'll use @KingOfBrian's suggestion of fetchRange:(NSRange)range  and fix it up tomorrow morning for approval


Path, file directory

Allow paths, files and directories, check existence.

Needs:

[ ] FilePath
[ ] DirectoryPath

Anything else (eg. FileInExistingDirectoryPath) is probably over complicated.

@samuelcolvin can we close this issue?


Fix convert ip addressto binary

script has function that is never called.  remove function and run as script.

Removed the function, so it will run as a script


To discuss: Does anyone have other or better approaches for bottom-up implementation?

Per discussion in the 2nd Composables call, creating "to do" items in Github Issues for areas where we could use help from devs who want to contribute.
This question comes from the 3rd Composables call.

I think it would be a good idea to break down the ComposablesBottomUp and ComposablesTopDown  contract implementations into separate files for each of NFT ERC721 and FT ERC20/223 composable components.
Then provide example contracts that inherit each of the broken down granular contracts to create contracts with functionality equivalent to the current all-inclusive examples. This will make it easier for developers exploring this library to mix and match their preferred features.

@viltiki I agree with you. Such an implementation would be welcome.

as per https://github.com/ethereum/EIPs/blob/master/EIPS/eip-998.md, are ERC998ERC20TopDown, ERC998ERC20BottomUp missing here?

ERC20 Bottom-Up Composable interesting decision to make ERC998ERC20BottomUp an ERC20 token in itself? But what if we want to allow vanila ERC721 to own valina ERC20 tokens?


[DO NOT MERGE] docs: bump pdf stable version to release-7.1

Update the stable PDF version of TiDB and TiDB Cloud:

TiDB: the stable PDF version is updated from release-6.5 to release-7.1.
TiDB Cloud: the stable PDF version will remain at release-6.5 to ensure consistency with the current TiDB Cloud documentation.

@shczhen PTAL


Minor issues

In Postgres, DBeaver doesn't recognize a schema with a period in it such as rms.nrcadmin.  This is allowed in Postrgres and I have to do setup in Admin4 to get around this problem

Adding a function to an existing bit of text is quite annoying because of the automatic addition of a closing parentheses bracket.  For example I have an existing column XXX in a query and want to add a rounding statement to it.  round()XXX is what happens and I have to manually remove the closing ")".  And if I forget I get errors.  Please fix so that if starting next to existing text that doesn't happen, or put the ")" at the end of the text.

What do you mean under "don't recognize"? I can create and browse schemas with any characters in name, including period:

You can disable this in preferences:

  I haven’t tried the latest version but with version 5.0.2 I get the following error when creating a new schema.  If this has changed in the next one then I’ll be happy to download it.

From: Serge Rider<EMAIL_ADDRESS>Sent: Saturday, May 12, 2018 4:09 PM
To: dbeaver/dbeaver<EMAIL_ADDRESS>Cc: BobInCT<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [dbeaver/dbeaver] Minor issues (#3462)

What do you mean under "don't recognize"? I can create and browse schemas with any characters in name, including period:
https://user-images.githubusercontent.com/6398845/39961167-512fe2fa-5639-11e8-911f-7ebee2360def.png
You can disable this in preferences:
https://user-images.githubusercontent.com/6398845/39961171-6acf7338-5639-11e8-9481-50b6845fb89b.png

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/dbeaver/dbeaver/issues/3462#issuecomment-388579780 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACS_aNTAK0eskAGajA0MssLFMTXFrqunks5tx0FWgaJpZM4T8hF4 .

Please reply on GitHub, you can't use attachments in email notifications reply.

Sorry, new to GitHub.  This is the error I see with version 5.0.2 by trying to add new schema abc.xyz

Yep, I think you should try the latest version.
There were a few fixes in PG extension recently.

Thanks.  And appreciate the work you're doing, great product

I just updated to version 5.05 and still get the above error when I attempt to add a new schema via the following dialog

Now I can reproduce this.
The problem is not in the schema name but in the owner name (which also contains period).
Fix will be added in 5.0.5, thanks for details.


struct method and property with same name when foreign key used

Given the following schema, a struct is created with a method name matching a property name.
CREATE TABLE `fragment` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`fragment` VARCHAR(100) NOT NULL,
`fragment_id` BIGINT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

ALTER TABLE `fragment` ADD CONSTRAINT `fragment_fragment_unique` UNIQUE (`fragment`);
ALTER TABLE `fragment` ADD CONSTRAINT `fragment_fragment_id_fk` FOREIGN KEY (`fragment_id`) REFERENCES `fragment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

Apparently it's the foreign key to the table of the same name.
// Fragment represents a row from 'dbname.fragment'.
type Fragment struct {
    ID         int64  `json:"id"`          // id
    Fragment   string `json:"fragment"`    // fragment
    FragmentID int64  `json:"fragment_id"` // fragment_id

    // xo fields
    _exists, _deleted bool
}

// Fragment returns the Fragment associated with the Fragment's FragmentID (fragment_id).
//
// Generated from foreign key 'fragment_fragment_id_fk'.
func (f *Fragment) Fragment(db XODB) (*Fragment, error) {
    return FragmentByID(db, f.FragmentID)
}

Perhaps rather than adding logic for this, there should just be a warning about columns that match the name of the table when using foreign keys. Doesn't seem like a common use case.

Same problem on me when I attempting to generate models against a large legacy MySQL database.

I believe for the most part, but using the --fk-mode and --use-index-names option you can have xo generate different names for foreign keys / indexes, if there are conflicts.


[Feature] An option to include old names of renamed files in deleted_files array

Is this feature missing in the latest version?

[X] I'm using the latest release

Is your feature request related to a problem? Please describe.
I'm working on a GitHub action workflow where I need a list of all the deleted files, right now the deleted_files output includes only the files which are completely removed and excludes the ones which are renamed. In many cases such as mine[^1], old names of the renamed files are considered deleted and utilised as such.
Right now, as a workaround I'm using include_all_old_new_renamed_files flag I'm using all_old_new_renamed_files to get the old names of the renamed files and later both the lists are combined in the execution script, but that process is not that straight forward.
Firstly, I don't know why JSON option doesn't work on all_old_new_renamed_files array and everything is passed as one single string, then all different rename cases needs to be separated using the symbol passed as old_new_files_separator parameter, after that old & new named needs to be separated using symbol passed as old_new_separator  parameter
[^1]: Building documentation with docs as code, need to update search service (Algolia), about the pages which are removed from the content
Describe the solution you'd like?
I would suggest the solution with the following design

An boolean input parameter like include_old_renamed_in_deleted
When the above parameter is passed with the value true, the deleted files and old names of the renamed files are given as a combined output variable
The renamed files can be combined in the deleted_files array parameter only or the output can be combined in a separate array

Describe alternatives you've considered?
Right now the script utilising the deleted files list, I'm using the same script to combine two arrays of deleted files & renamed files into a single list. But the process is cumbersome as highlighted above
Anything else?
No response
Code of Conduct

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

@anshulsahni Given the nature of this feature as described it sounds like you're on the right path. It would introduce complexity with little benefit. However, I can always circle back to implement it but the use case can be better handled in a separate action.
run: |
   DELETED_AND_OLD_RENAMED_FILES=(${{...}} ${{...}})


[WIP] ADBDEV-1938

When we ask GPDB to explain a query, it uses flow to count rows number, and it can be either a single segment command, acommand can be executed on all segments or a limited number of segments in general cases. But there are cases when the flow is not generated, so GPDB uses segments count by default, what can be incorrect for some nodes, which are executed on a single segment only, for example.
DROP TABLE IF EXISTS lab1;
CREATE TABLE lab1 (id int, descr text) WITH (appendonly=true) DISTRIBUTED BY (id);
INSERT INTO lab1 SELECT generate_series(1,5000) AS id, md5(random()::text) AS descr;
explain analyze select t1.id, row_number() over (order by t1.id desc) from lab1 t1 join lab1 t2 using(descr);

If we explain this query, we will get an output like this:
   Order By: lab1.id
   ->  Gather Motion 2:1  (slice2; segments: 2)  (cost=0.00..8179.15 rows=25000000 width=4) (actual time=7877.092..12694.123 rows=25000000 loops=1)
         Merge Key: lab1.id
         ->  Sort  (cost=0.00..7730.15 rows=12500000 width=4) (actual time=7874.529..9583.758 rows=12730000 loops=1)
               Sort Key: lab1.id
               Sort Method:  external merge  Disk: 195520kB
               ->  Hash Join  (cost=0.00..1046.52 rows=12500000 width=4) (actual time=6.390..1543.301 rows=12730000 loops=1)
                     Hash Cond: (lab1.descr = lab1_1.descr)
                     Extra Text: (seg1)   Hash chain length 5000.0 avg, 5000 max, using 1 of 131072 buckets.
                     ->  Seq Scan on lab1  (cost=0.00..431.07 rows=2500 width=37) (actual time=0.180..2.948 rows=2546 loops=1)
                     ->  Hash  (cost=435.54..435.54 rows=5000 width=33) (actual time=4.338..4.338 rows=5000 loops=1)
                           ->  Broadcast Motion 2:2  (slice1; segments: 2)  (cost=0.00..435.54 rows=5000 width=33) (actual time=0.084..2.978 rows=5000 loops=1)
                                 ->  Seq Scan on lab1 lab1_1  (cost=0.00..431.07 rows=2500 width=33) (actual time=0.167..0.803 rows=2546 loops=1)
 Planning time: 24.088 ms
   (slice0)    Executor memory: 232K bytes.
   (slice1)    Executor memory: 204K bytes avg x 2 workers, 204K bytes max (seg0).
 * (slice2)    Executor memory: 67558K bytes avg x 2 workers, 67558K bytes max (seg0).  Work_mem: 65758K bytes max, 612237K bytes wanted.
 Memory used:  128000kB
 Memory wanted:  1837210kB
 Optimizer: Pivotal Optimizer (GPORCA)
 Execution time: 20194.755 ms
(22 rows)

As we see, WindowAgg has 12500000 rows, when its nested plan contains 25000000 rows, and WindowAgg has a number of rows less than expected exaclty the number of segments, what is caused by missing flow.
This patch doesn't rely on flow, it uses gangSize of a current slice which is calculated correctly and always presents. gangSize is a simple and reliable way to get a number of segments which processed some part of a plan.
However, orca has another bug related with how it calculates rows number. The specialty of orca is that it can return fractional number of rows, and explain should ceil them later. It can lead to a situation when orca returns a wrong rows number, explain ceils it and we get an incorrect answer. For example, such query
create table tcorr1(a int, b int);
create table tcorr2(a int, b int);

insert into tcorr1 values (1,99);
insert into tcorr2 values (1,1);

explain
select *
from tcorr1 out
where out.b in (select coalesce(tcorr2.a, 99)
                from tcorr1 left outer join tcorr2 on tcorr1.a=tcorr2.a+out.a);

will get a plan like this
                                               QUERY PLAN
--------------------------------------------------------------------------------------------------------
 Result  (cost=0.00..1356692026.74 rows=1 width=8)
   Filter: (SubPlan 1)
   ->  Gather Motion 3:1  (slice1; segments: 3)  (cost=0.00..431.00 rows=1 width=8)
         ->  Seq Scan on tcorr1  (cost=0.00..431.00 rows=1 width=8)
   SubPlan 1  (slice0)
     ->  Result  (cost=0.00..1324032.56 rows=2 width=4)
           ->  Nested Loop Left Join  (cost=0.00..1324032.56 rows=2 width=4)
                 Join Filter: (tcorr1_1.a = (tcorr2.a + tcorr1.a))
                 ->  Materialize  (cost=0.00..431.00 rows=1 width=4)
                       ->  Gather Motion 3:1  (slice3; segments: 3)  (cost=0.00..431.00 rows=1 width=4)
                             ->  Seq Scan on tcorr1 tcorr1_1  (cost=0.00..431.00 rows=1 width=4)
                 ->  Materialize  (cost=0.00..431.00 rows=1 width=4)
                       ->  Gather Motion 3:1  (slice2; segments: 3)  (cost=0.00..431.00 rows=1 width=4)
                             ->  Seq Scan on tcorr2  (cost=0.00..431.00 rows=1 width=4)
 Optimizer: Pivotal Optimizer (GPORCA)
(15 rows)

As we see, nested loop join has two rows when it can have only one. This happens because orca return 1.2 rows for this node and explain ceils this number to 2.

@Stolb27 I suppose, as far as the idea itself belongs to you, it is you, who should finish up the work :)

@Stolb27 I suppose, as far as the idea itself belongs to you, it is you, who should finish up the work :)

@dnskvlnk, please check failed test and update it, if it's needed.

@dnskvlnk, please fix one more failure connected with @red1452's patch merged earlier.


fixing busted stuff

While #900 unblocked the build, it did so in a way that broke the way the "histogram" was computed. This reverts those changes, while continuing to ensure that it doesn't generate any invalid ranges like 0..0 - so now the tests pass.

this fixes #900


State of the autocompletion of pyjanitor methods using jedi.

Brief Description
I found the completions proposal of pyjanitor methods in the jupyter notebooks a bit difficult to use and wanted to check if it was my install or a general phenomenon.
Roughly put I only get the completion proposal of pyjanitor methods if it is a fist step of method chaining. And in a chain I don't get any completion after a pyjanitor method.
Minimally Reproducible Code
See the gist below
https://gist.github.com/VPerrollaz/3fcbe3769264a6ed6f38e6a10c464ca5

Wow, that is a big bug catch, @VPerrollaz! I have to admit to not knowing much about tab completions here. You seem to have a better grasp surrounding the tooling for testing here.
At the moment, the only thing I can think of that might interfere with tab completion is the use of pandas-flavor to monkey-patch methods onto a dataframe at runtime. But as for how to debug why tab completion behaviour is as you've described in the gist, I'm a bit at a loss.

There is definitely something going on with pandas flavor, there is an issue on the repository about this, but basically since they didn't look at method chaining they were happy about the first completion proposed by jedi in ipython repl/jupyter notebook.
Furthermore the  pandas-flavor repository doesn't feel very alive at the moment. Maybe because as they explain in the README.md there is now an official pandas API for monkey-patching?
So far what I got for the explanation is that in ipython repl/ jupyter notebook jedi is used via the object Interpreter which used the namespace argument for parsing the code and thus it catches the pyjanitor add by monkey-patching.
However in method chaining the first methods do not modify the namespace so we don't get anymore proposition for completion after (this part of the argument feels a bit weak I will have to test it I think before being sure)
Finally I think when you use Script the parser only look at the time pandas was first imported so the monkey-patching afterward is invisible.

Looking again at the jedi documentation and more precisely at the section limitations
https://jedi.readthedocs.io/en/latest/docs/features.html#recipes
it is clear that by design jedi doesn't look for setattr, which is precisely at the core of how pandas_flavor works so I think that sadly the autocompletion problem is not considered a bug.

That's a wonderful catch!
Would you be open to a documentation PR that helps newcomers recognize this issue? We can go over the exact phrasing in the PR discussion.

In principle no problem, but what kind of information do you want to provide?

Many thanks @VPerrollaz! I think the best info to provide someone is something along the lines of "here's what to expect with respect to tab completion" in your IDE.
Example starter that you can use to get going:
Tab completion behaviour may vary from IDE to IDE.
For a historical perspective on this, please check out the following issues on GitHub:

- https://github.com/ericmjl/pyjanitor/issues/660
- <put in the others you've found>

I suspect that should be enough to help newcomers recognize that the inconsistent tab completion behaviour is a bit complicated to work through, and relies on other ecosystem tools working together better.

By the way, about official namespacing - I did think about it. Maybe in the 1.0 release, as this would be a breaking change. An example would be:
df.jn.clean_names().jn.drop_duplicates()

The additional .jn would be a minimal addition that adds explicitness to the method chains, as right now it's muddled up which functions are pandas-native and which are pyjanitor-patched. This would be a breaking change for end-users though, so it needs user community agreement.

Ok just one additional question. Where do you want me to put the info in the doc hierarchy?
As for the namespace there might be a way to import in a different way if one want to use jn as in you example, in this way you would not break backward compatibility.
I plan to take a look at the jedi/parso codebase to see if there is a way around the problem but given its size it might take some time.

Ok just one additional question. Where do you want me to put the info in the doc hierarchy?

My apologies! I should have been a bit clearer on where. I looked through the docs pages, and I think the current logical place is right on the main page. However, if you have a better idea, I'm all ears! Please let me know what you think.

Before committing anything about autocompletion, which at this point would be mainly about what doesn't work, I have been looking for alternative use of janitor functions which would allow for jedi completions.
I have come up with the following which is pretty ugly because of the lambda expressions but it is a start and the autocompletion is very neat.
https://gist.github.com/VPerrollaz/6b3c0684cba9d6305c3c10aba103e383

Hey @VPerrollaz! I looked at your gist, and it doesn't look ugly at all :smile:. That said, if I am reading the pandas pipe API correctly, all args and kwargs are collected automatically, so you shouldn't need to do lambdas, I think. I'm sure if you do a tab after jn.clean_ you'll get the right thing.

I can indeed pass the arguments to pipe rather than use lambda but in this way I don't get the autcompletion which was the point. Which was why I was trying to figure out if there is an "automatic" way to produce a higher order function from the janitor functions while keeping the signature alive for autocompletion. Ideally rather than
df.pipe(lambda df: jn.clean_names(df, strip_underscores=True))

we would do
df.pipe(jn.ho.clean_names(strip_underscores=True))

where ho would be a submodule where all the higher order versions live.
Of course it is hypothetical at this point, and I'm not sure it is even a good idea.

Proof of concept here
https://gist.github.com/VPerrollaz/68d3bcaade2ce77b545d94b51ee1f6ba
but once again it feels very hacky. The good (?) news being that jedi seems to check the __signature__ attribute in interpreter mode if it exists.

Here is a more complete attempt with all relevant functions of janitors.functions.py dynamically "higheroderized".
https://gist.github.com/VPerrollaz/30d3bce1f7fc678ffd00a19d8231e3fa

jedi doesn't look for setattr, which is precisely at the core of how pandas_flavor

Just a small clarification—the setattr limitation is an issue with pandas directly, not pandas-flavor. Pandas-flavor is simply an alias to Pandas' native extension API. For earlier versions of pandas (<0.23), pandas-flavor backports the extension API, and yes, uses setattr.
It might be worth opening an issue on pandas directly to handle auto-complete on methods registered at runtime using this extension API.
We can try to solve it in pandas-flavor instead, making pandas-flavor a powered-up version of Pandas' extension API. I'd be happy to review a PR there. If you do come up with a solution, I think you'd want this auto-complete in pandas-flavor (or even pandas), not pyjanitor specifically. It would benefit any libraries trying to extend pandas' API.

You're right of course.
The reason I mentioned it in pyjanitor repo is actually because it is where I encountered it.
An additional reason is that while I understand why there is no autocompletion using jedi in an IDE ( the Script object in Jedi does not look at setattr indeed) I am not clear on why we don't get method chaining autocompletion in ipython/jupyter (which uses the Interpreter object in Jedi which is more dynamic) because the method signature are perfect. (though looking at the code in pandas they rather use the return type "DataFrame" rather than pandas.core.frame.DataFrame so maybe it is something to look into)
So I proposed the above workaround using pipe and higherorder functions but I agree that it is not the most desirable solution.

@Zsailer
Looking at the following
https://gist.github.com/VPerrollaz/543fc5bd6408b4e30c3165e4d98591a0
it seems that a quick workaround  for the problem might be the following change in the module register.pyof pandas_flavor. Note that it is rather ugly since we are basically tricking jedi by falsifying the signature in forwarding the  __annotations__ of the method into the __annotations__ of the AccessorMethod object
def register_dataframe_method(method):
    """Register a function as a method attached to the Pandas DataFrame.
    Example
    -------
    .. code-block:: python
        @register_dataframe_method
        def print_column(df, col):
            '''Print the dataframe column given'''
            print(df[col])
    """
    def inner(*args, **kwargs):

        class AccessorMethod(object):

            def __init__(self, pandas_obj):
                self._obj = pandas_obj

            @wraps(method)
            def __call__(self, *args, **kwargs):
                return method(self._obj, *args, **kwargs)

        register_dataframe_accessor(method.__name__)(AccessorMethod)

        return method
    result = inner()
    result.__annotations__ = method.__annotations__
    return result

Actually rather than just forwarding __annotations__ we might have to create and then forward the whole __signature__but the principle remains the same.

Sadly jedi seems to sometimes look at this stuff and sometimes not, and so far I am not clear when...

Oh my, looks like jedi is super complicated, haha. Thank you for taking the time to look at this, @VPerrollaz. I am confident that the hard work will eventually pay off.


Application Monitoring

Is there interest in adding an application monitoring solution such as Sentry (which can be self-hosted if you don't want to pay for Saas)? If so I can, spend some time adding it in.

hey @scefali thanks for this! Definitely interested in learning more - could you maybe post more details on how this works and which parts will be the most useful for devs building an AI app? Excited to dive in!

@ykhli Sure! So Sentry has a Next.js sdk that would be useful here. It provides error, performance, and session replay monitoring out of the box. I added Sentry to the EpicStack which is also hosted on Fly.io so I'd largely follow the same strategy I did there.


Day01 #2

Oops, I think I meant to put just line instead of line[::-1] there.

I was on mobile when I first opened this issue but I noticed some errors in my question regarding your Part 2 solution so I tried to revert this issue. Unfortunately, I couldn't on mobile, or at least, I did not find a way.
I was to inquiry about dynamically producing the regex pattern, I had an idea on how to do it but I couldn't decide whether the code would remain "pythonic" or not:
def process(line: str) -> int:
    m = re.search(rf"[0-9]|{'|'.join([d for d in DIGITS)}", line)
    assert m
    first = text2number(m.group())
    #
    m = re.search(rf"[0-9]|{'|'.join([d[::-1] for d in DIGITS])}", line[::-1])
    assert m
    last = text2number(m.group()[::-1])

    return first * 10 + last

Here, I prefer the more explicit way that I find more readable. Thanks, anyway.