sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: Python
Issue: Fix failing: `pytest quantum/q_fourier_transform.py`
Labels: bug

### Repository commit

46379861257d43bb7140d261094bf17dc414950f

### Python version (python --version)

Python 3.11.3

### Dependencies version (pip freeze)

absl-py==1.4.0
astunparse==1.6.3
beautifulsoup4==4.12.2
black==23.3.0
cachetools==5.3.1
certifi==2023.5.7
cffi==1.15.1
cfgv==3.3.1
charset-normalizer==3.1.0
click==8.1.3
contourpy==1.0.7
cryptography==41.0.0
cycler==0.11.0
dill==0.3.6
distlib==0.3.6
fake-useragent==1.1.3
filelock==3.12.0
flatbuffers==23.5.26
fonttools==4.39.4
gast==0.4.0
google-auth==2.19.0
google-auth-oauthlib==1.0.0
google-pasta==0.2.0
grpcio==1.54.2
h5py==3.8.0
identify==2.5.24
idna==3.4
iniconfig==2.0.0
jax==0.4.10
joblib==1.2.0
keras==2.12.0
kiwisolver==1.4.4
libclang==16.0.0
lxml==4.9.2
Markdown==3.4.3
markdown-it-py==2.2.0
MarkupSafe==2.1.2
matplotlib==3.7.1
mdurl==0.1.2
ml-dtypes==0.1.0
mpmath==1.3.0
mypy==1.3.0
mypy-extensions==1.0.0
networkx==3.1
nodeenv==1.8.0
ntlm-auth==1.5.0
numpy==1.23.5
oauthlib==3.2.2
opencv-python==4.7.0.72
opt-einsum==3.3.0
packaging==23.1
pandas==2.0.2
pathspec==0.11.1
patsy==0.5.3
pbr==5.11.1
Pillow==9.5.0
pip==23.1.2
platformdirs==3.5.1
pluggy==1.0.0
ply==3.11
pre-commit==3.3.2
projectq==0.8.0
protobuf==4.23.2
psutil==5.9.5
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycparser==2.21
Pygments==2.15.1
pyparsing==3.0.9
pytest==7.3.1
python-dateutil==2.8.2
pytz==2023.3
PyYAML==6.0
qiskit==0.43.0
qiskit-aer==0.12.0
qiskit-ibmq-provider==0.20.2
qiskit-terra==0.24.0
requests==2.31.0
requests-ntlm==1.1.0
requests-oauthlib==1.3.1
rich==13.3.5
rsa==4.9
ruff==0.0.270
rustworkx==0.12.1
scikit-fuzzy==0.4.2
scikit-learn==1.2.2
scipy==1.10.1
setuptools==62.6.0
six==1.16.0
soupsieve==2.4.1
statsmodels==0.14.0
stevedore==5.1.0
symengine==0.9.2
sympy==1.12
tensorboard==2.12.3
tensorboard-data-server==0.7.0
tensorflow==2.12.0
tensorflow-estimator==2.12.0
tensorflow-io-gcs-filesystem==0.32.0
termcolor==2.3.0
texttable==1.6.7
threadpoolctl==3.1.0
tweepy==4.14.0
typing_extensions==4.6.2
tzdata==2023.3
urllib3==1.26.16
virtualenv==20.23.0
websocket-client==1.5.2
websockets==11.0.3
Werkzeug==2.3.4
wheel==0.37.1
wrapt==1.14.1
xgboost==1.7.5
yulewalker==0.1.1

### Expected behavior

All the tests pass since I haven't made any modifications.

### Actual behavior

4 test failed : 

FAILED quantum/bb84.py::quantum.bb84.bb84
FAILED quantum/q_fourier_transform.py::quantum.q_fourier_transform.quantum_fourier_transform
FAILED quantum/quantum_random.py::quantum.quantum_random.get_random_number
FAILED web_programming/instagram_crawler.py::web_programming.instagram_crawler.test_instagram_user
Repository: kubernetes
Issue: Suggestion from Deprecation Notice for NewExponentialBackoffManager not Working
Labels: kind/bug,sig/api-machinery,triage/accepted

### What happened?

