sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Cannot print 32-bit complex tensors
Labels: module: docs,module: printing,triaged,module: complex,module: half

## To Reproduce

```
import torch

# this works:
y = torch.rand(2, 2, dtype=torch.complex64)
print(y)

# this fails:
y = torch.rand(2, 2, dtype=torch.complex32)
print(y)
```

The following error is produced by the `print()` line:

```
/usr/local/lib/python3.6/dist-packages/torch/tensor.py in __repr__(self)
    177             return handle_torch_function(Tensor.__repr__, relevant_args, self)
    178         # All strings are unicode in Python 3.
--> 179         return torch._tensor_str._str(self)
    180 
    181     def backward(self, gradient=None, retain_graph=None, create_graph=False):

/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py in _str(self)
    370 def _str(self):
    371     with torch.no_grad():
--> 372         return _str_intern(self)

/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py in _str_intern(self)
    350                     tensor_str = _tensor_str(self.to_dense(), indent)
    351                 else:
--> 352                     tensor_str = _tensor_str(self, indent)
    353 
    354     if self.layout != torch.strided:

/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py in _tensor_str(self, indent)
    235 
    236     if self.dtype.is_complex:
--> 237         real_formatter = _Formatter(get_summarized_data(self.real) if summarize else self.real)
    238         imag_formatter = _Formatter(get_summarized_data(self.imag) if summarize else self.imag)
    239         return _tensor_str_with_formatter(self, indent, summarize, real_formatter, imag_formatter)

/usr/local/lib/python3.6/dist-packages/torch/_tensor_str.py in __init__(self, tensor)
     99 
    100             for value in nonzero_finite_vals:
--> 101                 if value != torch.ceil(value):
    102                     self.int_mode = False
    103                     break

RuntimeError: ceil_vml_cpu not implemented for 'Half'
```

The same error occurs if you call `repr()` or `str()` on the tensor directly.

## Environment

Tried this on Google Colab, `torch.__version__` is `1.7.0+cu101`.


cc @brianjo @mruberry @ezyang @anjali411 @dylanbespalko @Lezcano @nikitaved @jlin27
Repository: youtube-dl
Issue: [request] playsuisse.ch (New Swiss-SRF Media Archive)
Labels: site-support-request

