sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: Behavior difference with :<lang>do commands
Labels: compatibility,provider

In Vim, the `:<lang>do` commands (`:rubydo`, `:pydo`, etc.) stop executing if the command causes the current buffer to change.  You can see a test for this in [test_python2.vim](https://github.com/neovim/neovim/blob/c46997aa8744f88e9886022dab703157c101cff7/src/nvim/testdir/test_python2.vim#L16-L21) which came from upstream [fixing](https://github.com/vim/vim/commit/a58883b) this issue in the python bindings.

In Neovim, we just tell the provider "run this command for all lines in this range".  This means that, unless the provider does otherwise, the commands are all going to run in the context of the original buffer, even if the commands _should_ be changing to a different buffer.

Should Neovim be calling into the provider for every line, so we can centralize these sorts of checks, instead of the current mechanism?
Repository: pytorch
Issue: [Caffe2] Runtime error while using a pre-trained style_transfer model
Labels: caffe2

Hello, I'm using Caffe2 on Conda / Mac OSX 10.13.1 and I was trying to replicate the model zoo tutorial on a style transfer model. I pretty much copied the same thing to see if it would work while replacing squeezenet with style_transfer/crayon.

```python
from caffe2.python.models.style_transfer import crayon as mynet
from caffe2.python import workspace
import numpy as np

init_net = mynet.init_net
predict_net = mynet.predict_net

# you must name it something
predict_net.name = "stylize"

# Dummy batch
data = np.random.rand(1, 3, 227, 227).astype(np.float32)
workspace.FeedBlob("data", data)

workspace.RunNetOnce(init_net)
workspace.CreateNet(predict_net)
p = workspace.Predictor(init_net.SerializeToString(), predict_net.SerializeToString())
p.run([data])
```

While instantiating the net the following warnings appeared

```
I0615 03:22:06.141191 2799588160 operator.cc:167] Engine MOBILE is not available for operator PackedInt8BGRANHWCToNCHWCStylizerPreprocess.
I0615 03:22:06.141261 2799588160 operator.cc:167] Engine MOBILE is not available for operator AveragePool.

... (About 20 such warnings in total, with some repetitions)
```

And finally while trying to run the forward pass the script threw an error with the message 

```
    p.run([data])
RuntimeError: [enforce fail at stylizer_ops.cc:101] C == kInputChannels.  Error from operator: 
input: "data_int8_bgra" input: "mean" output: "b0" name: "" type: "PackedInt8BGRANHWCToNCHWCStylizerPreprocess" arg { name: "noise_std" f: 5 } device_option { device_type: 0 random_seed: 0 } engine: "MOBILE"

```
I'm not too sure how to interpret this error, all I could guess is that the shape of the input sample is wrong but I tried 224px to 270px (incase the image scale was off)
Repository: rust
Issue: HRTB-like bounds on structs
Labels: T-lang,C-feature-request,A-higher-ranked

So I have a situation, detailed in u.r.l.o [here](https://users.rust-lang.org/t/expressing-hrtb-like-bound-on-generic-struct/18081), that I'd be curious to see if there's a good solution for now or if anything in the pipeline might help.  It's likely a dupe of some existing issue(s) but I failed to find anything similar enough.

I'll repeat my u.r.l.o. post below to save you the redirects.

---
Suppose you have a `Writer<T>` struct as follows:
```rust
struct Writer<T> {
    m: std::marker::PhantomData<fn(&T)>,
}

impl<T> Writer<T> {
    fn write(&mut self, val: &T) {} // somehow knows what to do - that's not important
}
```
The `Writer` is generic only to associate the T with the method parameter in write() - it otherwise doesn’t store or use the T.

Next, you have a struct like this:
```rust
struct Record<'a> {
    x: &'a i32,
}
```
And now you want to have a Logger struct as follows:

```rust
// Don't want a lifetime parameter on `Logger`
struct Logger {
    rec_writer: Writer<Record<'static>>, // it's not really 'static
}

impl Logger {
    fn write_record(&mut self) {
        let x = 5;
        let rec = Record {x: &x};
        let rec: Record<'static> = unsafe {
            std::mem::transmute(rec)
        };
        self.rec_writer.write(&rec);
    }
}
```
So here I’m transmuting to 'static to satisfy the type system, and I know that rec_writer.write(...) will not attempt to stash any values out of Record on the premise that they’re 'static (which they’re not). Ideally, what I’d like to express is:

```rust
struct Logger {
    rec_writer: for<'a> Writer<Record<'a>>,
}
```
which of course is invalid since HRTB only works on traits.

Is there a clean way to achieve this? Am I forgetting something? I can probably redesign the code to not be structured like this, but I’m curious if this is feasible as-is.

---

I don't think generic associated types (GAT) would help, and I suspect the issue borders more on HKT but I'm unsure.

Would appreciate some insight/guidance from people in the know :).
Repository: pytorch
Issue: Q: how to generate my own pb files to C++ Predictor
Labels: caffe2

Now I had trained a model used python interface. and now I wanna to save the trained paramters and the net model to pb file format which can be loaded by `ReadProtoFromFile`  later used C++ interface.
But I cannot find out how to generate the two file(init_net.pb & predict_net.pbtxt)。
Can someone tell me, thanks very much.
Repository: youtube-dl
Issue: [Site support request] nudogram.com
Labels: site-support-request

```
$ youtube-dl -v http://www.nudogram.com/videos/94/allison-parker-squirt-show-snapchat-2018/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.nudogram.com/videos/94/allison-parker-squirt-show-snapchat-2018/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.06.14
[debug] Git HEAD: 9b0b62753
[debug] Python version 3.6.5 (CPython) - Linux-4.16.12-1-hardened-x86_64-with-arch
[debug] exe versions: ffmpeg 4.0, ffprobe 4.0, rtmpdump 2.4
[debug] Proxy map: {}
[generic] allison-parker-squirt-show-snapchat-2018: Requesting header
WARNING: Falling back on generic information extractor.
[generic] allison-parker-squirt-show-snapchat-2018: Downloading webpage
[generic] allison-parker-squirt-show-snapchat-2018: Extracting information
ERROR: Unsupported URL: http://www.nudogram.com/videos/94/allison-parker-squirt-show-snapchat-2018/
Traceback (most recent call last):
  File "/home/lee/Projects/youtube-dl/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/home/lee/Projects/youtube-dl/youtube_dl/extractor/common.py", line 500, in extract
    ie_result = self._real_extract(url)
  File "/home/lee/Projects/youtube-dl/youtube_dl/extractor/generic.py", line 3263, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.nudogram.com/videos/94/allison-parker-squirt-show-snapchat-2018/
```

- Single video: http://www.nudogram.com/videos/94/allison-parker-squirt-show-snapchat-2018/
- Single video: http://www.nudogram.com/videos/240/allison-parker-roleplay-snapchat-01-18-2018/
- Single video: http://www.nudogram.com/videos/598/megan-barton-hanson-photoshoot/
- Single video: http://www.nudogram.com/videos/585/tove-lo-topless-on-stage-in-sydney-2017/
Repository: vscode
Issue: Ignore `editor.insertSpaces` within strings
Labels: feature-request,editor-core

<!-- Please search existing issues to avoid creating duplicates. -->
Related issues
==============

After searching existing issues, I found two open issues, which are closely related, but different. Including links for reference purposes:

- #5394
- #46287

<!-- Describe the feature you'd like. -->

Feature request
===============

Tabs have three uses in code files:

1. Indentation at the beginning of lines - people often prefer to use spaces here
2. Indentation between keys and values or around assignment operators - people often prefer to use spaces here
3. When a literal tab character is required within a string - this should *always* be a tab and never converted to spaces.

Currently, the 3rd use-case is difficult/impossible to handle easily in VSCode when `editor.insertSpaces` is set to `true`.

The most common place I've encountered this is for RegEx strings in BSD `sed`, which does not support GNU's non-standard `\t` notation for tabs.
Repository: pytorch
Issue: [caffe2] [feature request]Doese caffe2 support conv_nd with group?
Labels: caffe2

## Issue description
When I try to set the group parameter(larger than 1) for model.ConvNd, there is cudnn error.

Provide a short description.
Code:
'''
        self.prev_blob = self.model.ConvNd(
            self.prev_blob,
            'test_group_conv_%d' % (self.comp_count),
            in_filters,
            out_filters,
            kernels,
            weight_init=("MSRAFill", {}),
            strides=strides,
            pads=pads,
            no_bias=self.no_bias,
            group=group,
        )
'''


The error is:
'''
RuntimeError: [enforce fail at conv_op_cudnn.cc:616] status == CUDNN_STATUS_SUCCESS. 3 vs 0. , Error at: /home/hf17/pytorch/caffe2/operators/conv_op_cudnn.cc:616: CUDNN_STATUS_BAD_PARAM Error from operator: 
'''

- PyTorch or Caffe2: Caffe2
- How you installed PyTorch (conda, pip, source):conda
- Build command you used (if compiling from source):
- OS:
- PyTorch version:
- Python version:
- CUDA/cuDNN version: 7.0.5
- GPU models and configuration: TITANX (Pascal)
- GCC version (if compiling from source):
- CMake version:
- Versions of any other relevant libraries:
Repository: pytorch
Issue: caffe2: Does caffe support the model running on different device (CPU and GPU) same time ?
Labels: caffe2

     I want to know whether caffe2 support building the model on different device (CPU and GPU) at the same time. 
     Precisely, I want to setting part1(include some operators) of the network model running on CPU,  while part2 (others) just on GPU, just like the TF. 
     If so, how can I make it ? I used to run model by the way " workspace.RunNet(model.net)"....
Repository: TypeScript
Issue: Import assignment should work with esnext targets
Labels: Needs Proposal

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms


import assignment

## Suggestion

#22321 was closed by a bot that thought the issue was addressed, but it wasn't.

Import assignment should work with esnext targets

## Use Cases

JS modules loaders for Node might not support importing CJS with `import` statements, so you would use `require` to import them. But we'd still like to bring in their types. This is what import assignment is designed for, it's just disallowed with esnext targets.


## Examples

This:
```ts
import * as m from './a-module.js';
import cjs = require('some-cjs');
```

should emit:
```ts
import * as m from './a-module.js';
const cjs = require('some-cjs');
```

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: opencv
Issue: Stitching enhencements for multithreading calibrated stitcher
Labels: feature,priority: low,category: stitching

It would be nice to have the possibility to use composePanorama function of stitcher class on several thread once it is calibrated using either estimateTransform or stitch. For this can you either make the method thread safe. OR give the possibility to clone a calibrated stitcher in order to use it on a different thread.

##### System information (version)
- OpenCV => 3.4.1 but can move to 4.0
- Operating System / Platform => Windows 10 64 Bit
- Compiler => Visual Studio 2015
##### Detailed description

Add the possibility to clone a calibrated stitcher.

Thanks
Repository: TypeScript
Issue: Duplicated jsdoc should error
Labels: Suggestion,In Discussion,checkJs,Domain: JavaScript

It's possible to document parameters and function expressions 2-3 different places in JSDoc. However, I can't think of a good reason to do so, and I suspect that it's (1) rare (2) by mistake. Here's an example:

```ts
/** @param a - the a */
function f(/* an a */ a) {
}
```

Today gives the jsdoc

```
 an a
 - the a
```

But should give ` an a` and an error on `@param a`: "Duplicate jsdoc".

The problem is even worse in JS, where jsdoc provides types. Here, the innermost type annotation provides the type and the rest are ignored. This should *definitely* be an error:

```js
/** @param {string} a */
function f(/* @type {number} */ a) {
}
```

This example should have an error on `@param a`: "Duplicate jsdoc"

Thanks to @bterlson for this idea.
Repository: godot
Issue: Forwarding Signals in C# - not passing arguments as expected
Labels: enhancement,confirmed,topic:dotnet

**Godot version:** 
v3.0.3-stable_mono



**OS/device including version:** 
Windows 10



**Issue description:**
I have two signals:

- Signal1
- Signal2

I'm attempting to connect Signal1 to Signal2 so that when Signal1 is emitted Signal2 is emitted as well. I have a wrapper object that handles this for me so that I don't have to create a dummy method for every signal I would like to forward. Everything works up until Signal2 emits. Signal2 isn't receiving the arguments emitted from Signal1. I've implemented this concept in GDScript and it works without issue.

Here is a gist for a quick look at what I am doing: https://gist.github.com/dylmeadows/c45cb464b4cb3f0185e69f1e579aeae7

Here is a corresponding gist for the GDScript implementation:
https://gist.github.com/dylmeadows/e3d5433e2c7c24aa23d744e4a8139a2b



**Minimal reproduction project:**
[SignalForwarding-C#.zip](https://github.com/godotengine/godot/files/2107109/SignalForwarding-C.zip)
[SignalForwarding-GDScript.zip](https://github.com/godotengine/godot/files/2107110/SignalForwarding-GDScript.zip)



**Expected Outcome**
```
SignalForwarding::_Ready()
SignalObject::Connect(target=Main, methodName=DoSomething)
SignalObject::Forward(signal=SignalObject[Owner=Main,SignalName=Signal2])
SignalObject::Emit(args=[Hello World])
SignalObject::Emit(args=[Hello World])
SignalForwarding::DoSomething(s=Hello World)
```

**Actual Outcome**

```
SignalForwarding::_Ready()
SignalObject::Connect(target=Main, methodName=DoSomething)
SignalObject::Forward(signal=SignalObject[Owner=Main,SignalName=Signal2])
SignalObject::Emit(args=[Hello World])
SignalObject::Emit(args=[])
```
Repository: pytorch
Issue: cleanup BLAS detection
Labels: module: build,triaged,module: linear algebra

PyTorch and Caffe2 use the following libraries as preferred for BLAS/LAPACK capabilities:

- MKL - first preference in unified build system
- Eigen - 2nd preference in unified build system, but first preference if ATen is not being compiled

- PyTorch finds OpenBLAS, Accelerate, cblas if MKL is not found -- finding OpenBLAS is useful for PPC64
- I have to explore what Caffe2 does if Eigen is not found

There are however additional subtelities.
MKL and Eigen are not used JUST for BLAS/LAPACK, but also for additional functionality:
-  MKL for FFT, VML in pytorch
- Eigen for [implementing caffe2 operators](https://github.com/pytorch/pytorch/search?q=eigen&unscoped_q=eigen)

Additionally, we also use fortran-blas interface in pytorch, cblas interface in Caffe2 (if not Eigen), and eigen::MatrixMap interface if Eigen is found and `CAFFE2_USE_EIGEN_FOR_BLAS` is set.

Cleanup plan:
- separate what it means to detect MKL / Eigen from what it means to detect BLAS capabilities
  - Find MKL at a single entry point across PyTorch, Caffe2, and if it's found, set a USE_BLAS="mkl" with BLAS_INCLUDE and BLAS_LIBRARIES variables set to MKL paths. This is in addition to setting MKL_FOUND
  - [Should we] Find Eigen by default (unless USE_EIGEN=OFF (which we can set via setup.py) and use it for everything (building caffe2 operators etc.) except BLAS (i.e. only not set CAFFE2_USE_EIGEN_FOR_BLAS). If MKL was not found, use Eigen for BLAS as well cc: @Yangqing for guidance.
  - On PPC64 and OSX, should we prefer OpenBLAS and Accelerate respectively (instead of Eigen) for the BLAS capabilities? cc: @Yangqing 


cc @malfet @seemethere @walterddr @jianyuh @nikitaved @pearu @mruberry @heitorschueroff
Repository: node
Issue: Inconsistent behavior of path.basename(path, ext)
Labels: help wanted,discuss,path

I believe this was introduced somewhere in https://github.com/nodejs/node/pull/5123, which changed the behavior of the `ext` argument.

This is observed on all supported branches and was even recently backported to 4.x.

Documentation:
https://nodejs.org/api/path.html#path_path_basename_path_ext

Observe the input and try to predict the output:
```console
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x))
[ 'a', 'a', 'a' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'b'))
[ 'a', 'a', 'a' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'a'))
[ '', 'a', 'a' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'a/'))
[ 'a', '', 'a' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'a//'))
[ 'a', 'a', '' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'aa'))
[ 'a', 'a/', 'a//' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'bb'))
[ 'a', 'a', 'a' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'aaa'))
[ 'a', 'a', 'a//' ]
> ['a', 'a/', 'a//'].map(x => path.posix.basename(x,'aaaa'))
[ 'a', 'a', 'a' ]
> ['dd', '/dd', 'd/dd', 'd/dd/'].map(x => path.posix.basename(x))
[ 'dd', 'dd', 'dd', 'dd' ]
> ['dd', '/dd', 'd/dd', 'd/dd/'].map(x => path.posix.basename(x, 'd'))
[ 'd', 'd', 'd', 'd' ]
> ['dd', '/dd', 'd/dd', 'd/dd/'].map(x => path.posix.basename(x, 'dd'))
[ '', 'dd', 'dd', 'dd' ]
> ['dd', '/dd', 'd/dd', 'd/dd/'].map(x => path.posix.basename(x, 'ddd'))
[ 'dd', 'dd', 'dd', 'dd/' ]
```

There are more, but all the inconsistencies with the previous behavior involve at least one of those:
1. Either the `path` ends with `/`,
2. Or `ext` includes `/`,
3. Or `ext` equals to the actual resolved basename (i.e. `path.endsWith('/' + ext)`).

More specifically, the following check _covers_ all the cases inconsistent behavior to my knowledge:
`path.endsWith('/') || ext.includes('/') || path.endsWith('/' + ext)`
(note that it also includes cases of consistent behavior).

---

Reminder: before #5123, this was how `ext` behave:
```js
if (ext && f.substr(-1 * ext.length) === ext) {
    f = f.substr(0, f.length - ext.length);
}
```
I.e. it just sliced off the suffix (**after** doing everything else).
Repository: TypeScript
Issue: Add related error spans for getter/setters with different types
Labels: Suggestion,Domain: Error Messages,Domain: Related Error Spans,Experience Enhancement

Now that we support multiple related spans for errors (#10489, #22789, #24548), we'd like to improve an existing error message.

Currently, we provide a diagnostic for a pair of `get`/`set` accessor's types not matching:

Code:

```ts
let x = {
  get foo() { return 100; }
  set foo(value: string): { }
}
```

Current error:

```
'get' and 'set' accessor must have the same type.
```

We'd like to give a better error message. For example:

Primary span:

```
A 'get-' and 'set-' accessor must have the same type, but this 'get' accessor has the type '{0}'.
```

Related span:

```
The respective 'set' accessor has the type '{0}'.
```
Repository: go
Issue: cmd/compile: possible missed optimization in append benchmark
Labels: Performance,NeedsInvestigation,compiler/runtime

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?

go version go1.10.3 linux/amd64

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

GOARCH="amd64"
GOBIN="/home/manlio/.local/bin"
GOCACHE="/home/manlio/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/manlio/.local/lib/go:/home/manlio/code/src/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build931873105=/tmp/go-build -gno-record-gcc-switches"

### What did you do?

I wrote a simple benchmark to check the performance of *append* versus *copy*.
The benchmark is here:
https://play.golang.org/p/jA7Fb0oON6Z

The benchmark result is:
```
Benchmark_Append-4   	30000000	        43.1 ns/op	       0 B/op	       0 allocs/op
Benchmark_Copy-4     	30000000	        43.0 ns/op	       0 B/op	       0 allocs/op
```

The unexpected result is when *bug* is set to true.  In this case the benchmarks results are:
```
Benchmark_Append-4   	30000000	        37.2 ns/op	       0 B/op	       0 allocs/op
Benchmark_Copy-4     	30000000	        43.2 ns/op	       0 B/op	       0 allocs/op
```

The same result is produced when I change *bug* from a const to a var, even if it is set to *false*.

When I set *GOARCH=386* with *bug=true*, the benchmark result is:
```
Benchmark_Append-4   	20000000	        63.5 ns/op	       0 B/op	       0 allocs/op
Benchmark_Copy-4     	20000000	        59.6 ns/op	       0 B/op	       0 allocs/op
```

This seems to be an issue with the amd64 compiler.

This is the assembly listing when *bug* is false:
https://pastebin.com/kDVTypHF

and this is the assembly listing when *bug* is true
https://pastebin.com/VErtqZw6

This is the discussion of golang-nuts:
https://groups.google.com/forum/#!topic/golang-nuts/lJvBonZg62g

### What did you expect to see?

The benchmark result should be the same, with *bug* set to *false* or bug set to *true*.

### What did you see instead?

When *bug* is set to *true*, the *Append* benchmark is faster than the *Copy* benchmark.