sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: PowerToys
Issue: FancyZones Editor - Snap zone dividers to current windows
Labels: Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

Zone dividers should snap to the edges of existing windows.

Maybe it could be that it only happens when you hold shift while dragging.

### Scenario when this would be used?

It's common to already have your windows arranged in the layout you want.

Currently it's hard to precisely align a divider to the edge of an existing window.

### Supporting information

_No response_
Repository: go
Issue: x/crypto/ssh: cannot close ssh session
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.17
</pre>

### Does this issue reproduce with the latest release?
yes


### What operating system and processor architecture are you using (`go env`)?
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jx/d_08_gm93psc4v9lm3zzjc300000gn/T/go-build1736071007=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->
```
func test() {
	client, err := ssh.Dial("tcp", "xx.xx.xx.xx:22", &ssh.ClientConfig{
		User:            "root",
		Auth:            []ssh.AuthMethod{ssh.Password("123")},
		HostKeyCallback: ssh.InsecureIgnoreHostKey(),
	})
	if err != nil {
		log.Panic(err)
	}
	session, err := client.NewSession()
	if err != nil {
		log.Panic(err)
	}
	defer session.Close()
	go func() {
		// err := session.Run("while true;do echo test;done")
		err := session.Run("sleep 6000")
		if err != nil {
			log.Println(err)
		}
	}()
	time.Sleep(time.Second * 5)

	err = session.Close()
	if err != nil {
		log.Println(err)
	}
	log.Println("finished")
}
```


### What did you expect to see?
```
2022/04/12 13:35:17 finished
2022/04/12 13:35:17 Process exited with status 141 from signal PIPE
```


### What did you see instead?
```
2022/04/12 13:35:17 finished
```
If I run `while true;do echo test;done`, the session can be closed gracefully.  However `sleep 6000` is still running after this process finished.
Repository: godot
Issue: Crypto.Sign with Sha256 gives different results between gdscript and c#
Labels: bug,topic:dotnet

### Godot version

v3.4.4.stable.mono.official [419e713a2]

### System information

Windows 10

### Issue description

I'm getting different results calling Crypto.Sign in gdscript vs c# when using hash_type Sha256.

I think the gdscript version is correct.

### Steps to reproduce

Run this code from any c# script, and observe the result.

```
var crypto = new Crypto();
var key = crypto.GenerateRsa(4096);
var hash = "example".SHA256Buffer();
GD.Print("C#: ", Marshalls.RawToBase64(crypto.Sign(HashingContext.HashType.Sha256, hash, key)).Substring(0, 40));
GD.Print("GD: ", Marshalls.RawToBase64((byte[])crypto.Call("sign", HashingContext.HashType.Sha256, hash, key)).Substring(0, 40));
```
prints
```
C#: axrU4IYMqiwIT/T6nlKJxqaACzUMlBITgVA2r8tK
GD: RJF5ESH53pjFr3slFyff910O+yhDBUHTi5K/jIJ/
```

The only difference between the two invocations is that one is using the C# api crypto.Sign(...), and the other is doing crypto.Call("sign",...)

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: Op segfaults with ForwardAD and Subclassed Tensor as Tangent
Labels: triaged,module: forward ad

### 🐛 Describe the bug

