sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Strange behaviour of cv2.add operation
Labels: bug,category: python bindings

### System Information

OpenCV python version: 4.9.0.80
Operating System / Platform: Ubuntu 22.04.4 LTS (WSL)
Python version: 3.10.12

### Detailed description

I am expecting that cv2.add will truncate the results of addition between [0, 255], but that's not happening in cv2 4.9.0.80 as can be seen below :
```
(py2k23) onkar@DESKTOP-MT8AVE7:~/$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> x = np.uint8([250])
>>> y = np.uint8([10])
>>> import cv2
>>> print(cv2.add(x, y))
[[260.]
 [  0.]
 [  0.]
 [  0.]]
>>> print(x+y)
[4]
>>> print(cv2.__version__)
4.9.0
>>> 
```

I tested the same behavior in other environment  which is having cv2 3.4.18.65 and there it is working as expected.

```
(myPyTestEnv) onkar@DESKTOP-MT8AVE7:~$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> import cv2
>>> x = np.uint8([250])
>>> y = np.uint8([10])
>>> z = cv2.add(x, y)
>>> print(z)
[[255]]
>>> print(cv2.__version__)
3.4.18
>>>
```


### Steps to reproduce

To repro the problem, just follow the OpenCV tutorials [here](https://docs.opencv.org/3.4/d0/d86/tutorial_py_image_arithmetics.html) with cv2 version 4.9.0.80


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: godot
Issue: Script editor opens script on crash when using external editor
Labels: bug,topic:editor

### Tested versions

4.2.1.stable

### System information

MacOS and Windows 11

### Issue description

When using an external editor such as VSCode, if the game crashes from debug, Godot will open the script in the Script Editor. This will sometimes cause an issue where if the code is changed in VSCode, Godot will revert it to a previous state when the game is ran again.

### Steps to reproduce

Make a mistake in an external editor and run the game. After the crash, the script will be opened in the internal Godot editor. It is very inconsistent, and I'm not sure how to get it to revert the code to a previous state after a change in the external editor and ran again.

### Minimal reproduction project (MRP)

Any project should work with external editor configured.
Repository: flutter
Issue: flutter precache: explain what are "currently enabled plaforms"
Labels: tool,d: api docs,c: proposal,team-tool

```
$ flutter precache --help
Populate the Flutter tool's cache of binary artifacts.

If no explicit platform flags are provided, this command will download the artifacts for all currently enabled platforms

...
```

What are _currently enabled platforms_? Let's say I don't have any Flutter project on my machine and I run `flutter precache` – how are enabled platforms inferred?

On Linux, I noticed that `flutter precache` is equivalent to `flutter precache --android --web --linux`.

On macOS I noticed that `flutter precache` is equivalent to `flutter precache --android --web --macos --ios`.

So I can see the pattern (currently enabled platforms are all platforms that can be built on the current OS), but I feel like it's not explained well enough. 

I think the help message should answer these doubts.
Repository: ant-design
Issue: notification在浏览器休眠模式下，自动关闭功能失效
Labels: Inactive,improvement

### Reproduction link

[https://ant.design/components/notification-cn](https://ant.design/components/notification-cn)

### Steps to reproduce

打开链接多次点击topLeft,1.一直停留在当前页面默认4.5秒自动消失，
2.多次点击topLeft，迅速切换浏览器页签（模拟休眠模式），10秒后返回页面，发现弹窗逐渐消失，理论上应该在4.5秒后自动消失，为什么进入休眠模式后，弹窗不消失，产生交互才自动消失

### What is expected?

休眠模式下 通知弹窗正常按照设置的时间消失

### What is actually happening?

休眠模式下，通知弹窗不消失，

| Environment | Info |
| --- | --- |
| antd | 5.15.0 |
| React | 17.x |
| System | macos /window32 /window64 |
| Browser | 谷歌 |

---
需求：每30s请求一个接口，根据内容返回结果，出现一个通知弹窗，通过设置notification的自动关闭，但是当浏览器进入休眠模式的时候，notification的onclose函数正常执行，但是dom不消失，直到和浏览器产生交互，才会消失，但是系统会一直开着放很久没有交互，dom不消失，倒是浏览器内存越来越大，直到崩溃。

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: x/tools/go/packages: incorrect intermediate test variant computed for broken 'main' import
Labels: NeedsFix,Tools

In #66109, we see gopls running into a latent go/packages bug.

Consider the following setup (taken from the gopls regression test for that issue):

```
-- go.mod --
module example.com/tools

go 1.22

-- tools_test.go --
//go:build tools

package tools

import (
	_ "example.com/tools/tool"
)

-- tool/tool.go --
package main

func main() {
}
```

In this case, `gopackages -test -json -deps ./tools_test.go` will report a package `"command-line-arguments [command-line-arguments.test]"` with the nonsensical dependency ID `"example.com/tools/tool [command-line-arguments.test]"`. This only occurs if the dep is a `main` package itself. It looks like go/packages thinks it has to break a cycle to the non-existent `command-line-arguments` package.

CC @adonovan @matloob
Repository: neovim
Issue: Would like better documentation of `&channel`
Labels: enhancement,documentation,terminal

### Problem

I think that the documentation of `&channel` to access the job id of currently running Neovim terminals could be more robust.  

Let's compare it with `conceallevel`.

If I'm on a help page I can do either

```
set conceallevel=3
```
or 

```
let &conceallevel=3
```

and then when I do `:h conceallevel` I get a clear explanation for what it is.  And If I know that I can use the `let &` syntax understand what is going on.


In contrast, in a terminal buffer we have the quasi-setting `channel` accessible in vimscript with `&channel`.  When we do `:h channel` it goes into the very dense documentation of channels that one needs some deep technical knowledge to understand, and one would have to do some digging to realize that `channel` is documented in `:h terminal-emulator`, and even then, the user will have to know the `&setting` syntax for dealing with variables.  It is further not super clear whether any of the other various channel functions in the `:h channel` documentation set `&channel`.   

As a side note, the documentation for `job-id` says that each `job-id` is a valid `channel-id`. It is not clear if the reverse is true, and if `valid` means currently running, or `can take that value eventually`.  

Right now it seems that `&channel` is just for terminals started with `term` and `termopen()`, but, but that is not completely clear from the documentation; I got info that from reading github issues/online articles. 





### Expected behavior

Recommended changes.

- Make it clear in `:h channel` the existence of the quasi-setting `channel` that is currently documented in `:h terminal-emulator`

- Make it clear in both locations exactly when and how `&channel` is set. By any job or just by `:term` and `:termopen`

- Add a reminder of the `&` syntax for getting this option in both locations.

I'm guessing that this issue betrays that I'm not an expert, and that I've missed something.  But documentation is not for experts, it is for people to learn from, and I think that these sections could use some clarification. 
 
It is also possible that there is a better way of improving this documentation than what I've suggested above.

I could open a PR but I still have more to grasp on the github workflow to do one smoothly in this project, and I also have a lot more to grasp on the standard for terseness vs ease of understanding for the Neovim documentation.
Repository: pytorch
Issue: Assertion error (`assert op == "=="`) in symbolic_shapes.prettify_results for operator `<=`
Labels: triaged,oncall: pt2,module: dynamic shapes,oncall: export

### 🐛 Describe the bug

While iterating on getting torch.export to work on a model with dynamic shapes, I hit the assertion around line 1640 of `symbolic_shapes.py` for the operator `<=`. I don't have a good repro as this was in the middle of a debugging session and the issue came from Torch attempting to print an error report for a problem I subsequently fixed.

I made the following changes and it got me past the issue:

```
            for s in self._static_results.union(self._dynamic_results):
                t = transform(s)
                if t == s:
                    continue
                left, op, right = re.split(r"( == | <= | >= | < | > )", t)
                op = op.strip()
                if op == "==" and left == right:
                    continue
                if right.isdigit():
                    relation_with_digit(left, op, int(right))
                elif left.isdigit():
                    relation_with_digit(right, flip(op), int(left))
                else:
-->                 if op == "<=":
-->                     results[left]["le"] = sympy.sympify(right)
                    else:
                        assert op == "==", f"Unexpected prettify op: {op}"
                        results[left]["eq"] = sympy.sympify(right)
```

We should probably add branches for each of the operators matched in the split a few lines above instead of just asserting on anything but `==`.

### Error logs

_No response_

### Minified repro

_No response_

### Versions

```
torch==2.3.0.dev20240304+cpu
```

cc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4
Repository: pytorch
Issue: Libtorch - clang: error: unsupported option '-fopenmp'
Labels: needs reproduction,module: binaries,module: cpp,triaged,module: macos

### 🐛 Describe the bug

## Issue

While following the [available tutorial](https://pytorch.org/cppdocs/installing.html) of Pytorch's LibTorch, I'm unable to compile the example program due to the following error:

```
$ cmake --build . --config Release

[ 50%] Building CXX object CMakeFiles/example-app.dir/example-app.cpp.o
clang: error: unsupported option '-fopenmp'
make[2]: *** [CMakeFiles/example-app.dir/example-app.cpp.o] Error 1
make[1]: *** [CMakeFiles/example-app.dir/all] Error 2
make: *** [all] Error 2
```

Issue #90362 contains some correlated information regarding to the error, however no changes were noted on the library downloaded from the tutorial after the fixes were made.


## Steps to reproduce the error
Follow https://pytorch.org/cppdocs/installing.html until compilation phase.

### Versions

PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: macOS 14.3.1 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.1.0.2.5)
CMake version: version 3.28.3
Libc version: N/A

Python version: 3.12.2 (main, Feb  6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] (64-bit runtime)
Python platform: macOS-14.3.1-arm64-arm-64bit
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
Apple M2 Pro

Versions of relevant libraries:
[pip3] No relevant packages
[conda] Could not collect

cc @seemethere @malfet @osalpekar @atalman @jbschlosser @albanD
Repository: deno
Issue: Add ARCHITECTURE.md
Labels: docs,chore

https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html

Deno is very fast moving and it's hard to keep up with internal changes if you are not closely involved. An architecture is an up-to-date overview of the inner workings of the system, stuff like:

- General overview, eg:
  - Event loop details and tokio integration
  - How ops works.
  - How `deno compile` works under the hood

- Perf characteristics that get lost in lengthy discussions over time, eg:
  - How does startup snapshots work?
  - Documenting known perf attempts that were not applied because of drawbacks. Eg: #22711 
  - HTTP slab optimizations

- Inner workings of extensions, eg:
  - How does Node-API work?
  - FFI turbocall
  - WebCrypto key material storage formats
Repository: PowerToys
Issue: Symlinks made by WinGet break when Windows Terminal is launched through PowerToys Run
Labels: Issue-Bug,Product-PowerToys Run,Needs-Triage,Area-App Compat

### Microsoft PowerToys version

0.79.0

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

- Install package that WinGet creates links for  (`fnm` is an example)
- Use PowerToys Run to launch Windows Terminal
- Attempt to use CLI command

### ✔️ Expected Behavior

The links WinGet creates will be usable whenever using them in Windows Terminal/Powershell

### ❌ Actual Behavior

After Windows Terminal is launched with PowerToys Run:

Powershell produces the following error when running the exe directly
```
ResourceUnavailable: Program 'fnm.exe' failed to run: An error occurred trying to start process 'C:\Users\setha\AppData\Local\Microsoft\WinGet\Links\fnm.exe' with working directory 'C:\Users\setha'. No application is associated with the specified file for this operation.At line:1 char:1
+ fnm --help
+ ~~~~~~~~~~.
```

The error from the command that's run in my `$PROFILE` seems to provide a bit more insight into what's going on here
```
ResourceUnavailable: C:\Users\setha\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:1
Line |
   1 |  fnm env --use-on-cd | Out-String | Invoke-Expression
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Program 'fnm.exe' failed to run: An error occurred trying to start process
     | 'C:\Users\setha\AppData\Local\Microsoft\WinGet\Links\fnm.exe' with working directory 'C:\Users\setha'. The path
     | cannot be traversed because it contains an untrusted mount point.At
     | C:\Users\setha\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:1 char:1 + fnm env --use-on-cd | Out-String
     | | Invoke-Expression + ~~~~~~~~~~~~~~~~~~~.
```

**This does not happen when launching Windows Terminal directly** or when using the Win+X menu

### Other Software

WinGet v1.7.10582
Powershell v7.4.1
Windows Terminal v1.19.10573.0
Repository: PowerToys
Issue: Adding binary operations to PowerToys Run calculator
Labels: Idea-Enhancement,Product-PowerToys Run,External Dependency,Cost-Medium,Run-Plugin

### Description of the new feature / enhancement

adding to PowerToys Run binary operations like (xor, or, and, shifting bits)


### Scenario when this would be used?

I am competetive programmers, so it would be very useful to do it in PowerToys Run instead of running calculator, choose type of calculator like programming. 

### Supporting information

Apple's Spotlight supports this feature.
Repository: deno
Issue: Connection timed out when using Mongoose|MongoDB with deno cli
Labels: bug,needs investigation,node compat

**deno-x86_64-pc-windows-msvc v1.41.1**

Testing the following code using `nodejs` and on `deno deploy` works correctly:
```js
import express    from 'express';
import mongoose   from 'mongoose';

const app = express();
await mongoose.connect("mongodb+srv://...?retryWrites=true&w=majority");
const db  = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function() {
    console.log('Connected to MongoDB');
});

app.listen(3001, () => { console.log('starting...'); });
```
But when testing using `deno cli` it doesn't work.

I get the message on the console `starting...`
but not the `connection error:` neither `Connected to MongoDB`

And after some time I get this error:
```js
error: Uncaught (in promise) MongooseServerSelectionError: connection timed out
    at _handleConnectionErrors (file:///.../node_modules/.deno/mongoose@8.2.1/node_modules/mongoose/lib/connection.js:875:11)
```

The same thing happens using `mongodb` instead of `mongoose`:
```js
import express from 'express';
import mongodb from 'mongodb';

const app    = express();
const client = new mongodb.MongoClient("mongodb+srv://...mongodb.net/...?retryWrites=true&w=majority")
await client.connect();
const db     = client.db();

app.listen(3001, () => { console.log('starting...'); });
```
```js
C:\Windows\system32>deno run --allow-all ...\index.js
Warning: Not implemented: ClientRequest.options.createConnection
error: Uncaught (in promise) MongoServerSelectionError: connection timed out
    at AbortSignal.<anonymous> (file:///...node_modules/.deno/mongodb@6.4.0/node_modules/mongodb/lib/sdam/topology.js:292:34)
```
I'm starting the script as
```js
deno run --allow-all ...\index.js
```
I also tested running it as `admin`, on the Mongo website I have all ip whitelisted
Why do I get this error only on the CLI version?
Repository: godot
Issue: Forward+ Window transparency is not working, works in Compatibility renderer 
Labels: bug,topic:rendering,needs testing

### Tested versions

Reproducible in 4.3 all dev snapshots, 4.2 and 4.1


### System information

Godot v4.3.dev4 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6900 XT (Advanced Micro Devices, Inc.; 31.0.24002.92) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

### Issue description

Transparency does not work in the Forward+ renderer, at least on my system. It works fine in Compatibility renderer.

I set the correct parameters for transparency settings and  I have used the same script on all the versions I tested:
4.3 all dev snapshots, 4.2 and 4.1

Project settings advanced enabled
project>project settings>Display > Window > per pixel transparency> enabled
project>project settings>Display > Window > transparent > enabled

Not sure if this an AMD issue.

### Steps to reproduce

Enable Transparency settings in project settings:

Project settings advanced enabled
project>project settings>Display > Window > per pixel transparency> enabled
project>project settings>Display > Window > transparent > enabled


Create any type of node and add use a simple script to set the window and viewport to be transparent:

``` gdscript
func _ready() -> void:
	get_tree().get_root().set_transparent_background(true)
	DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_TRANSPARENT, true, 0)
	
```

The window should be transparent, if not, try switching to Compatibility renderer.

### Minimal reproduction project (MRP)


[Bug Sample project files](https://github.com/godotengine/godot/files/14505046/BugTest.zip)
Repository: transformers
Issue: feat: Add data class for fsdp config and use it along with argument parser
Labels: Feature request

### Feature request

Like the trainer arguments data class https://github.com/huggingface/transformers/blob/2a002d073a337051bdc3fbdc95ff1bc0399ae2bb/src/transformers/training_args.py#L167

Its good to have a data class for fsdp config as it allows for validation even before stepping into starting a training with ambiguous types used in the config. 

### Motivation

For instance, the fsdp config json file might have been written as

```json
{
...
"xla": "False" // or "false"
...
}
```

This check (https://github.com/huggingface/transformers/blob/745bbfe4bb2b61491dedd56e1e8ee4af8ef1a9ec/src/transformers/training_args.py#L1768) might pass through. This might be harder to debug though the problem is due a simple type bug. Having a fsdp arguments data class with parser would help identify such bugs early.

### Your contribution

I would be glad to raise a PR based on the discussion on this issue.
Repository: deno
Issue: allow ignoring `devDependencies` when running task from `package.json`
Labels: cli,suggestion,node resolution

https://github.com/scarf005/vfile/blob/67e5cbcab3c9c1b1a47cb796f9bba3100e5c7aab/package.json#L56-L70

```json
  "dependencies": {
    "@types/unist": "^3.0.0",
    "unist-util-stringify-position": "^4.0.0",
    "vfile-message": "^4.0.0"
  },
  "devDependencies": {
    "@types/node": "^20.0.0",
    "c8": "^8.0.0",
    "prettier": "^3.0.0",
    "remark-cli": "^11.0.0",
    "remark-preset-wooorm": "^9.0.0",
    "type-coverage": "^2.0.0",
    "typescript": "^5.0.0",
    "xo": "^0.56.0"
  },
```

in this library, only `dependencies` is required to run. however,

```
deno eval 'import "lib/index.js"'
```

will attempt to download the entire content of `devDependencies`. while the workaround is to erase `devDependencies` before running then restoring, it's a bit manual. a flag like `--ignore-devdependencies` would be helpful.
Repository: next.js
Issue: [App Router -> Caching] Fetch cache is not revalidating for pages that have turned into 404 errors.
Labels: bug,Pages Router

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/fetch-cache-issue-gvq3xl

### To Reproduce

1. `pnpm start` / `next start`
2. Visit `/products/2` - responding 200
3. Underlying API responds 404: https://api.mockfly.dev/mocks/73685d60-5e65-4a33-8750-baffe7f3bcf9/2

### Current vs. Expected behavior

### Context
`~/app/products/[id]/page.tsx`
`{ next: { revalidate: 60 } }`

### Current
while user first visits the URL `/products/2`, nextjs fetches the data from api server and cache the data which we can see from `~/.next/cache/fetch-cache/5825d44a41dd7ba5ba030df9c6bc168b287e287cca7fd1915d2088fed662a5e3`. Then I deleted the data from the [API end](https://api.mockfly.dev/mocks/73685d60-5e65-4a33-8750-baffe7f3bcf9/2). Now it still getting from cache and not revalidating after 60secs.

### Expected
It should return 404 page instead of 200.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.15.1
Relevant Packages:
  next: 14.2.0-canary.2 // Latest available version is detected (14.2.0-canary.2).
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Data fetching (gS(S)P, getInitialProps)

### Which stage(s) are affected? (Select all that apply)

next start (local), Other (Deployed)

### Additional context

I tested against latest stable and latest canary
Repository: pytorch
Issue: Setting static arguments in `torch.compile()`
Labels: feature,triaged,oncall: pt2

### 🚀 The feature, motivation and pitch

JAX's `jax.jit` function allows you to set `static_argnums` or `static_argnames`. These arguments will be compiled into the function.

https://jax.readthedocs.io/en/latest/_autosummary/jax.jit.html

There doesn't seem to be a way to do this in PyTorch.

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang