sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: [folding] Support for toggle fold/unfold recursively
Labels: feature-request,editor-folding

I love the toggle fold command, because I can use the same keyboard shortcut to fold and unfold (I'm using space bar with a when expression that checks to see if I'm in normal mode [vim extension]). However, the fold/unfold recursively does not have a toggle. I have unfold recursively set to shift+space, but I wish I could have that fold recursively as well.
Repository: TypeScript
Issue: Typo in `String#match` (lib.es2015.symbol.wellknown)
Labels: Bug,Domain: lib.d.ts

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 -->
<!--
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->

<!-- If you have a QUESTION:
   THIS IS NOT A FORUM FOR QUESTIONS.
   Ask questions at http://stackoverflow.com/questions/tagged/typescript
    or https://gitter.im/Microsoft/TypeScript
-->

<!-- If you have a SUGGESTION:
  Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
  See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->

<!-- If you have a BUG:
  Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.0.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** 
typos, string, lib, es2015.symbol.wellknown

-----

I've wiped the majority of the template since this is a typo report.
I was originally going to just make a PR but the template had:

> * [ ] There is an associated issue in the `Backlog` milestone (**required**)

The typo itself is that `String#match` in `lib.es2015.symbol.wellknown` has it's param description pasted in the middle of it's method description:

https://github.com/microsoft/TypeScript/blob/d2c5d54242c69effbed0ebb27033047e0c995589/src/lib/es2015.symbol.wellknown.d.ts#L209-L212

My PR replaced it with "with a regular expression" - Let me know what the correct way to proceed with this is 🙂
Repository: youtube-dl
Issue: VIU.TV : Unable to download
Labels: geo-restricted

Video can be played online on browser.

>youtube-dl.exe --version
2020.01.15

>youtube-dl.exe --list-subs https://www.viu.tv/encore/the-republic/the-republice1anothe
r-blissful-week
[generic] the-republice1another-blissful-week: Requesting header
WARNING: Falling back on generic information extractor.
[generic] the-republice1another-blissful-week: Downloading webpage
[generic] the-republice1another-blissful-week: Extracting information
ERROR: Unsupported URL: https://www.viu.tv/encore/the-republic/the-republice1another-blissful-week
Repository: pytorch
Issue: torchvision
Labels: triaged,module: vision

Hi all, when I'm trying to run the script of vae tutorial I get this error:

RuntimeError                              Traceback (most recent call last)
<ipython-input-8-284baaea67b6> in <module>
----> 1 import torchvision
      2 from torchvision import transforms

~/virtualenv/lib/python3.6/site-packages/torchvision/__init__.py in <module>
      1 import warnings
      2 
----> 3 from torchvision import models
      4 from torchvision import datasets
      5 from torchvision import ops

~/virtualenv/lib/python3.6/site-packages/torchvision/models/__init__.py in <module>
     10 from .shufflenetv2 import *
     11 from . import segmentation
---> 12 from . import detection
     13 from . import video
     14 from . import quantization

~/virtualenv/lib/python3.6/site-packages/torchvision/models/detection/__init__.py in <module>
----> 1 from .faster_rcnn import *
      2 from .mask_rcnn import *
      3 from .keypoint_rcnn import *

~/virtualenv/lib/python3.6/site-packages/torchvision/models/detection/faster_rcnn.py in <module>
     11 
     12 from .generalized_rcnn import GeneralizedRCNN
---> 13 from .rpn import AnchorGenerator, RPNHead, RegionProposalNetwork
     14 from .roi_heads import RoIHeads
     15 from .transform import GeneralizedRCNNTransform

~/virtualenv/lib/python3.6/site-packages/torchvision/models/detection/rpn.py in <module>
      9 from torchvision.ops import boxes as box_ops
     10 
---> 11 from . import _utils as det_utils
     12 from .image_list import ImageList
     13 

~/virtualenv/lib/python3.6/site-packages/torchvision/models/detection/_utils.py in <module>
     17 
     18 @torch.jit.script