```python
import torch
import torch.autograd.forward_ad as fwAD
from torch.utils._pytree import tree_map
import contextlib

@contextlib.contextmanager
def no_dispatch():
    guard = torch._C._DisableTorchDispatch()
    try:
        yield
    finally:
        del guard

class CompositeCompliantTensor(torch.Tensor):
    elem: torch.Tensor

    __slots__ = ['elem']

    __torch_function__ = torch._C._disabled_torch_function_impl

    @staticmethod
    def __new__(cls, elem, *args, **kwargs):
        r = torch.Tensor._make_wrapper_subclass(  # type: ignore[attr-defined]
            cls, elem.size(),
            dtype=elem.dtype, layout=elem.layout,
            device=elem.device, requires_grad=elem.requires_grad,
            strides=elem.stride(), storage_offset=elem.storage_offset())

        if elem.requires_grad:
            r.elem = elem.detach().clone()
        else:
            r.elem = elem
        
        return r

    def __repr__(self):
        return f"CompositeCompliantTensor({self.elem})"

    @classmethod
    def __torch_dispatch__(cls, func, types, args=(), kwargs=None):
        def unwrap(e):
            return e.elem if isinstance(e, CompositeCompliantTensor) else e

        def wrap(e):
            return CompositeCompliantTensor(e) if isinstance(e, torch.Tensor) else e

        with no_dispatch():
            unwrapped_args = tree_map(unwrap, args)
            unwrapped_kwargs = tree_map(unwrap, kwargs)
            unwrapped_rs = func(*unwrapped_args, **unwrapped_kwargs)
            rs = tree_map(wrap, unwrapped_rs)

        return rs

CCT = CompositeCompliantTensor

def fn(x, y):
    return torch.add(x, y)

with fwAD.dual_level():
    x_f = CCT(torch.tensor(-8.4784, requires_grad=True))
    y_f = CCT(torch.tensor(-1.7658, requires_grad=True))

    dual_input_1 = fwAD.make_dual(x_f, torch.randn_like(x_f))
    dual_input_2 = fwAD.make_dual(y_f, torch.randn_like(y_f))
    out = fn(dual_input_1, dual_input_2)
    print("1")

    dual_input_1 = fwAD.make_dual(x_f, torch.randn_like(x_f))
    dual_input_2 = fwAD.make_dual(y_f, CCT(torch.randn_like(y_f)))
    out = fn(dual_input_1, dual_input_2)
    print("2")

```

The following script segfaults while performing the second operation.

**NOTE**: Script works if we remove `with no_dispatch` in `__torch__dispatch__`.

### Versions

master

cc: @zou3519 @soulitzer
Repository: godot
Issue: Runtimes in the nuget package cannot be copied to the android library correctly. 
Labels: bug,platform:android,needs testing,topic:dotnet,topic:export

### Godot version

mono 3.4.4.stable

### System information

macos 11.6

### Issue description

Runtimes in the nuget package cannot be copied to the android library correctly. 

### Steps to reproduce

Lua is not included in "libs" in "apk" exported from Android.

### Minimal reproduction project

