sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: prove should be taught about the bounds of (i+j)/2
Labels: Performance,NeedsFix,compiler/runtime

```
$ go version
go version devel go1.20-0a4a57de4d Thu Aug 18 21:54:52 2022 +0000 linux/amd64
```

sort.Search, and its inlined copy in go/token.searchInts, both have code like:

```
func searchInts(a []int, x int) int {
    i, j := 0, len(a)    
    for i < j {
        h := int(uint(i+j) >> 1) // avoid overflow when computing h
        // i ≤ h < j  
        if a[h] <= x { // Found IsInBounds
            i = h + 1
        } else {
            j = h
        }
    }
    return i - 1   
}
```

Note that `a[h]` causes a bounds check, as the compiler doesn't know that `0 <= h < len(a)`. We intuitively know that, because `h` is the middle point between `i` and `j`, thus `i <= h <= j`. `i` and `j` themselves start as `0` and `len(a)` and move closer towards `h`.

It would be nice if the prove pass could be smart enough to tell that `a[h]` here does not need a bounds check. I can force its hand via `if h >= 0 && h < len(a) && a[h] <= x {`, but that doesn't result in a noticeable improvement:

```
name           old time/op  new time/op  delta
SearchInts-16  16.2ns ± 2%  16.5ns ± 1%  +1.50%  (p=0.001 n=8+10)
```

I realize that this request is fairly specific to binary searches, but I reckon that's a common enough occurrence that we should teach prove about it.

cc @egonelbre @golang/compiler
Repository: vscode
Issue: Add "Disconnect single session" command
Labels: feature-request,debug

This needs some explanation and what I do isn't as wrong as the title suggests:  I have `~/Code/vscode` for our sources and I have `~/Code/_samples/dummy-extension` in which I try out and test API. The extension is sym-linked into `~/.vscode-oss-dev/extensions`. This allows me to make changes in the extension and VS Code itself and easily test things