---> 19 class BalancedPositiveNegativeSampler(object):
     20     """
     21     This class samples batches, ensuring that they contain a fixed proportion of positives

~/virtualenv/lib/python3.6/site-packages/torch/jit/__init__.py in script(obj, optimize, _frames_up, _rcb)
   1217         use :func:`@torch.jit.ignore <torch.jit.ignore>`.
   1218 
-> 1219         Example (an exported and ignored method in a module)::
   1220 
   1221             import torch

~/virtualenv/lib/python3.6/site-packages/torch/jit/__init__.py in _compile_and_register_class(obj, rcb, qualified_name)
   1074 
   1075 def _try_get_overloaded_fn(mod, field):
-> 1076     return mod._overloads.get(field, None) if isinstance(mod, ScriptModule) else None
   1077 
   1078 

cc @fmassa
Repository: opencv
Issue: Undefined symbols for architecture x86_64 while linking CXX libraries opencv 3.4.9 under osx 10.13.6 with CUDA 
Labels: category: build/install,category: gpu/cuda (contrib),platform: ios/osx

##### System information (version)

- OpenCV => 3.4.9
- Operating System / Platform => OSX 10.13.6 (17G10021)
- Compiler => XCode 9.2 (clang llvm 900.0.39.2)
- CUDA => 9.1.128

##### Detailed description

I am trying to compile and install opencv 3.4.9 with CUDA support under osx 10.13.6 through CMake-gui (3.16) and after have dealt with some various solved errors (changed XCode, CUDA, etc) I fall on this error I have no idea how to solve.

##### Steps to reproduce
Configuring cmake with these options:

[CMakeVars.txt](https://github.com/opencv/opencv/files/4082525/CMakeVars.txt)

obtained this:

    Built target opencv_cudev
    [ 28%] Linking CXX shared library ../../lib/libopencv_core.dylib
    Undefined symbols for architecture x86_64:"___cudaRegisterLinkedBinary_54_tmpxft_0000dc27_00000000_13_gpu_mat_compute_70_cpp1_ii_71482d89", referenced from:
    __sti____cudaRegisterAll() in cuda_compile_generated_gpu_mat.cu.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [lib/libopencv_core.3.4.9.dylib] Error 1
    make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
    make: *** [all] Error 2
Repository: pytorch
Issue: How to accelerate the compiling of pytorch 
Labels: module: build,triaged

## ❓ Questions and Help

### Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:

- [Discussion Forum](https://discuss.pytorch.org/)
I modify some file of Aten for some reason, when I compile the pytorch project, it takes a lot of  time, almost 5 minutes in my computer...
python setup install  costs a lot of time,  can anybody  help me accelerate the compiling of  pytorch, thanks a lot
Repository: TypeScript
Issue: strictPropertyInitialization option doesn't work with computed properties
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 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.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.7.x-dev.20200118

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
const sym = Symbol();
class A {
    a: 0;
    ['b']: 0;
    [sym]: 0;
    [Symbol.toPrimitive]: 0;
}
```

**Expected behavior:**
Error with all properties.
**Actual behavior:**
Error only with 'a'.
**Playground Link:** https://www.typescriptlang.org/play/index.html?ts=3.8.0-dev.20200118&ssl=1&ssc=1&pln=7&pc=2#code/MYewdgzgLgBBCeBbGBeGBlJAjEAbAFAJQDcAUMLgIYQQwCCMA3qTKzJQFwwAMZbMAbQDkWIQF0uvFmwEJEEnnxmZEOXADooIAAoAnAJaJ9UfQDcApgqkBfIA

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: pytorch
Issue: KL divergence for diagonal Gaussian distributions
Labels: module: distributions,feature,triaged

## 🚀 Feature
- Extend the KL divergence method for two `torch.distributions.Independent` to be as the one in [pyro](https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/kl.py#L19). This recursively falls back to the base distribution to compute the KL divergence but is more flexible in terms of the shared dimensions than the current solution.
- Implement KL divergence for diagonal covariance normals defined by wrapping `torch.distributions.Normal` with `torch.distributions.Independent` and `torch.distributions.MultivariateNormal` as in [pyro](https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/kl.py#L32).

## Motivation
`torch.distributions.kl_divergence` raises a `NotImplementedError` when called on a diagonal Normal when it is defined by wrapping a `torch.distributions.Normal` with `torch.distributions.Independent`. It works fine when the `torch.distributions.MultivariateNormal`  is used but this can be memory and compute intensive when defining diagonal covariance matrices.

KL divergences between diagonal Gaussians and typically other diagonal Gaussians are widely used in variational methods for generative modelling but currently, there is no efficient way to represent a multivariate diagonal Gaussian that allows computing a KL divergence.

## Pitch

The implementation is extremely straightforward:

In `torch.distributions.kl` the `kl_independent_independent` method (https://github.com/pytorch/pytorch/blob/master/torch/distributions/kl.py#L734) is expanded to match https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/kl.py#L19 from pyro.

Similarly, the `kl_independent_MultivariateNormal` method is added as a copy of the method's implementation in pyro (https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/kl.py#L32) keeping only the `Normal` distribution special case (disregarding the `Delta` distribution special case).

## Alternatives

Both of the above changes have been discussed in relation to #11178 which suggests adding a special case distribution for the diagonal covariance Gaussian. This is generally unwanted since any other diagonal covariance distributions (or distributions wrapped with `Independent`) would need a special diagonal case class as well. The suggestion at hand does not require any new distribution but still enables efficient KL divergence computation for `Independent` distributions and specifically diagonal Gaussians.


cc @vincentqb @fritzo @neerajprad @alicanb @vishwakftw
Repository: TypeScript
Issue: VS Code variable inspection / watch does not work for default imports in NodeJS environment
Labels: Bug

**TypeScript Version:**  3.7.5
**VSCode Version:** 1.41.1 2019-12-18

**Search Terms:**
VSCode TypeScript Default Import Renamed Can't Debug Watch Inspect

**Code**

filea.ts
```ts
const a: string = "hello";
export default a;
```

fileb.ts
```ts
import a from "./filea"
console.log(a);
```

tsconfig.json
```json
{
   "compilerOptions": {
      "lib": [ "es6" ],
      "moduleResolution": "node",
      "module": "commonjs",
      "target": "es6",
      "sourceMap": true
   }
}
```

**Expected behavior:**

Works correctly in runtime
Variable **a** (imported one) can be inspected

**Actual behavior:**

Works correctly in runtime
Variable **a** (imported one) can't be inspected neither watched as VS Code says: *not available*


The problem is the variable **a** does not exist at runtime as the import is transpiled as:

```js
const filea_1 = require("./filea");
console.log(filea_1.default);
```

Watching of filea_1.default works correctly, of course.

I am not sure if there is additional mapping somewhere, but everything else works well (breakpoints, other variable inspections...)

maybe the default imports can be transpiled as

```js
const a = require("./filea").default;
console.log(a);
```
Repository: rust
Issue: Scan is overly specialized
Labels: T-libs-api,C-feature-request,A-iterators

Here is the existing type signature for std::iter::scan:
`fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where
    F: FnMut(&mut St, Self::Item) -> Option<B>, `

If I were to use a verbose name for `scan` as implemented now, I would call it `map_with_state_until`, this means that if I just want `map_with_state`, things can get really awkward using the existing scan if I want to return an option which _doesn't_ terminate the Iterator for `collect` etc. e.g. `vecter.iter().scan( |state, x| if x > 1 then Some(None) else Some(Some(x)) ).flatten()`

If we instead have `F` just turn `B` instead of `Option<B>` like:
`fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where
    F: FnMut(&mut St, Self::Item) -> B, ` then that becomes a lot more simple:
`vecter.iter().scan( |state, x| if x > 1 then None else Some(x) )`

and achieving the existing `scan` behavior is trivially achieved by simply adding `fuse()`.

This allows `scan` to have behavior more in-line with similar functions like `map` and `fold`:

```
fn fold<B, F>(self, init: B, f: F) -> B where
    F: FnMut(B, Self::Item) -> B, 

fn map<B, F>(self, f: F) -> Map<Self, F> where
    F: FnMut(Self::Item) -> B,
```

and also brings it more in-line with how other languages define `scan` :  `(a -> b -> a) -> a -> [b] -> [a]` (Haskell), `('State -> 'T -> 'State) -> 'State -> seq<'T> -> seq<'State>` (F#) etc. 

I think this also gives a clear way forward to addressing other issues which previously ended up unresolved like:
https://github.com/rust-lang/rust/pull/14425 

So I think there ought to be `scan` as defined above, and `scan_until` which is the existing implementation.

References:
http://zvon.org/other/haskell/Outputprelude/scanl_f.html

https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/seq.scan%5b't,'state%5d-function-%5bfsharp%5d
Repository: pytorch
Issue: Build without MKL is not possible when MKL is installed
Labels: module: build,triaged,module: mkl

Hello,

I was planning to make some benchmark with different BLAS implementation on CPU so I built several Pytorch package with BLAS=Eigen/OpenBLAS/ATLAS/MKL.
Sadly something unexpected occurred: All version are linked to libmkl!

Here is an example with the Eigen flavor:

```
python3 -c 'import torch; print(torch.__config__.show())'

PyTorch built with:
  - GCC 8.3
  - Intel(R) Math Kernel Library Version 2019.0.2 Product Build 20190118 for Intel(R) 64 architecture applications
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - Build settings: BLAS=Eigen, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS=-g -O2 -fdebug-prefix-map=/home/acecile/packaging/pytorch/pytorch-1.3.1+debian=. -fstack-protector-strong -Wformat -Werror=format-security -DOMPI_SKIP_MPICXX=1 -I/usr/include/mkl -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Wno-stringop-overflow, FORCE_FALLBACK_CUDA_MPI=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=False, USE_EIGEN_FOR_BLAS=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKLDNN=OFF, USE_MPI=ON, USE_NCCL=OFF, USE_NNPACK=1, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF, 
```

```
ldd /usr/lib/python3/dist-packages/torch/lib/libtorch.so | grep -i mkl

	libmkl_intel_lp64.so => /usr/lib/x86_64-linux-gnu/libmkl_intel_lp64.so (0x00007f43c8dea000)
	libmkl_gnu_thread.so => /usr/lib/x86_64-linux-gnu/libmkl_gnu_thread.so (0x00007f43c7596000)
	libmkl_core.so => /usr/lib/x86_64-linux-gnu/libmkl_core.so (0x00007f43c340a000)
```

I look at all environment variable and found none to explicitely disable the use of MKL. Any help would be appreciated !

Regards, Adam.
Repository: rust
Issue: Wrong error message (E401) when storing the result of a generic const fn inside a const member of a generic function
Labels: C-enhancement,A-diagnostics,T-compiler

I tried this code, assuming the result of `size_of::<T>()` would be considered a constant value since it would be known at function monomorphization:

```rust
const fn size_plus_one<T:Sized>() -> usize {
    const size: usize = ::core::mem::size_of::<T>();

    size + 1
}
```

This resulted in the following compilation error:

```
error[E0401]: can't use generic parameters from outer function
 --> src/lib.rs:2:48
  |
1 | const fn size_plus_one<T:Sized>() -> usize {
  |                        - type parameter from outer function
2 |     const size: usize = ::core::mem::size_of::<T>();
  |                                                ^ use of generic parameter from outer function
```

As it turns out, the error message here is incorrect, and the issue can be solved by using `let` instead, something the error message was rather unhelpful with.

```rust
const fn size_plus_one<T:Sized>() -> usize {
    let size: usize = ::core::mem::size_of::<T>();

    size + 1
}
```

[**PLAYGROUND LINK**](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a1a19008933627ff9ca64d6751626fce)

## Meta

```
rustc 1.40.0 (73528e339 2019-12-16)
binary: rustc
commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14
commit-date: 2019-12-16
host: x86_64-unknown-linux-gnu
release: 1.40.0
LLVM version: 9.0
```
Repository: TypeScript
Issue: noImplicitAny, noImplicitThis fixers don't apply interface type within IIFE
Labels: Bug

**TypeScript Version:**  3.8.0-dev.20200119


<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** noImplicitAny noImplicitThis codefix fix iife export

**Code**

```ts
(function () {
    interface Container {
        member: string;
        returnThisMember: () => string;
    }

    function returnThisMember() {
        return this.member;
    }

    const constContainer: Container = {
        member: "sample",
        returnThisMember: returnThisMember,
    };

    let letContainer;
    letContainer = constContainer;
})();
```

**Expected behavior:**

The `this` in `returnThisMember`'s declaration and the `letContainer` declaration should have codefixes suggested to add a type of `: Container`.

**Actual behavior:**

No codefixes suggested.

They _do_ get suggested if you remove the `(function () {` and `})();`.

**Playground Link:** http://www.typescriptlang.org/play/?ssl=11&ssc=1&pln=12&pc=1#code/BQMwrgdgxgLglgewgAmASmQbwLAChkHJwQwCmATiAIZSnIDCSMVxFWehnyAtqdwEYUAXMgDOMcsQDmAbg5cC5UjDDkIAFQAWcUQFk+g8iPTIAvAD4xE6XPyEAvnnkFw0eEmRKVarTv0CKExw7BS9VFBhtUQA6XgDyW05HXGdkKCRxNIyYRhIWCGEGJny2U3YQrjjDEQAiUSpuAAcAG1IagBpUzjCfKP9qz2Vw3z0DCk6K+1tU1phkWdzmVgSZ5UWS8jMsiHF15dt7NHRbIA

**Related Issues:** #28964 tracks adding the `noImplicitThis` codefix, which shares much of its code code with `noImplicitAny` fixes.
Repository: godot
Issue: Deleting elements from Enum that is used in an export var creates inconsistencies
Labels: bug,topic:editor

**Godot version:**
tested in 3.1+, also tested in 3.2.beta6


**OS/device including version:**
Windows 10

**Issue description:**

When using enums in var exports, whenever i would delete an element from the enum in the beginning of the enum-list, all the places, where i use this enum in an export, the choice will be pushed up by one. so if i had 5 choices "A, B, C, D, E". I picked C and at a later point deleted B from the enum, the picked option would then automatically become D, because the choice of the enum is only saved by index in the enum "list".

The origin of this seems to be, that the enum-choice is saved by index in the .tres/.tscn file, therefore after deleting an object with a lower index, the index will point to a different element.

This creates the problem for me, that i cannot really change an enum fundamentally at a later point, as it will create a lot of extra work correcting the (now) wrong choices in the all the Nodes/Resources that use that enum.

My expected behaviour would be, that if in an enum of "A, B, C, D, E" if i chose C and deleted B, that the choice for all the options that arent the deleted element (B) stay persistent. So C would stay C.
And only for B there should be a consistent behaviour where either the next or previous element would be picked. So if i picked "B" and deleted "B" from the enum, it should always pick the one next-lower (A) or next-higher (C). But only one of both rules, and that rule would then be used 100% of the time.

**Steps to reproduce:**
- Open Reproduction project
- navigate to Control.tscn
- click on the root-node "Control" to open the inspector
- check if "Element 4" is selected in the inspector in the field "Selectable"
- Go to the script and delete "Element 3" from the Enum
- Save
- check what element is seleccted in the "Selectable" now. It should be "Element 5"

**Minimal reproduction project:**
[Reproduction Project Enum export delete.zip](https://github.com/godotengine/godot/files/4083653/Reproduction.Project.Enum.export.delete.zip)