## Checklist
- [ x ] I'm reporting a new site support request
- [ x ] I've verified that I'm running youtube-dl version **2021.01.03**
- [ 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
- Single video: https://www.playsuisse.ch/watch/763211/0
- Single video: https://www.playsuisse.ch/watch/808675/1170
- Playlist: https://www.playsuisse.ch/detail/763182 (Click EPISODEN)


## Description
Play Suisse is the new media archive of SRF-, RTS-, RSI- und RTR-Productions and Co-Productions. 
You need a Login, but everyone can create a Login for free.
Repository: pytorch
Issue: Errors when coercing complex numbers of various sizes
Labels: triaged,module: complex,module: half

Runtime errors when multiplying tensors involving complex numbers and non-matching bit widths.

## To Reproduce

```
import torch

torch.tensor(4j, dtype=torch.complex32) * torch.tensor(2.0, dtype=torch.float64)
torch.tensor(4j, dtype=torch.complex32) * torch.tensor(2.0, dtype=torch.complex64)
```

The first line produces:

    RuntimeError: common_dtype_ != ScalarType::Undefined INTERNAL ASSERT FAILED at "/pytorch/aten/src/ATen/native/TensorIterator.cpp":237, please report a bug to PyTorch. 

The second line produces:

    RuntimeError: "copy_" not implemented for 'ComplexHalf'

## Environment

Google Colab with pytorch version `1.7.0+cu101`.

cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved
Repository: PowerToys
Issue: [KBM] add support for when to remap keys, on key down or key up 
Labels: Idea-Enhancement,Product-Keyboard Shortcut Manager
Repository: opencv
Issue: [Feature Request] - Transparency For Drawing Functions
Labels: feature,category: imgproc

Would like to request that all the drawing functions (Rectangle, Line, Circle, Text, etc.), have a _transparency_ parameter/setting that specified the amount of their opacity, therefore enabling them to blend with the pixels they are drawn over.
Repository: opencv
Issue: [Feature Request] - Blend Modes For Drawing Functions
Labels: feature,category: imgproc

Would like to request that all the drawing functions (Rectangle, Line, Circle, Text, etc.), have a _blend mode_  parameter/setting that specified the _type_ of their opacity, therefore enabling them to blend with the pixels they are drawn over in various _ways/styles_

Blend Modes (description) : [http://en.wikipedia.org/wiki/Blend_modes](http://en.wikipedia.org/wiki/Blend_modes)
Repository: opencv
Issue: [Feature Request] - Rectangle(); Rounded Corners
Labels: feature,category: imgproc,priority: low

Would like to request that all the drawing function _Rectangle_ have a rounded corners options with that specifies the _amount_ of roundness, and which _corners_ to round.
Repository: opencv
Issue: [Feature Request] - Line Styles; More
Labels: feature,category: imgproc,priority: low

Would like more line styles for Drawing functions (e..g Line).  As many more as possible, e.g. Dot, Square,  Striped, etc... ..

Each line style with additional parameters. e.g. width, ,spacing, etc.

Maybe also specifying some image data/image file (bitmap and vector) for use as the line style
Repository: go
Issue: x/crypto/ssh: fix documention for ssh.NewServerConn to avoid potential DoS attack
Labels: Documentation,NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.2 linux/amd64
</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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ncw/.cache/go-build"
GOENV="/home/ncw/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ncw/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ncw/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/go/go1.15"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/go/go1.15/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build874025211=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

I followed the example here for building an ssh server: https://gist.github.com/jpillora/b480fde82bff51a06238

This contains the code

```go
	for {
		tcpConn, err := listener.Accept()
		if err != nil {
			log.Printf("Failed to accept incoming connection (%s)", err)
			continue
		}
		// Before use, a handshake must be performed on the incoming net.Conn.
		sshConn, chans, reqs, err := ssh.NewServerConn(tcpConn, config)
		if err != nil {
			log.Printf("Failed to handshake (%s)", err)
			continue
		}

		log.Printf("New SSH connection from %s (%s)", sshConn.RemoteAddr(), sshConn.ClientVersion())
		// Discard all global out-of-band Requests
		go ssh.DiscardRequests(reqs)
		// Accept all channels
		go handleChannels(chans)
	}
```

The problem with this code is that calling `ssh.NewServerConn` can take an arbitrary length of time as it might have to ask the user for a password. In fact calling it like this is setting up a potential DoS attack - one user can take as long as desired to do the authentication, blocking any other users from connecting.

The documentation for `ssh.NewServerConn` should be changed to say that it **must** be called in a new go routine and **should not** be called in in the same go routine as the `Listen` loop.

It might be a good idea if [the example for ssh.NewServerConn](https://pkg.go.dev/golang.org/x/crypto/ssh#example-NewServerConn) was changed to show a loop around the `Listen` call with the `ssh.NewServerConn` being called in a go routine.

This was originally discovered in https://github.com/rclone/rclone/issues/4882 - thanks to @FiloSottile for working out the cause of the problem and suggesting making this issue.
Repository: TypeScript
Issue: Invalid error on computed property name using a variable with the same name as a constructor parameter of that class
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

**TypeScript Version:**  4.1.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Expected behavior:**

No error. The downlevel emit is fine, so this won't give any unexpected behavior at runtime.

**Actual behavior:**

`Initializer of instance member variable '[a]' cannot reference identifier 'a' declared in the constructor.`

**Code**
```ts
const a = Symbol();
class C {
    [a] = 1;
    constructor(a) {}
}
```



<details><summary><b>Output</b></summary>

```ts
"use strict";
var _a;
const a = Symbol();
class C {
    constructor(a) {
        this[_a] = 1;
    }
}
_a = a;

```


</details>


<details><summary><b>Compiler Options</b></summary>

```json
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "alwaysStrict": true,
    "esModuleInterop": true,
    "declaration": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "moduleResolution": 2,
    "target": "ES2017",
    "jsx": "React",
    "module": "ESNext"
  }
}
```


</details>

**Playground Link:** [Provided](https://www.typescriptlang.org/play?#code/MYewdgzgLgBAhjAvDAygTwLYCMQBsAUAlANwCwAUMLnBBDAMIwDeFMbMA2nALpIwCMZcuxihIUAE4BXYFBAT8cQswC+FFUA)
Repository: go
Issue: x/crypto/ocsp: OCSP responses signed by invalid OCSP responder certificate should return signature verification error
Labels: NeedsInvestigation

In case of OCSP reponse signed with embedded OCSP responder cert (not by CA cert directly) ParseResponse from ocsp package does not check if embedded OCSP responder certificate is expired.

It seems...

https://pkg.go.dev/golang.org/x/crypto/ocsp#ParseResponse
https://github.com/golang/crypto/blob/master/ocsp/ocsp.go#L550

...only signatures are checked. This allows one to use old, expired OCSP responder certificate and its key to sign OCSP response and go application using ocsp.ParseResponse package will accept this response but should not (checked in go1.15.2 linux/amd64 but master sources seems to contain the same problem).

OpenSSL in such scenario throws `Response Verify Failure` error:

> OCSP routines:OCSP_basic_verify:certificate verify error:../crypto/ocsp/ocsp_vfy.c:93:Verify error:certificate has expired

Please see OpenSSL's OCSP response verification algo described on...

https://www.openssl.org/docs/man1.1.1/man1/ocsp.html#OCSP-Response-verification

...and do full responder cert verification, not just signatures.

Regards,
Paweł
Repository: opencv
Issue: [Feature Request] - Image Format Support: JPEG XT
Labels: feature,category: imgcodecs

 Would like to request support for the following image format (loading, saving). Support for image data, metadata (Exif/XMP), and all other features.

JPEG XT
Repository: vscode
Issue: Provide a "declaration" icon overlay
Labels: feature-request,editor-symbols

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
For C/C++ extension, we would like a "declaration" icon overlay. 

the related vscode issue: https://github.com/microsoft/vscode/issues/23927
here is the cpptools related issue we want to address: https://github.com/microsoft/vscode-cpptools/issues/3117

The result our C/C++ extension wants is just the ability to have our completion/symbol icons match VS:
Completion has a max of 1 modifier:
![image](https://user-images.githubusercontent.com/16143955/103687821-c0bece80-4f45-11eb-9004-5637081a3541.png)

Symbols has a max of 2 modifiers:
![image](https://user-images.githubusercontent.com/16143955/103687840-c74d4600-4f45-11eb-87f0-1a2e1875246b.png)


Looking at C#, they have an additional "internal" icon modifier too (the "protected internal" and "private protected" cases are not given unique icons). Only 1 modifier max.

From a UI design/implementation perspective, it seems like the max icon modifiers would be around 3, with the base icon image rendered in the top left (bigger than the modifiers), and potential modifiers rendered on the bottom left, bottom right, and top right. Unless modifiers could change rendering of the base icon in other ways, such as color modulation or a transparent overlay over the entire base icon (e.g. "strikeout").
Repository: flutter
Issue: Launch Screen jumps or moves downwards before the layout is loaded in Full Screen app
Labels: platform-android,engine,a: quality,a: layout,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-android,triaged-android

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Create an new app
2. Add android launch screen to it. (Keep the image size small around 200 x 350 PNG file)
3. Use the steps for launch screen as provided in the official documentation. [https://flutter.dev/docs/development/ui/advanced/splash-screen](https://flutter.dev/docs/development/ui/advanced/splash-screen)
2. Convert the app to full screen app using `SystemChrome.setEnabledSystemUIOverlays([]);`
3. Since my device is notched android 10, I was getting a black empty space near the notch. See [https://github.com/flutter/flutter/issues/46486](https://github.com/flutter/flutter/issues/46486)
3. Therefore I added `<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>` to the styles.xml file
4. Now when I rebuild and rerun the app, both status bar and navigation bar is rendered. The next moment when the status bar and navigation bar gets removed, the image also moves downward since it now gets more space.


**Expected results:** <!-- what did you want to see? -->

The splash screen image should remain fixed and ease out before the layout is rendered.

**Actual results:** <!-- what did you see? -->

The splash screen image loads, moves downwards and eases out before the layout is rendered.
Repository: TypeScript
Issue: Cannot import javascript class in `index.d.ts` when using `jsconfig.json`
Labels: Needs Investigation

# Bug Report

### 🔎 Search Terms

JSDoc, javascript, import, index.d.ts, jsconfig

### 🕗 Version & Regression Information

v4.1.2

### ⏯ Playground Link

Requires multiple files ( https://github.com/optoolco/components/blob/master/index.d.ts )

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
// index.d.ts

import * as toaster from "./toaster"

declare global {
  interface HTMLElementTagNameMap {
    "tonic-toaster": toaster.TonicToaster;
  }
}
```

### 🙁 Actual behavior

Expected `toaster.TonicToaster` to exist and for `document.querySelector('tonic-toaster')` to work.

### 🙂 Expected behavior

`toaster.TonicToaster` is any, however when subclasses it, it works as expected

```ts
// index.d.ts

import * as toaster from "./toaster"
class CTonicToaster extends toaster.TonicToaster {}

declare global {
  interface HTMLElementTagNameMap {
    "tonic-toaster": CTonicToaster;
  }
}
```

The goal here is for `const t = document.querySelector('tonic-toaster')` to work. When subclassing in the `index.d.ts` it works as expected including intellisense and go to definition for methods like `toaster.create({})`

When using `"tonic-toaster": toaster.TonicToaster` the `querySelector("tonic-toaster")` returns type `any` instead.
Repository: vscode
Issue: "Cannot edit in read-only editor" tooltip may not show in web version
Labels: bug,editor-core,web

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.53.0-insider (in web browser)
- OS Version: Win10 20H2

Steps to Reproduce:

1. Open a VSCode window in-browser, e.g. a Codespace
1. Open a read only file
1. Try typing text into the file

Expected:
Tooltip that says "Cannot edit in read-only editor":
![image](https://user-images.githubusercontent.com/36966225/103701707-786ad500-4f74-11eb-95c0-fc25b38f6b96.png)

Actual:
No tooltip

NOTE: This issue does not occur in the desktop version of VSCode, only web. It also does not occur when trying to delete text--i.e. hit Backspace--but does occur when trying to add text.
Repository: node
Issue: http: ClientRequest does not always emit close 
Labels: http,stream

ClientRequest won't set `destroyed = true` and emit `'close'` unless the response has been fully read or destroyed.

To behave like a true stream it should do so shortly after `'finish'`.
Repository: pytorch
Issue: need a clear guide for when and how to use torch.cuda.set_device()
Labels: module: docs,module: cuda,triaged,needs design

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

I find myself quite unclear about `torch.cuda.set_device()`. The current documentation is very unsatisfactory, ambgious and confusing. e.g. the first 3 lines of code sample: https://pytorch.org/docs/stable/notes/cuda.html#cuda-semantics
```
cuda = torch.device('cuda')     # Default CUDA device
cuda0 = torch.device('cuda:0')
cuda2 = torch.device('cuda:2')  # GPU 2 (these are 0-indexed)
```
it's very ambiguous and doesn't tell me anything. What is the default device in that example?

How come  `torch.cuda.set_device()` is not used here - as it's the latter that's supposed to set the default device.

If possible I would like to ask for a clarification of what @ngimel shared here: https://github.com/pytorch/pytorch/issues/49961#issuecomment-754319348 quote:

> Default device is the device you are setting with torch.cuda.set_device(). It's possible to set device to 1 and then operate on the tensors on device 0, but for every function internally pytorch would be calling cudaSetDevice(0) - launch function kernel - cudaSetDevice(1) as part of setting device guards, and this is generally less efficient then setting device to 0 in the first place.

She suggested that unless I explicitly set `torch.cuda.set_device()` when switching to a different device (say 0->1) the code could incur a performance hit, because it'll first switch to device 0 and then 1 on every pytorch op if the default device was somehow 0 at that point.

So, say, if I'm setting up a DDP in the program. Do I have to call `torch.cuda.set_device(local_rank)` at some point after  `torch.distributed.init_process_group()` since otherwise the default device will be `cpu` and the whole program will be slower because of that.

Should pytorch flag to users when the default device isn't matching the device the op is run on?

And say, I'm doing model parallelism as explained in this [tutorial](https://pytorch.org/tutorials/intermediate/model_parallel_tutorial.html#apply-model-parallel-to-existing-modules) - why doesn't it do `torch.cuda.set_device()` when switching devices?

Would it be possible to write a clear documentation on when to use `torch.cuda.set_device()`? Currently, it seems to be used more as a band-aid when related to device-switching bugs are encountered, since most of the time most code seems to work just fine w/o it, yet we unknowingly create a performance hit. 

Thank you!

cc @ngimel @jlin27 @mruberry
Repository: kubernetes
Issue: Add Windows container device support to CRI-API
Labels: sig/node,kind/feature,sig/windows,needs-triage

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

I would like to see CRI-API updated to be able to support assigning devices to Windows containers.

**Why is this needed**:
Windows and Linux containers have different methods for specifying what deices to make available to them per OCI spec

Windows uses id and idType (https://github.com/opencontainers/runtime-spec/blob/master/config-windows.md#devices) while Linux uses path, type, and various other fields (https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices)

https://github.com/kubernetes/kubernetes/blob/8b24d1f2f92063faa4cff1cdea6a3d504597b555/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto#L741-L752

The cleanest way to accomplish this would probably be to add a windows-specific device object to CRI-API and then populate that on Windows nodes instead.

Additionally support for mounting devices for Windows containers with dockershim has merged in v1.21 with https://github.com/kubernetes/kubernetes/pull/93285

Related to  https://github.com/containerd/containerd/issues/4878

/sig windows
/sig node