sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: cv::ml::Boost->predict always returns 0/1 with RAW_OUTPUT
Labels: RFC

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
- OpenCV: 3.2
- Operating System: Windows 7


##### Detailed description
I expected the `boost->predict(sample, cv::noArray(), cv::ml::StatModel::RAW_OUTPUT)` to give me the sum value, instead it always is 0 or 1, regardless of Boost model setup.

In order to calculate an ROC curve of the classifier I need to be able to shift the sum towards the positive or negative side.

I think the [following line](https://github.com/opencv/opencv/blob/master/modules/ml/src/boost.cpp#L365) is the cause (`int ival = (int)(val > 0);`).

I managed to work around this issue by calculating the sum myself, based on the implementation of DTrees, but this will only work correctly for VAR_ORDERED variables.
```
	auto& nodes = boost->getNodes();
	auto& roots = boost->getRoots();
	auto& splits = boost->getSplits();

	double sum = 0.;
	for (auto& r : roots) {
		
		int nidx = r, prev = nidx, c = 0;
		while (true) {
			auto& n = nodes[r];
			prev = nidx;
			const cv::ml::DTrees::Node& node = nodes[nidx];
			if (node.split < 0)
				break;
			const cv::ml::DTrees::Split& split = splits[node.split];
			int vi = split.varIdx;
			float val = sample[vi];
			nidx = val <= split.c ? node.left : node.right;
		}
		sum += nodes[prev].value;
	}
```
As boost uses decision tree stumps I could probably simplify the workaround further

##### Steps to reproduce
Train any Boost model and evaluate with  `boost->predict(sample, cv::noArray(), cv::ml::StatModel::RAW_OUTPUT)`
Repository: opencv
Issue: Invalid bind texture error at runtime with CUDA OpenCV functions
Labels: bug,category: gpu/cuda (contrib)

##### System information
- OpenCV => 3.2
- Operating System / Platform => Ubuntu 64 Bit
- Compiler => g++, nvcc
- Cuda => 7.0

##### Description
When I try to call CUDA OpenCV functions, like cuda::remap, I get the following error:
OpenCV Error: Gpu API call (invalid texture reference) in bindTexture, file /home/username/laptop_setup/opencv-3.2.0/modules/core/include/opencv2/core/cuda/common.hpp, line 102
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/username/laptop_setup/opencv-3.2.0/modules/core/include/opencv2/core/cuda/common.hpp:102: error: (-217) invalid texture reference in function bindTexture

```.cpp
    cuda::remap(mat_gpu_left, d_left, map_gpu_left1, map_gpu_left2, INTER_LINEAR, BORDER_CONSTANT);
```

The same code I was using has run without errors on other machines.

This was also the case for other CUDA functions like cuda::multiply.
Repository: go
Issue: runtime/race: adding support for the race detector on other platforms
Labels: RaceDetector,help wanted,FeatureRequest,compiler/runtime

Hi Everyone,

Following on from [this](https://groups.google.com/forum/#!topic/golang-nuts/5B4cXnaWcn8) discussion on the golang-nuts list, about supporting the race detector on ARM hardware, I'm opening this issue to track the suggestion.

The ThreadSanitizer that the Go race detector is based on supports x86_64, aarch64 (i.e.Arm8 64-bit), mips64 and powerpc64. Currently Go only supports the race detector on x86_64 hardware.

Would it be possible for a future release of Go to support the race detector on the other platforms - aarch64, mips64 and powerpc64.

Thanks

Owen
Repository: opencv
Issue: [wishlist, feature, improvement] Doxygen documentation
Labels: wontfix,category: documentation,incomplete

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 3.2
- Operating System / Platform => N/A
- Compiler => N/A

##### Detailed description

Going through the Doxygen documentation, I noticed the following:
- some folders / files have camel case, others have snake case
- '@subsection' does not follow the convention of folder being in the same view 

##### Suggested feature

Starting of page contains sentences copied from previous content list. These should be extended from a main view, as this would help the contributor make changes in one place.
<!-- your description -->

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->

N/A
Repository: youtube-dl
Issue: Add support for toei-animation.com
Labels: site-support-request

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.24.1**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Site support request (request for adding support for a new site)

### Description of your *issue*, suggested solution and other information
Please add support for toei-animation.com. Example URL: http://www.toei-animation.com/en/catalog/master_hamsters
Repository: pytorch
Issue: BCELoss doesn't accept LongTensor targets
Labels: feature,module: loss,triaged,Stale

Unlike NLLLoss, BCELoss doesn't accept LongTensor targets

(Reported by Marc'Aurelio)
Repository: go
Issue: plugin: add Windows support
Labels: OS-Windows,NeedsInvestigation,FeatureRequest,compiler/runtime

hi
Plugin Pkg Work for Windows!?
i want use this for mac,linux,win,... os.
when(what time) fix this?

https://golang.org/pkg/plugin/
Repository: TypeScript
Issue: Is there a way to use TypeScript to prevent accidental global access?
Labels: Suggestion,Needs Proposal

I just spent 2 hours tracking down this issue:

- We have a class with a prototype method called `focus()`
- Our code was calling `focus()`, but it should have been calling `this.focus()`
- The code compiled fine, because `window.focus()` shares the same signature as our `focus()` method

Is there a way to throw a compile time error when implicitly accessing global methods (on `window`, `global`, etc.)?

If not, a compiler flag would be extremely helpful. I would happily be more explicit about commonly used globals (`window.setTimeout`, `window.document`, ...) if it meant I could more easily catch insidious bugs like this one.

Full commit here: https://github.com/coatue/SlickGrid/commit/0f8bab3fa9968173d749ccdf535c88f3a526ca8b.
Repository: opencv
Issue: buildOpticalFlowPyramid + calcOpticalFlowPyrLK + cloned pyramids
Labels: priority: normal,category: video,RFC

System Info: OpenCV 3.2.0, Win10 x64, VS2015

I am computing pyramids using `cv::buildOpticalFlowPyramid` and passing the result to `cv::calcOpticalFlowPyrLK`. This works only if the pyramids are passed as is (being a submatrix from the original images, i.e shared data with ROI). If we make a deep copy of the pyramids, we get an error from `calcOpticalFlowPyrLK`:

```
OpenCV Error: Assertion failed
(ofs.x >= winSize.width && ofs.y >= winSize.height && ofs.x + prevPyr[lvlStep1].cols + winSize.width <= fullSize.width && ofs.y + prevPyr[lvlStep1].rows + winSize.height <= fullSize.height)
in cv::`anonymous-namespace'::SparsePyrLKOpticalFlowImpl::calc,
file C:\dev\opencv\sources\modules\video\src\lkpyramid.cpp, line 1294
```

Looking at the [source](https://github.com/opencv/opencv/blob/master/modules/video/src/lkpyramid.cpp), there are two places that call `locateROI` expecting the pyramids to be submatrices:

- modules/video/src/lkpyramid.cpp#L1286
- modules/video/src/lkpyramid.cpp#L1314

```cpp
         // ensure that pyramid has reqired padding 
         if(levels1 > 0) 
         { 
             Size fullSize; 
             Point ofs; 
             prevPyr[lvlStep1].locateROI(fullSize, ofs); 
             CV_Assert(ofs.x >= winSize.width && ofs.y >= winSize.height 
                 && ofs.x + prevPyr[lvlStep1].cols + winSize.width <= fullSize.width 
                 && ofs.y + prevPyr[lvlStep1].rows + winSize.height <= fullSize.height); 
         } 
```

Perhaps there should be a check first to see if the pyramids indeed are submatrices, before doing the CV_ASSERT.

---

Here is a minimal C++ example that shows the problem (compile with and without the `TRIGGER_BUG` define):

```cpp
#include "opencv2/opencv.hpp"
#include <iostream>
#include <vector>
using namespace std;
using namespace cv;

// triggers assertion failed in cv::calcOpticalFlowPyrLK
#define TRIGGER_BUG 1

int main()
{
  // pair of images and source points
  vector<Point2f> prevPts, nextPts;
  Mat prevImg = imread("RubberWhale1.png", IMREAD_GRAYSCALE);
  Mat nextImg = imread("RubberWhale2.png", IMREAD_GRAYSCALE);
  goodFeaturesToTrack(prevImg, prevPts, 100, 0.01, 2.0);

  // pyramids
  vector<Mat> prevPyr, nextPyr;
  Size winSize(21,21);
  int maxLevel = 3;
  buildOpticalFlowPyramid(prevImg, prevPyr, winSize, maxLevel, true);
  buildOpticalFlowPyramid(nextImg, nextPyr, winSize, maxLevel, true);

  // clone pyramids (no ROIs)
  vector<Mat> p1, p2;
  for (int i=0; i<prevPyr.size(); ++i) {
#ifdef TRIGGER_BUG
    p1.push_back(prevPyr[i].clone());
    p2.push_back(nextPyr[i].clone());
#else
    p1.push_back(prevPyr[i]);
    p2.push_back(nextPyr[i]);
#endif
  }
  
  // compute sparse flow
  Mat status;
  calcOpticalFlowPyrLK(p1, p2, prevPts, nextPts, status, noArray(), winSize, maxLevel);
  cout << nextPts.size() << " points" << endl;

  return 0;
}
```
Repository: youtube-dl
Issue: Add support for authentication http://www.gracieuniversity.com/
Labels: site-support-request,account-needed

$ youtube-dl --verbose -u PRIVATE -p PRIVATE http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=dkG2PaKrWHkbW%2bHxxa7%2bXA%3d%3d
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=dkG2PaKrWHkbW%2bHxxa7%2bXA%3d%3d']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.24.1
[debug] Python version 2.7.6 - Linux-3.19.0-32-generic-x86_64-with-LinuxMint-17.3-rosa
[debug] exe versions: avconv 9.20-6, avprobe 9.20-6
[debug] Proxy map: {}
[generic] FVLessonPlayer: Requesting header
WARNING: Could not send HEAD request to http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=dkG2PaKrWHkbW%2bHxxa7%2bXA%3d%3d: <urlopen error [Errno -2] Name or service not known>
[generic] FVLessonPlayer: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno -2] Name or service not known> (caused by URLError(gaierror(-2, 'Name or service not known'),))
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 496, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2093, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 918, in http_open
    req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
---

Hi, I'm downloaded the first video in the page, that's http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=%2fd2ro7h1eDQMt9mN44fjzA%3d%3d
even without provide a user and password.
Repository: opencv
Issue: Aruco samples won't build with apparently correct minimum module configuration
Labels: bug,category: build/install


##### System information (version)
- OpenCV => 3.2
- Operating System / Platform => Ubuntu 16.01
- Compiler => g++-5

##### Detailed description
CMakeLists.txt for aruco lists  the modules needed for the aruco libraries. But the aruco samples will not build with just these modules. They also require videoio. As a result, a minimum system build to support aruco will not build the samples. Not precisely a bug - but there is no straightforward way of discovering this other than trial and error and review of the samples source. Easy to imagine this being true in other modules as well. Perhaps CMakeLists.txt for the samples?
<!-- your description -->

##### Steps to reproduce
Configure opencv build to include opencv_contrib/modules. Require only minimum modules needed for aruco as discovered by inspecting relevant CMakeLists.txt files - aruco core highgui imgproc img_codecs calib3d features2d flann ml.
Set BUILD_EXAMPLES on.
Build. Check build/bin directory - no samples built.
Re-configure, adding only videio. Build again. Samples now present in build/bin.
Repository: rust
Issue: Braced macros are inconsistent with other braced items
Labels: A-macros,T-compiler,C-bug

Consider the following macro:

```rust
macro_rules! test {
    () => ( "hello" )
}
```

The following function compiles as expected if the macro is invoked with parenthesis:

```rust
fn string_len() -> usize {
    test!().len()
}
```

However, if I invoke the macro with curly braces instead, Rust emits an error:

```rust
fn string_len() -> usize {
    test!{ }.len()
}

rustc 1.15.1 (021bd294c 2017-02-08)
error: expected expression, found `.`
 --> <anon>:2:13
  |
2 |     test!{ }.len()
  |             ^
```

From discussions with @eddyb, this occurs because the macro is being treated as expanding into a statement as opposed to an expression. This is inconsistent with how other curly-braced constructs are treated. For instance, the following functions as expected:

```rust
fn string_len() -> usize {
    { "hello" }.len()
}
```

It seems that the expansion site is not correctly being identified as an expression or statement. In this case, the `.` suffix to the macro invocation clearly determines that the macro should expand to an expression.
Repository: youtube-dl
Issue: Split `README.md` into smaller files
Labels: request,documentation

The `README.md` is really long. Considering that it loads every time someone goes to the main page, wouldn't it be better to keep some of it (e.g., the FAQ) in separate files?
Repository: rust
Issue: Tracking issue for future-incompatibility lint `missing_fragment_specifier`
Labels: A-lints,A-parser,A-macros,T-compiler,C-future-incompatibility,C-tracking-issue

This is the summary issue for the `missing_fragment_specifier` future-compatibility warning and other related errors. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made.

#### What is the warning for?

The `missing_fragment_specifier` warning is issued when an unused pattern in a `macro_rules!` macro definition has a meta-variable (e.g. `$e`) that is not followed by a fragment specifier (e.g. `:expr`).

This warning can always be fixed by removing the unused pattern in the `macro_rules!` macro definition.

#### When will this warning become a hard error?

At the beginning of each 6-week release cycle, the Rust compiler team will review the set of outstanding future compatibility warnings and nominate some of them for Final Comment Period. Toward the end of the cycle, we will review any comments and make a final determination whether to convert the warning into a hard error or remove it entirely.

#### Current status

* https://github.com/rust-lang/rust/pull/39419
  * Introduces the `missing_fragment_specifier` lint as warn-by-default
* https://github.com/rust-lang/rust/pull/42894
  * Makes the `missing_fragment_specifier` lint deny-by-default
* #75516
  * Makes the `missing_fragment_specifier` lint a hard error
* #80210
  * Turns the hard error back to a deny-by-default lint due to too much breakage
Repository: kubernetes
Issue: No way to configure ExternalIP addresses for a node with kubelet
Labels: priority/backlog,sig/network,area/kubelet,sig/node,kind/feature,lifecycle/frozen,needs-triage

Kubelet currently will update the node addresses in the status, meaning it cannot be edited manually / with a controller.

However, there is also no way to tell kubelet to register anything other than a single `--node-ip` address flag, which gets registered as `NodeLegacyHostIP` and `NodeInternalIP`.

We should allow arbitrary addresses to be specified on the kubelet command line, if kubelet is going to prevent them being updated externally.
Repository: neovim
Issue: plugin: --startuptime statistics and visualization
Labels: enhancement,plugin

I think it would be really great if something like timecop could be added directly into Neovim. For many users, using Neovim is all about performance. With the `--startuptime` option already there, I think all that's missing is some kind of cli visualization and statistic. It would be great to have it show on `:timecop`.

I think just dumping a file and then leaving the user to "visualize it however you want" isn't a great user experience.
Repository: youtube-dl
Issue: Utime failing worryingly often
Labels: cant-reproduce,incomplete

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.24.1**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)

---

Last night I let my phone download a list of songs in a JSON file, formatted as 

```python
{
    "playlist_name": [
        "url_1",
        "url_2",
        ...
    ],
    ...
}
```

Today when I woke up, it was done, but a lot of songs had no duration. The code I used is as follows:

```python
import json
import youtube_dl as ytdl

data = json.load(open("playlists.json"))

my_options = {
    'format': 'bestaudio/best',
    'noplaylist': True,
    'audioformat': 'flac', 
    'quiet':True, 
    'outtmpl': 'songs/{playlist}/%(title)s.flac'
}

for playlist, songs in data.items():
    opts = my_options.copy()
    opts['outtmpl'] = opts['outtmpl'].format(playlist=playlist)
    for song in playlist:
        with ytdl.YoutubeDL(opts) as ydl:
            try:
                ydl.download([song])  # Download all separately in case of errors
            except ytdl.DownloadError:
                pass
```

It downloads most songs just fine, with only a few failing due to copyright restrictions and similar.
However, a lot of them seem to say `WARNING: Cannot update utime of file`.
It seems to me that exactly those files have a duration of zero, and from all 7035 files downloaded this has affected about 3000.

Any idea why this has happened?
Repository: go
Issue: net/http: support content negotiation
Labels: help wanted,Proposal,Proposal-Accepted,NeedsFix

Content negotiation is, roughly, the process of figuring out what content type the response should take, based on an Accept header present in the request.

An example might be an image server that figures out which image format to send to the client, or an API that wants to return HTML to browsers but JSON to command line clients.

It's tricky to get right because the client may accept multiple content types, and the server may have multiple types available, and it can be difficult to match these correctly. I think this is a good fit for Go standard (or adjacent) libraries because:

- there's a formal specification for how it should behave: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
- it's annoying to implement yourself, correctly; you have to write a mini-parser.
- it would take one function to implement, which makes it annoying to import an entire third party library for (assuming you find the right one)

I've seen people hack around this in various ways: 
- checking whether the Accept header contains a certain string
- checking for the first matching value, 
- returning different content types based on the User-Agent
- requiring different URI's to get different content.

There's a sample implementation here with a pretty good API: https://godoc.org/github.com/golang/gddo/httputil#NegotiateContentType

```go
// NegotiateContentType returns the best offered content type for the request's
// Accept header. If two offers match with equal weight, then the more specific
// offer is preferred.  For example, text/* trumps */*. If two offers match
// with equal weight and specificity, then the offer earlier in the list is
// preferred. If no offers match, then defaultOffer is returned.
func NegotiateContentType(r *http.Request, offers []string, defaultOffer string) string
```

`offers` are content-types that the server can respond with, and can include wildcards like `text/*` or `*/*`. `defaultOffer` is the default content type, if nothing in `offers` matches. The returned value never has wildcards. 

So you'd call it with something like

```go
availableTypes := []string{"application/json", "text/plain", "text/html", "text/*"}
ctype: = NegotiateContentType(req, availableTypes, "application/json")
```

If the first value in `offers` is `text/*` and the client requests `text/plain`, NegotiateContentType will return `text/plain`. This is why you have to have a default - you can't just return the first value in `offers` because it might include a wildcard.

In terms of where it could live, I'm guessing that `net/http` is frozen at this point. Maybe one of the packages in `x/net` would be a good fit? There is also [a similar function for parsing Accept-Language headers in x/text/language](https://godoc.org/golang.org/x/text/language#ParseAcceptLanguage). Open to ideas.
Repository: opencv
Issue: Incorrect type traits for DMatch/Keypoint
Labels: bug,category: core

DMatch should not be represented as 4 * int, because it is <int, int, int, float>.
Keypoint should not be represented as 7 * float, because this structure contains integers. This problem is worse than with DMatch, because a subset of integer values can be interpreted/mapped as single NaN value.
Problem can be observed via FileStorage output.

Also default implementation of `DataType` type trait is broken and should not be used by default (it hides potential errors, like "uint" with size=8 bytes).

Related #7599
Repository: youtube-dl
Issue: I cannot download playlist of Tutsplus Tutorials 
Labels: site-support-request,account-needed

Why youtube-dl does not work in tutsplus for downloading the whole course. it just download the first video. I think it only grabs the preview video of any course and it does not go through the playlist