* from `vscode` run/debug VS Code (it debugs everything: main, renderer, ext-host
* in `dummy-extension` set a breakpoint in some extension code (where else)
* from `dummy-extension` attach to extension host (to apply those breakpoints)
* run the code, hit the breakpoint, and step in/out/over
* 😕 the windows randomly change focus, both are debugging the extension host (naturally)

I don't know how you would implement this but the window at which breakpoint was most recently hit should be the active one

https://user-images.githubusercontent.com/1794099/185606414-e99243f8-2c34-44f3-afbb-d46fd900241b.mov
Repository: vscode
Issue: [Bug] Command execution by mouse click does not restore focus in editor
Labels: bug,quick-pick

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version:  1.70.1 (Universal)
- OS Version: MacOS

**Steps to Reproduce:**

1. Start with command palette by press F1 or CMD+Shift+P
2. Execute command "Add cursor above", by mouse click at command text

**Actual (Problematic) Behavior:**
Command palette disappear and focus left from editor

**Expected Behavior**
Command palette disappear and focus keep in editor
Repository: pytorch
Issue: BCELoss results in autocast CUDA warning
Labels: triaged,module: amp (automated mixed precision)

### 🐛 Describe the bug

Hi folks, BCELoss on calling *backward* method creates warning UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling   warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling'). The code works normally but it is very irritant. torch/cuda/amp/autocast_mode.py creates a warning because it gets called with `device_type` "cuda". I can get around by commenting line 199 but that is not the solution. Although I am using `torch` together with `DGL` library, the error source seems to be in PyTorch.

```
 # Define training EdgeDataLoader
    train_dataloader = dgl.dataloading.DataLoader(
        graph,                                  # The graph
        train_eid_dict,  # The edges to iterate over
        sampler,                                # The neighbor sampler
        batch_size=batch_size,    # Batch size
        shuffle=True,       # Whether to shuffle the nodes for every epoch
        drop_last=False,    # Whether to drop the last incomplete batch
        num_workers=sampling_workers, # Number of sampling processes
    )

    # Define validation EdgeDataLoader
    validation_dataloader = dgl.dataloading.DataLoader(
        graph,                                  # The graph
        val_eid_dict,  # The edges to iterate over
        sampler,                                # The neighbor sampler
        batch_size=batch_size,    # Batch size
        shuffle=True,       # Whether to shuffle the nodes for every epoch
        drop_last=False,    # Whether to drop the last incomplete batch
        num_workers=sampling_workers,       # Number of sampler processes
    )

    print(f"Canonical etypes: {graph.canonical_etypes}")

    # Initialize loss
    loss = torch.nn.BCELoss()

    # Initialize activation func
    m, threshold = torch.nn.Sigmoid(), 0.5

    # Iterate for every epoch
    for epoch in range(1, num_epochs+1):
        model.train()
        tr_finished = False
        for _, pos_graph, neg_graph, blocks in train_dataloader:
            input_features = blocks[0].ndata[node_features_property]
            # Perform forward pass
            probs, labels, loss_output = batch_forward_pass(model, predictor, loss, m, target_relation, input_features, pos_graph, neg_graph, blocks)
            # Make an optimization step
            optimizer.zero_grad()
            loss_output.backward()  # ***This line generates warning***
            optimizer.step()
  
```

### Versions

o CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.22.2
[pip3] numpydoc==1.4.0
[pip3] torch==1.12.1+cpu
[pip3] torchaudio==0.12.1+cpu
[pip3] torchvision==0.13.1+cpu
[conda] Could not collect


cc @mcarilli @ptrblck
Repository: deno
Issue: Auto-closing async iterables
Labels: suggestion

I see that there's been some discussion related to consistently implementing `return()` on Deno provided implementations of `AsyncIterable`s in the past in #10577 and #14086. From what I can tell the latest thinking was to not remove the deprecation of it in `FsWatcher` so that `FsWatcher` would be consistent with other Deno provided async iterables.

Current Deno provided async iterables are from:
- `Deno.readDir()`
- `Deno.watchFs()` (`Deno.FsWatcher`)
- `Deno.serveHttp()` (`Deno.HttpConn`)
- `Deno.listenDatagram` (`Deno.DatagramConn`, unstable)
- `Deno.listen()` (`Deno.Listener`)
- `Deno.listenTls()` (`Deno.TlsListener`)
- have I missed any?

While looking at all these all (except for perhaps `Deno.readDir()`) would benefit from implementing `return()` to support auto-closing after iterating over the resource.

Instead of removing `return()` from `FsWatcher` to make it consistent with the other async iterables I suggest adding `return()` to the others.
Repository: deno
Issue: Inherit from %IteratorPrototype% and %AsyncIteratorPrototype%
Labels: feat,web

From [ECMAScript® 2023 Language Specification](https://tc39.es/ecma262/), [27.1.2 The %IteratorPrototype% Object](https://tc39.es/ecma262/#sec-%iteratorprototype%-object):

> All objects defined in this specification that implement the Iterator interface also inherit from %IteratorPrototype%. ECMAScript code may also define objects that inherit from %IteratorPrototype%. The %IteratorPrototype% object provides a place where additional methods that are applicable to all iterator objects may be added.

From what I can tell Deno's async iterables often don't implement `AsyncIterableIterator<T>` directly and their `[Symbol.asyncIterator]()` implementations don't inherit from %AsyncIteratorPrototype%:

```ts
import { assert } from "std/testing/asserts.ts";

const { constructor: AsyncGeneratorFunction } = async function* () {};

const asyncIteratorPrototype = Object.getPrototypeOf(
  AsyncGeneratorFunction.prototype.prototype,
);

const foo = Symbol();
Object.defineProperty(asyncIteratorPrototype, foo, { value: 42 });

assert(foo in (async function* () {})()); // does not throw

const fsWatcher = Deno.watchFs(".", { recursive: true });

assert(foo in fsWatcher); // does throw
```

%IteratorPrototype% and %AsyncIteratorPrototype% can be safely augmented using ES symbols (to avoid name clashes). I'd like to see Deno's iterables and async iterables implement `IterableIterator`/`AsyncIterableIterator` like `Map.prototype.values()` and many others so that prototypes can be augmented and leverages where desired.
Repository: vscode
Issue: Can open an ipynb notebook
Labels: debt,integration-test-failure,notebook-serialization

```
1) ipynb NotebookSerializer
       Can open an ipynb notebook:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/1/s/extensions/vscode-api-tests/out/singlefolder-tests/ipynb.test.js)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)
```

https://dev.azure.com/monacotools/Monaco/_build/results?buildId=182486&view=logs&j=9833cdaa-2e92-5f8d-56a8-239fd18fd628&t=9bc48eac-eb66-52c8-7250-d6490c5f3a15&l=608
Repository: create-react-app
Issue: Web socket
Labels: needs triage

After npm run build, does that built folder still contain the WebSocket? After the build, I don't need it anymore because I upload it to the server, so that's why I'm interested.
Repository: godot
Issue: ctrl click on gd script's extends relative path will show unnecessary bug reports
Labels: bug,topic:gdscript,topic:editor

### Godot version

v3.5.stable.official [991bb6ac7]

### System information

Windows 10, Vulkan, NVIDIA GeForce RTX 3050 Laptop GPU

### Issue description

When I try to extend a gd script by using the relative path because both scripts are in one folder. The function of ctrl and click works fine but it will report some bugs that aren't necessary :
built-in:2 - Parse Error: Invalid "extends" syntax, expected string constant (path) and/or identifier (parent class).
Resource file not found: res://systems/main.

This isn't a big problem but I think the bug report here is not needed. Also, the 'Resource file not found: res://systems/main.' line shouldn't be there because there is the main.gd file at that path and the path doesn't end with a .gd suffix is a little bit weird. If the relative path could work in extends, then it shouldn't be an error showing when I ctrl-click and jump to its extended gd script file, telling the user that it is a syntax error.

### Steps to reproduce

create a gd script
create another gd script in the same folder and extends it by putting only the file name of the script
ctrl-click on the path
![image](https://user-images.githubusercontent.com/80319225/185637959-dae1c29b-43fe-4946-b478-eaef9134be08.png)


### Minimal reproduction project

_No response_
Repository: rust
Issue: `split_inclusive`'s `DoubleEndedIterator` implementation is unexpected
Labels: T-libs-api,T-libs,C-discussion

I would expect `next_back()` to include the separator *before* the string, i.e. the separator that separates the item from the next one. However:

```rust
"a+b+c".split_inclusive('+').collect::<Vec<_>>()
// => vec!["a+", "b+", "c"]
"a+b+c".split_inclusive('+').rev().collect::<Vec<_>>()
// => vec!["c", "b+", "a+"], but I'd expect vec!["+c", "+b", "a"]
```
[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0a7f053be65f68d69a472642b53c6b0b)


If this behaviour is intended, it should be documented.
Repository: godot
Issue: rpc and rpc_id fail when argument is PackedVector2Array
Labels: bug,needs testing,topic:network

### Godot version

4.0.dev (462bb3bf3)

### System information

Arch Linux - I dont think this is an issue with my computer but i can provide logs/more specs if nessecary

### Issue description

As the title says, trying to send a PackedVector2Array as the argument over rpc or rpc_id will fail. I work around it by packaging the PackedVector2Array inside an array and unpackaging it on the client side.

### Steps to reproduce

Put this code in a multiplayer game. Have a client or server run it. Nothing happens or it crashes without explanation.

```gdscript
func send_data():
	rpc("sync_points", $Line2D.points)

@rpc(any_peer, unreliable_ordered)
func sync_points(points):
	$Line2D.points = points
```

### Minimal reproduction project
Project: Every time a client connects every client gets another triangle on their screen. For it to work, host and client need workaround checked.
~~[rpc_tests.zip](https://github.com/godotengine/godot/files/9384439/rpc_tests.zip)~~
Issue with the zip but a different one was provided by gongpha [below](https://github.com/godotengine/godot/issues/64623#issuecomment-1864479696).
Repository: PowerToys
Issue: Create quicknote in OneNote from input text
Labels: Idea-Enhancement,Product-PowerToys Run,Needs-Triage,Run-Plugin

### Description of the new feature / enhancement

Typing a textstring create a quick note in Microsoft OneNote application and happen input as body text.

### Scenario when this would be used?

When you want to add a quicknote in your Onenote

### Supporting information

Currently one can look up in its Onenote notes, but cannot create one.
Would cut some clicks.
Repository: kubernetes
Issue: managedField entry for a removed API version prevent further resource updates
Labels: kind/bug,sig/api-machinery,lifecycle/frozen,wg/api-expression,triage/accepted

### What happened?

Hi - a user reported an issue were server-side apply (ssa) stopped working.  

ref: https://github.com/knative/operator/issues/1184

tl;dr as we update our CRD schema we drop versions. Prior to dropping versions we run migration jobs so that only the latest storage version is present in the CRD status. When a resource has a managedFields entry for an API version that no longer exists the API server tries to perform conversion and fails. This blocks further server side modifications.




### What did you expect to happen?

Server-side apply works on resources as CRD versions are deprecated and removed.

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

The user created a repo that contains the steps to reproduce the problem: https://github.com/tshak/knoperator-v1beta1-ssa-repro

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6", GitCommit:"ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:"clean", BuildDate:"2022-04-14T08:41:58Z", GoVersion:"go1.18.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-05-19T19:53:08Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
```

</details>


### Cloud provider

<details>
KIND
</details>


### 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: vscode
Issue: Horizontal Scroll Bar is Blocked by Comment
Labels: feature-request,editor-contrib

- Extension version: v0.49.2022081109
- VSCode Version: 1.71.0-insiders
- OS: Windows

Steps to Reproduce:

1. scroll vertically so that a PR comment is in same area as the editor's horizontal scrollbar
2. try to scroll horizontally using the scrollbar
3. focuses on the comment, instead of the scrollbar. :bug:

[![Image from Gyazo](https://i.gyazo.com/aa8307e855b4fc618dc1ce7afda51ee1.gif)](https://gyazo.com/aa8307e855b4fc618dc1ce7afda51ee1)
Repository: rust
Issue: No search results for macro, `repr`
Labels: T-rustdoc,A-docs,C-bug

The macro, `repr`, does not show up in the `std` or `beta` version of the documentation based on search results for, `https://doc.rust-lang.org/beta/std/?search=repr`. 

It does get covered in [Rust Reference](https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#the-c-representation).

Perhaps the documentation could be amended with an entry linking to the reference documentation for such instances, even temporarily.
Repository: pytorch
Issue: [Nested Tensor] Update TestCase.AssertEqual
Labels: triaged,module: nestedtensor,module: testing

## TLDR: Update `TestCase.assertEqual` for nested tensors 

We are currently unbinding nested tensors and comparing elements to assert equality. This works but I think that when the metadata for nested tensors if fully ironed out this can be more direct. This ticket is to track follow up work when the metadata scenario has been solidified.

cc @cpuhrsch @jbschlosser @bhosmer @pmeier
Repository: youtube-dl
Issue: BandLab
Labels: site-support-request,Good first issue

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.12.17**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single track: https://www.bandlab.com/post/f5f04998635a44ea819cacdba7ae2076_f8d8574c3bdaec11b6562818783151a1
- Album: https://www.bandlab.com/sbsdasani/albums/dc26e307-e51f-ed11-95d7-002248452390
- Playlist: https://www.bandlab.com/banditon/collections/20356f3f-8d3f-e811-80c3-00155d65202b


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Support for downloading bandlab songs/playlists/albums.
Repository: go
Issue: database/sql: TestQueryContext flakes with "failed to close rows"
Labels: NeedsFix

[2022-08-08T14:12:03-fe406c8/windows-amd64-race](https://build.golang.org/log/803db466564dc8dc06d7c29699d5318d74837c87)
[2022-08-08T14:11:47-ba89d59/windows-amd64-race](https://build.golang.org/log/dcbdba691a6d8ac6b003e5c7086e302ce7ff7f91)

```
--- FAIL: TestQueryContext (359.09s)
    sql_test.go:410: failed to close rows
    sql_test.go:184: 1 connections still open after closing DB
FAIL
```

cc @bradfitz @kardianos @kevinburke
Repository: material-ui
Issue: Feature Request: extend trigger of TouchRipple to FormControlLabel
Labels: component: ButtonBase,package: material-ui,enhancement

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

When using a component built upon MuiButtonBase, for example, CheckBox, the TouchRipple animation triggers when user clicks the component. Very good.

When such a component is wrapped with FormControlLabel to provide an adjacent label, currently the TouchRipple animation is unaffected by the label.

When label exists, would request the ability to extend the trigger for the TouchRipple animation to include the label. Of course the animation itself would not extend to the label, just the trigger.

Result: Touch the label, see the checkbox change state with a ripple.
Repository: pytorch
Issue: Missing header file
Labels: triaged

### 🚀 The feature, motivation and pitch

Hi, I always build PyTorch from source and link my library to it. Today, I tried link my library to PyTorch nightly package, the error message below came out.
```
Cannot open include file: 'torch/csrc/jit/passes/onnx/constant_map.h': No such file or directory
```
Could we add this header to the package? Or do you have specific policy regarding what should be included and what no? Thanks.

### Alternatives

_No response_

### Additional context

_No response_
Repository: pytorch
Issue: [TorchTidy] Check if `set_to_none` would change optimizer semantics.
Labels: oncall: profiler

### 🚀 The feature, motivation and pitch

Several PyTorch optimizers offer a `set_to_none` argument to delete gradients rather than zeroing them. This is particularly important for CUDA where each operation incurs a separate `cudaLaunchKernel` call. [GradNotSetToNonePattern](https://github.com/pytorch/pytorch/blob/master/torch/profiler/_pattern_matcher.py#L429) attempts to identify this opportunity for improvement; however it is currently overzealous. The issue is that certain optimizers will interpret `None` gradients as cause to reset optimizer state (e.g. [SGD momentum](https://github.com/pytorch/pytorch/blob/master/torch/optim/sgd.py#L234-L238)), and as a result `set_to_none` changes the semantics of the optimizer. This task is to extend `GradNotSetToNonePattern` to check for such exceptions, and only recommend `set_to_none` when it can be safely applied.

CC @tiffzhaofb (you can grab the issue when you get your github in the pytorch org)

### Alternatives

_No response_

### Additional context

_No response_

cc @robieta @chaekit @aaronenyeshi @ngimel @nbcsm @guotuofeng @guyang3532 @gaoteng-git @tiffzhaofb