[test.zip](https://github.com/godotengine/godot/files/8470793/test.zip)
Repository: PowerToys
Issue: Svg thumbnails not showing embedded pictures
Labels: Idea-Enhancement,Product-File Explorer

### Microsoft PowerToys version

"v0.57.2"

### Running as admin

- [X] Yes

### Area(s) with issue?

SVG Preview, SVG Thumbnail

### Steps to reproduce

a svg file like this is not showing the picture embedded as it's diplayed in Edge browser.
```
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1024" height="768" viewBox="0 0 1024 768">
<image x="0.0" y="0.0" width="1024px" height="768px" xlink:href="ImageTest1024x768.jpg"/>
<line x1="100" y1="100" x2="150"  y2="200" stroke-width="6" stroke="#00FF00" />
</svg>
```
the modified svg like this works but cannot be move in another folder because of absolute path
```
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1024" height="768" viewBox="0 0 1024 768">
<image x="0.0" y="0.0" width="1024px" height="768px" xlink:href="C:/Users/Public/ImageTest1024x768.jpg"/>
<line x1="100" y1="100" x2="150"  y2="200" stroke-width="6" stroke="#00FF00" />
</svg>
```


not link to this but same error displayed in panel preview : https://github.com/microsoft/PowerToys/issues/2204

### ✔️ Expected Behavior

![image](https://user-images.githubusercontent.com/60424778/162914080-26808193-abc1-4137-9c4a-86272b88750b.png)

the message "Some elements have been blocked to help prevent the sender from identifying your computer. Open this item to view all elements." still appears in preview panel, I think I understand it's linked to http://www.w3.org which has its request blocked



### ❌ Actual Behavior


![image](https://user-images.githubusercontent.com/60424778/162913368-9e0e209f-4a60-4d80-88fd-3685ab209096.png)

Message Appears 
"Some elements have been blocked to help prevent the sender from identifying your computer. Open this item to view all elements."
 in preview panel but also for the working file



### Other Software

_No response_
Repository: pytorch
Issue: jit fails when trying to assign values to model via hook
Labels: oncall: jit

### 🐛 Describe the bug

I'm using hooks to assign new values to the model on forward passes. Jit script fails with:
```
RuntimeError: 
attribute assignment is not defined on python value of type 'Model Name':
```

For Example:

```python
from typing import Iterable, Callable, Tuple

from torch import Tensor, nn, jit
from torchvision.models import resnet50


class FeatureExtractor(nn.Module):
    def __init__(self, model: nn.Module, layers: Iterable[str], num):
        super().__init__()
        self.model = model
        self.num = num

        for layer_id in layers:
            layer = dict([*self.model.named_modules()])[layer_id]
            layer.register_forward_hook(self.save_outputs_hook(layer_id))

    def save_outputs_hook(self, layer_id: str) -> Callable:
        fe = self
        def fn(_, input: Tuple[Tensor], output):
            fe.num = 3
        return fn

    def forward(self, x: Tensor):
        _ = self.model(x)


if __name__ == '__main__':
    resnet_features = FeatureExtractor(resnet50(), layers=["layer4", "avgpool"], num=0)
    script = jit.script(resnet_features)
```

Fails with 
```
RuntimeError: 
attribute assignment is not defined on python value of type 'FeatureExtractor':
  File "", line 20
        def fn(_, input: Tuple[Tensor], output):
            fe.num = 3
            ~~~~~~~~~~ <--- HERE

```

### Versions

PyTorch version: 1.11.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 11.6 (x86_64)
GCC version: Could not collect
Clang version: 13.0.0 (clang-1300.0.29.30)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.8 (main, Nov 10 2021, 09:21:22)  [Clang 13.0.0 (clang-1300.0.29.3)] (64-bit runtime)
Python platform: macOS-11.6-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] pytorch-lightning==1.6.0
[pip3] torch==1.11.0
[pip3] torchmetrics==0.7.3
[pip3] torchvision==0.12.0
[conda] Could not collect
Repository: ant-design
Issue: DirectoryTree does not forward defaultExpandParent  
Labels: 🐛 Bug,help wanted,Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/hardcore-sea-y1jmrl?file=/index.js)

### Steps to reproduce

Open the page and see that it does not use `defaultExpandParent` and defaults to `true` instead `false`.

### What is expected?

defaultExpandParent is forwarded. See https://github.com/ant-design/ant-design/blob/master/components/tree/DirectoryTree.tsx#L216.

### What is actually happening?

defaultExpandParent is not forwarded.

| Environment | Info |
| --- | --- |
| antd | 4.19.5 |
| React | 17.0.2 |
| System | MacOs |
| Browser | Chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: x/tools/gopls: add autocomplete for generic function type aliases
Labels: FeatureRequest,gopls,Tools

```go
type Foo[T any] func() T

func Bar[T any](f Foo[T]) {}
// Or 
func FooBar[T any](val T, f Foo[T]) {}

func main() {
    // When writing out this function call, with all the needed type parameters already specified, 
    // gopls should suggest the "func(...) {}" autocomplete, so the function signature is automatically generated.
    Bar[int](/* "func(...) {}" autocomplete should be suggested here. Foo[int] signature would be generated */)

    // The same should happen if the required type parameters can be inferred from already given parameters e.g
    var input string
    FooBar(input, /* "func(...) {}" autocomplete should be suggested here. Foo[string] signature would be generated */)
}
```

If any help is needed with this proposal I will be happy to look into it.
Repository: pytorch
Issue: Misleading documentation for cholesky_inverse
Labels: module: docs,triaged,module: linear algebra

### 📚 The doc issue

https://pytorch.org/docs/stable/generated/torch.cholesky_inverse.html

The documentation suggests that the inputted matrix should be the original positive-definite matrix A, where as the examples show that the user must first compute the cholesky u and input that into the cholesky_inverse function.

### Suggest a potential alternative/fix

Change the parameters section so that it is clear that the input must be the cholesky decomposition.

cc @svekars @holly1238 @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano @brianjo
Repository: vscode
Issue: Find widget buttons become focusable while hidden after using `Find` once
Labels: bug,accessibility,editor-find


Issue Type: <b>Bug</b>

Steps to Reproduce:

1. Start up vscode
2. Open a text file (or create a new one)
2. Activate `Tab Moves Focus` (`ctrl` + `m`)

At this point if you use tab to navigate, the tab order goes:
1. Text editor
2. Status bar

But if you do one of the following things:
- Open `Find` and close it again (`ctrl` + `f` and `escape`)
- Toggle `Match Case` (`alt` + `c`)
- Toggle `Match Whole Word` (`alt` + `w`)
- Toggle `Use Regular Expression` (`alt` + `r`)
- Toggle `Preserve Case` (`alt` + `p`)

Then the tab order goes:
1. Text editor
2. `Match Case` button
3. `Match Whole Word` button
4. `Use Regular Expression` button
5. `Preserve Case` button
6. Status bar

`Match Case`, `Match Whole Word` and `Use Regular Expression` buttons become visible for a short moment if you press `space` or `enter` while focused on them. `Preserve Case` doesn't become visible when pressing `space` or `enter`,
but you can see it has been toggled by opening the the `Find` widget.

You can get back to the previous tab order if you reload vscode

Does this issue occur when all extensions are disabled?: Yes
This is also reproducible on vscode.dev and github.dev

VS Code version: Code 1.66.1 (8dfae7a5cd50421d10cd99cb873990460525a898, 2022-04-06T14:51:26.173Z)
OS version: Linux x64 5.10.101-14958-ge846e44211d8
Restricted Mode: No


<!-- generated by issue reporter -->
Repository: pytorch
Issue: multiprocessing and torch.tensor, Cannot allocate memory error
Labels: module: multiprocessing,triaged

### 🐛 Describe the bug

Consider the simple example in the following, if I return a list at `func`, there will be no error, 
if I return a `torch.tensor` I will get this error:

```sh
/work/aten/src/ATen/MapAllocator.cpp":263, please report a bug to PyTorch. unable to open shared memory object </torch_326297_506> in read-write mode')'
```
and If it use  `set_sharing_strategy`, to avoid this error:

```python
from multiprocessing import Pool
from time import sleep
import torch


class A:
    def __init__(self, n_job, N):
        self.n_job = n_job
        self.N = N

    
    def func(self, i):
        # sleep(1)
        print(i)
        return torch.as_tensor([i])
        # return [i]

    data = []

    def read(self):

        torch.multiprocessing.set_sharing_strategy('file_system')

        with Pool(processes=self.n_job) as pool:
            data = pool.map(self.func, range(self.N))
    
        return data
    
if __name__ == "__main__":
    a = A(10, 2**16)
    data = a.read()


    print(len(data))
```

I get another error says 

```sh 
MapAllocator.cpp":323, please report a bug to PyTorch. unable to mmap 72 bytes from file </torch_326588_5707>: Cannot allocate memory (12)
```

is there any solution?
I need to return the tensor, so just removing the tensor is not an option.

I am using 

### Versions

```sh 
PyTorch version: 1.10.2
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.3 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: 10.0.0-4ubuntu1 
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: 11.6.112
GPU models and configuration: GPU 0: NVIDIA RTX A5000
Nvidia driver version: 510.47.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.5
[pip3] torch==1.10.2
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.0.3              h15472ef_10    conda-forge
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py39h7f8727e_0  
[conda] mkl_fft                   1.3.1            py39hd3c417c_0  
[conda] mkl_random                1.2.2            py39h51133e4_0  
[conda] numpy                     1.21.5                   pypi_0    pypi
[conda] numpy-base                1.21.2           py39h79a1101_0  
[conda] pytorch                   1.10.2          cpu_py39hfa7516b_0
```

cc @VitalyFedyunin
Repository: material-ui
Issue: [Tabs] Interplay with React Router 6
Labels: component: tabs

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

I am using React Router 6 **with ** nested routes. In my Tabs I need to find the selected path for the `value` prop. It worked fine with RR5, but I feel like in RR6 we don't have the necessary tools anymore.

Somewhere I have found an issue which tackles this problem. However, it didn't work with nested routes. (Sorry, cannot find issue anymore.)

I use a helper library (see below) which finds the path (unreliable?!). Anyway, I want to open this issue in case anyone else runs across it and wants to provide a solution. Not asking for help here, just providing a solution and a place where people can contribute to this issue.

```
import * as React from 'react';
import { NavLink, useLocation } from 'react-router-dom';
import cs from 'classnames';
import stringSimilarity from 'string-similarity';

import * as S from './styles';

const TabNavigation = ({ tabs }) => {
  const { pathname } = useLocation();

  const matches = stringSimilarity.findBestMatch(
    pathname,
    tabs.map((tab) => tab.to)
  );

  return (
    <S.Tabs
      value={tabs[matches.bestMatchIndex].to}
      variant="scrollable"
      scrollButtons="on"
      TabIndicatorProps={{
        style: { backgroundColor: 'transparent' },
      }}
    >
      {tabs.map((tab, index) => (
        <S.Tab
          key={tab.label}
          label={tab.label}
          value={tab.to}
          to={tab.to}
          component={NavLink}
          className={cs({
            disabled: tab.disabled,
            active: matches.bestMatchIndex === index,
          })}
        />
      ))}
    </S.Tabs>
  );
};

export { TabNavigation };
```

### Expected behavior 🤔

_No response_

### Steps to reproduce 🕹

_No response_

### Context 🔦

_No response_

### Your environment 🌎

_No response_
Repository: PowerToys
Issue: FancyZones windows going over the screen area
Labels: Issue-Bug,FancyZones-Layouts,Product-FancyZones,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.57.0

### Running as admin

- [ ] Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

Every morning when I start my computer, I start dragging my windows to the set spaces, and the window I put on the far right, goes longer than the screen area, so if I scroll all the way down I don't see the end of the page. I have to either manually move the screen down and resize it, or I have to open PowerToys, then open FancyZones and then launch the layout editor and after that, I drag the window over that area again and it gets set the right way.

### ✔️ Expected Behavior

For the window I drag to the zones to stay within the screen area

### ❌ Actual Behavior

the windows I drag go pass the edges of the zones, going under the taskbar resulting in me not being able to see the end of the page.

### Other Software

_No response_

![image](https://user-images.githubusercontent.com/103511500/163253527-58056ac4-705a-45cb-b49e-5ffe83829642.png)
Repository: material-ui
Issue: Support for React Hook Form (uncontrolled forms)
Labels: new feature

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Support for React Hook Form, particularly for uncontrolled forms, which are really useful for improving performance, since components such as TextField can get really stuttery with both Formik and RHF controlled components.

Although we already can integrated TextField with uncontrolled RHF functions, but it creates some problems with its internal state, such as [the label not shrinking / growing when the field is set programatically](https://github.com/react-hook-form/react-hook-form/issues/220) or [dirty checks not working](https://github.com/mui/material-ui/pull/17025).

In the later thread, @oliviertassinari suggested reevaluating supporting RHF once it gained more traction, like Formik.

Since then, the library has exploded in popularity and, currently, has almost the same number of weekly downloads as Formik (1,780,630 x 1,903,062).

Are there any considerations on this matter?

### Examples 🌈

_No response_

### Motivation 🔦

_No response_
Repository: three.js
Issue: Supporting Volume.extractSlice on any vector
Labels: Question,Addons

Hello !

I using the nrrd-loader and Volume.extractSlice to display my data, it's working well.
Is it planned to add possibility extractSlice on different vector than ('x', 'y', and 'z') ? 
I found this comment on the VolumeSlice type

https://github.com/mrdoob/three.js/blob/8db7a598ed6e71538e286e5c56c02cc5823157dc/examples/jsm/misc/VolumeSlice.js#L16
Repository: go
Issue: os: TestRemoveAllRace failures with "directory not empty" on dragonfly-amd64
Labels: OS-Dragonfly,NeedsInvestigation

```
#!watchflakes
post <- goos == "dragonfly" && pkg == "os" && test == "TestRemoveAllRace" && `directory not empty`
```

`greplogs --dashboard -md -l -e 'FAIL: TestRemoveAllRace .*(?:\n    .*)*directory not empty' --since=2022-01-01`

[2022-04-12T03:07:42-d4dbad5/dragonfly-amd64](https://build.golang.org/log/98f728cf7ee6f22e73d5393d6adac20cea44ecda)
[2022-03-21T18:58:34-d8ce7ae/dragonfly-amd64](https://build.golang.org/log/2ae784e6a5c18b554dbdcec0e993cc6ebb372286)

This failure mode seems to occur instead of the `invalid argument` failure mode observed in #50716 (attn @tuxillo).