Trying the [suggestion from the deprecation notice for NewExponentialBackoffManager](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/wait/backoff.go#L330-L353), results in a compile error, as the delayFn.Timer() does not implement Backoff() from BackoffManager

```
cannot use delayFn.Timer() (value of type wait.Timer) as wait.BackoffManager value in argument to wait.BackoffUntil: wait.Timer does not implement wait.BackoffManager (missing method Backoff)
```

I was playing around a bit also with ExponentialBackoffWithContext, but I gained the impression that this is not a direct-drop in replacement, as it uses a completely different func signature. So I thought it would be best to open an issue here.

### What did you expect to happen?

Suggestions in the deprecation notice should be applyable.

### How can we reproduce it (as minimally and precisely as possible)?

```go
	realClock := &clock.RealClock{}
	delayFn := wait.Backoff{
		Duration: 800 * time.Millisecond,
		Cap:      30 * time.Second,
		Steps:    int(math.Ceil(float64(30*time.Second) / float64(800*time.Millisecond))),
		Factor:   2.0,
		Jitter:   1.0,
	}.DelayWithReset(realClock, 2*time.Minute)

	retryCtx, retryCancel := context.WithCancel(ctx)
	
	wait.BackoffUntil(func() {}, delayFn.Timer(), true, retryCtx.Done())
```

### Anything else we need to know?

_No response_

### Kubernetes version

master

### Cloud provider

n.a.

### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: flutter
Issue: Asset "version inconsistency" of flutter/assets-for-api-docs
Labels: d: api docs,P2,team-framework,triaged-framework

I recently made a breaking change to `ToggleButtons` and updated the docs to reflect its [new size constraints](https://flutter.github.io/assets-for-api-docs/assets/material/toggle_buttons_simple.mp4) and realized there were a few problems:

1. Since both api.flutter.dev and master-api.flutter.dev point to the same assets, the `stable` docs may use the assets that reflect its new intended appearance/use in `master`, but that have not made it into `stable`.
2. If any further breaking changes were made to existing widgets, the assets for that widget will become outdated unless deliberate refreshes to the assets were made. 

For 1, it might be worth generating a new branch for `flutter/assets-for-api-docs` for `stable`, and for 2, implementing some hook or cron job to check if any of the existing assets have been changed, and if so, to refresh those particular assets.
Repository: electron
Issue: [Bug]: Child window disappears when it is dragged to another display.
Labels: platform/macOS,bug :beetle:,status/confirmed,component/BrowserWindow,25-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

25.1.0

### What operating system are you using?

macOS

### Operating System Version

Ventura 13.2.1

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

_No response_

### Expected Behavior

When I have multiple monitors, and I move the child window into another display, it should be still visible.

### Actual Behavior

When I have multiple monitors and I move child window into another display it disappears.

### Testcase Gist URL

https://gist.github.com/vavdav/fb6cb3e1722abbc21dab329f9489acd3

### Additional Information

This bug was already reported [here](https://github.com/electron/electron/issues/34986), but still happening.

I tried to hack this behavior somehow. For example, by not allowing to move the child to another screen, but an issue is that 'will-move' is called only once before the first move. I also tried 'moved' but it is called all the time. So there is no way how to prevent it.

I discovered that if I call `.center()` on the child, it is centered on another screen. But, it is probably because `parent` is removed from that window. Without `parent` set it is working, but this is not solution for me unfortunately.

I did not find any way how to detect that the child window disappeared.


I tried code like this in `will-move` event, but it is called only once:
```
        const currentDisplay = screen.getDisplayNearestPoint({
          x: newBounds.x,
          y: newBounds.y,
        });

        const parentDisplay = screen.getDisplayNearestPoint({
          x: parentBounds!.x,
          y: parentBounds!.y,
        });

        if (currentDisplay.id !== parentDisplay.id) {
          event.preventDefault();
        }
```
Repository: go
Issue: proposal: strings: add (*Builder).ResetKeepCapacity method
Labels: Proposal

Currently the `strings.Builder` wastes the remaining capacity when `(*Builder).Reset` is being called, it works just the same way as creating a new empty  `strings.Builder`.
```go
// Reset resets the Builder to be empty.
func (b *Builder) Reset() {
	b.addr = nil
	b.buf = nil
}
```
Currently it is not possible in a backwards compatibility manner to keep the remaining capacity in the Builder after calling Reset(), because it would require keeping the `b.addr` pointer, so that it is not possible to copy the Builder.

I propose adding a simple `(*Builder).ResetKeepCapacity` method with following signature:

```go
// ResetKeepCapacity resets the builder and keeps the remaining
// capacity (b.Cap() - b.Len()) for future use.
func (b *Builder) ResetKeepCapacity() {
	b.buf = b.buf[len(b.buf):]
}
```
Repository: godot
Issue: Vulkan: Baking LightmapGI incorrectly uses current editor environment
Labels: bug,topic:rendering,topic:editor,topic:3d

### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Windows 11, Forward+, AMD Radeon RX 6700 XT

### Issue description

I originally thought this was a problem with baking lightmaps while in unshaded view, so I tried making an MRP only to discover a completely different cause.

I only discovered this because when you switch to unshaded view, physical skyboxes turns black. When baking lightmaps in this state, the resulting lightmap had no environment lighting at all, since the editor's skybox is black.

### Steps to reproduce

1. Create a simple scene suitable for lightmap baking and add a LightmapGI node
2. Set up an environment with physical sky
3. Bake in normal view
4. Note result
5. Bake in unshaded view(physical sky is now black)
6. Compare result with that of normal view

### Minimal reproduction project

[Lightmap problem.zip](https://github.com/godotengine/godot/files/11735697/Lightmap.problem.zip)
Repository: godot
Issue: Debug freezes on splash screen
Labels: bug,needs testing

### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Windows 11 AMD Ryzen CPU Radeon Integrated Graphics

### Issue description

My project debug freezes on splash screen, it no longer works despite me reverting the changes, there are no unending while or for loops, it just freezes, for no apparent reason, other versions, such as steam beta 4.0 stable do not work either, it just froze without debug, for some reason deleting all nodes of a viewport within the player node fixes it, but deleting individual nodes won't, there is no consistent node causing it within the viewport
![image](https://github.com/godotengine/godot/assets/87618274/41a34d6b-fa5b-46a5-964b-e476e39131c6)


### Steps to reproduce

I haven't any EARTHLY idea how, i added some code, it did this, i removed the code, it STILL did this

### Minimal reproduction project

Refer to Steps to reproduce
Repository: godot
Issue: Tilemap editor can't work within subviewports
Labels: enhancement,discussion,topic:editor,usability,topic:2d

### Godot version

v4.1.beta

### System information

Linux

### Issue description

When a TileMap is inside a subviewport it cannot be edited. The editor still appears and you can draw tiles into the map, but they are not drawn in the screen because the editor does not show the correct viewport.

I would suggest that when a node is edited within a subviewport, the editor should switch to render that viewport, even if it isn't being rendered in the root viewport.

### Steps to reproduce

1) Add a subviewport
2) Add a TileMap within the subviewport
3) Add some tiles
4) Tiles are written to the tilemap but not drawn on the screen

### Minimal reproduction project

N/A
Repository: pytorch
Issue: `gradcheck` produces false positives with sparse inputs when `masked=False`.
Labels: module: sparse,module: autograd,triaged

### 🐛 Describe the bug

As per title. As an example, let's consider the `sampled_addmm` method which is semantically equivalent to
`sampled_addmm(s, m1, m2, alpha, beta) := alpha * (m1 @ m2).sparse_mask(s) + beta * s`.

If we inspect the subgradient of `sampled_addmm` wrt `s` in `derivatives.yaml`, we find the following:
```
- name: sparse_sampled_addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor
  self: maybe_multiply(grad, beta.conj())
```
Note, that under the assumption of masked semantics this formula is correct, even though it does not account for the `(mat1 @ mat2).sparse_mask(self)` part. This follows from the sparse semantics that implies `self.indices == (self + perturbation_of_self).indices`. Hence we can expect `gradcheck` to work with `masked=True`:

```python
In [1]: import torch

In [2]: x = torch.eye(3, dtype=torch.double).to_sparse_csr().requires_grad_(True)

In [3]: y = torch.rand(3, 3, dtype=torch.double)

In [4]: z = torch.rand(3, 3, dtype=torch.double)

In [5]: torch.autograd.gradcheck(lambda x: torch.sparse.sampled_addmm(x, y, z).to_dense(masked_grad=True), (x,), masked=True)
Out[5]: True

```

However, the situation is reversed for `masked=False`. In this case the backward formula for `self` should take `alpha * (m1 @ m2).sparse_mask(self)` into consideration, so it is expected for `gradcheck` with `masked=False` to fail.
This, however, does not happen:
```python
In [6]: torch.autograd.gradcheck(lambda x: torch.sparse.sampled_addmm(x, y, z).to_dense(masked_grad=False), (x,), masked=False)
Out[6]: True
```

As per @pearu's insight, this happens during the densification process in gradcheck. Namely, it sometimes expands `self.indices` to full dimensions while producing a new sparse input `self_densified`. Unfortunately, `sampled_addmm(self)` and `sampled_addmm(self_densified)` are not equivalent in backward, because `sampled_addmm(self_densified)` should pass gradcheck with either `masked=True` or `masked=False` since it's mask is the whole space.

### Versions

Current master.

cc @alexsamardzic @pearu @cpuhrsch @amjames @bhosmer @ezyang @albanD @zou3519 @gqchen @soulitzer @Lezcano @Varal7
Repository: vscode
Issue: merge editor accessible help menu
Labels: feature-request,accessibility,polish,merge-editor

SR users have expressed difficulty with using the merge editor. 

Once we have addressed some of those issues, we should add an accessible help menu
```[tasklist]
### Tasks
- [ ] https://github.com/microsoft/vscode/issues/182682
```
Repository: godot
Issue: Property folding state within the element within EditorInspectorArray are linked together (and not indepenent)
Labels: bug,topic:editor,usability

### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Windows 11

### Issue description

See screen recording.

When I have grouped properties within the element of an EditorInspectorArray (grouped means, they grouped with 'any_group_name/' in their property name), the folding states of the grouped properties between the array elements, seems to be linked.
When I open/unfold a group in one element, and I move the cursor to the header of the same group in another array element -> That second group's control "thinks", it also opened. Icon changes. (Sorry I cannot recall the C class name for what I call "header" of control. See it on the screen recording.)
Same goes for folding.
Also: When inspector is closed, and reopened, only the last state of the last folded/unfolded group will be applied to all groups.

I observed this with my custom class, but not observed with the built in TileSet resource.
I tried to make array properties following, how TileSet does. But I only checked what it returns with its get_property_info.
One difference surely, that TileSet makes PROPERTY_USAGE_ARRAY with TYPE_NIL, while I am making it with TYPE_INT.
I expected same behavior as with TileSet.
There you can fold unfold the groups within elements, the group's 'header' control isn't doing strange thing + the folding states are recovered, when you close and open the TileSet's inspector.

In the example on the screen recording, in _get_property_list I return:
- node_count (Nodes) with TYPE_INT and PROPERTY_USAGE_ARRAY, and prefix 'node_'
- node_X/some_node_property properties for element of the array
   node_X = node_0, node_1, and so on. 
   some_node_property = any property name
- A some_node_property may consist of 2 parts, like 'visuals/title'. I use this to group properties.
  (In the example there is only one property without 'visuals/' prefix, which is the 'function' property)
  So a full property name can be 'node_0/visuals/title'

On the screen recording:
- I folded the group of second element of array (node_1/visuals/..)
- I move the cursor on the first element of array (node_0/...) -> The icon of that "Visuals" group changed, "thinking" it's folded
- I clicked on the group of first element -> Icon changed back to unfolded.
Then I repeated this with folding/unfolding the same groups again
+ I opened the "Function" property (which is another Resource), where the folding showed the same. That custom resource type also has some properties with an array element grouped by simply using "prefix/" in their property name

![Godot_v4 0 3-stable_win64_kEMEQh0qCH](https://github.com/godotengine/godot/assets/75695649/e67650ba-ea13-487a-87e6-b81a9e1ce365)



### Steps to reproduce

Get project from attached ZIP.
Open res://addons/dataflow_engine/test_dataflow_graph.tres in Inspector
Do what you read/see in issue description.

### Minimal reproduction project

[Project.zip](https://github.com/godotengine/godot/files/11736274/Project.zip)
Repository: rust
Issue: Object file in /tmp produces non-deterministic builds on Windows for crate-type=bin
Labels: O-windows-msvc,C-bug,A-reproducibility

When building a `--crate-type=bin` target with rustc, an object file is produced in `/tmp/<randomname>` and that _absolute_ path is then passed to the linker.

Windows puts paths to all object files in the PDB file, so this results in non-deterministic Windows builds (see https://github.com/rust-lang/rust/issues/88982#issuecomment-1589485353). To be deterministic all paths must be relative paths, or fixed paths.

To resolve this, we could:
1. Grow a command line to specify the path to the object file that rustc should write, and then pass to the linker.
2. Grow a command line to specify the temp root (replacing `/tmp` or similar when specified), allowing it to be specified relative to the CWD. Then ensure `-Zremap-cwd-prefix` gets applied to it in order to produce a relative path.
3. Other??

(FWIW I am cross-compiling Linux to Windows here which is why you see `/tmp` in the path :) But same things occur building on Windows.)
Repository: rust
Issue: negative_impls: negative impl fails to prevent overlap error
Labels: F-negative_impls

The following example should pass coherence but currently errors.
```rust
#![feature(negative_impls, with_negative_coherence)]
trait Trait {}
impl<T: ?Sized> !Trait for &T {}
trait OtherTrait<T> {}

impl<T: Trait> OtherTrait<T> for T {}
impl<T, U> OtherTrait<&U> for &T {} // error, but shouldn't
```
```
error[[E0119]](https://doc.rust-lang.org/nightly/error_codes/E0119.html): conflicting implementations of trait `OtherTrait<&_>` for type `&_`
 --> src/lib.rs:7:1
  |
6 | impl<T: Trait> OtherTrait<T> for T {}
  | ---------------------------------- first implementation here
7 | impl<T, U> OtherTrait<&U> for &T {} // error, but shouldn't
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
```
---

*previous test which was only missing the `with_negative_coherence` feature flag:*
```rust
#![feature(negative_impls)]
trait Trait {}
impl<T: ?Sized> !Trait for &T {}
trait OtherTrait {}

impl<T: Trait> OtherTrait for T {}
impl<T> OtherTrait for &T {} // error, but shouldn't
// impl OtherTrait for &u32 // ok
```
```
error[[E0119]](https://doc.rust-lang.org/nightly/error_codes/E0119.html): conflicting implementations of trait `OtherTrait` for type `&_`
  --> src/lib.rs:10:1
   |
9  | impl<T: Trait> OtherTrait for T {}
   | ------------------------------- first implementation here
10 | impl<T> OtherTrait for &T {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
```
~~
Repository: flutter
Issue: [DisplayList] DlVertices should take the index buffer into account when calculating bounds
Labels: engine,P2,team-engine,triaged-engine

For example, something like this:

```dart
Vertices(
  VertexMode.triangle,
  [Offset(101010010100101, 99999999), Offset(0, 0), Offset(3, 3), Offset(3, 0)],
  indices: [1, 2, 3],
);
```

Would currently return an absurdly large bounds. Ideally it would return only the bounds of the used vertices.
Repository: storybook
Issue: [Bug]: Docs addon jest mdx transformer needs `process` method
Labels: bug,help wanted,compatibility with other tools,addon: docs,mdx

### Describe the bug

When configuring Jest to transform `.mdx` stories and testing with Storyshots, I get the following error:
```
 Error: ● Invalid synchronous transformer module:
      "/Users/btepe/Documents/camunda/projects/camunda-composite-components/node_modules/@storybook/addon-docs/jest-transform-mdx.js" specified in the "transform" object of Jest configuration
      must export a `process` function.
      Code Transformation Documentation:
      https://jestjs.io/docs/code-transformation

```

According to the [Jest docs](https://jestjs.io/docs/code-transformation#writing-custom-transformers), this is due to the [transformer in jest-transform-mdx.js](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/jest-transform-mdx.js) using `require` and therefore not using the ESM syntax:
```
If your codebase is ESM only, implementing the async variants are sufficient. Otherwise, if any code is loaded through require (including createRequire from within ESM), then you need to implement the synchronous process variant.
```

The transformer provided by the docs addon either needs to use `import` instead of `require` or define a `process` method.

### To Reproduce

_No response_

### System

```shell
System:
    OS: macOS 13.3.1
    CPU: (10) arm64 Apple M2 Pro
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.106
    Edge: 114.0.1823.37
    Firefox: 112.0.1
    Safari: 16.4
  npmPackages:
    @storybook/addon-a11y: 7.0.20 => 7.0.20 
    @storybook/addon-actions: 7.0.20 => 7.0.20 
    @storybook/addon-docs: 7.0.20 => 7.0.20 
    @storybook/addon-essentials: 7.0.20 => 7.0.20 
    @storybook/addon-interactions: 7.0.20 => 7.0.20 
    @storybook/addon-links: 7.0.20 => 7.0.20 
    @storybook/addon-mdx-gfm: 7.0.20 => 7.0.20 
    @storybook/addon-storyshots: 7.0.20 => 7.0.20 
    @storybook/preset-scss: 1.0.3 => 1.0.3 
    @storybook/react: 7.0.20 => 7.0.20 
    @storybook/react-webpack5: 7.0.20 => 7.0.20 
    @storybook/test-runner: 0.10.0 => 0.10.0 
    @storybook/testing-library: 0.1.0 => 0.1.0
```


### Additional context

_No response_
Repository: go
Issue: proposal: encoding/json: export tagOptions, parseTag
Labels: Proposal

https://cs.opensource.google/go/go/+/master:src/encoding/json/tags.go

Multiple other packages reimplement similar functionality, including efforts to match the behavior of `encoding/json`:
* https://github.com/pelletier/go-toml/blob/v2/marshaler.go#L768-L797 and https://github.com/pelletier/go-toml#struct-tags-have-been-merged
* https://github.com/go-yaml/yaml/blob/v3/yaml.go#L557-L572

Exporting this functionality would allow those and similar packages to have convenient access to identical behavior to the json package. It would even allow them to safely parse the `json` tag, if they so choose.