sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Generate the plugins .java/.h/.m files outside of user source directories
Labels: platform-android,tool,t: gradle,customer: crowd,t: xcode,dependency: android,P2,team-android,triaged-android

Let's move various codegen'ed outputs into the /build directory of the project instead of /android or /ios folders so that they're not user visible, or checked in-able, `flutter create`d, or in the example projects. 

This is mostly consistent with codegen'ed frameworks such as dagger to not let intermediate code be user visible but not meaningfully editable. 

cc @cbracken
Repository: vscode
Issue: [theming] Separate workbench theme and syntax theme
Labels: feature-request,themes

After upgrading to VS Code 1.12, I noticed that the workbench theme of the built-in **Monokai** color theme had been changed. However, I preferred the default workbench theme a lot.

But in VS Code, there are only two types of themes: **Color Theme** and **Icon Theme**, and the workbench theme is tightly coupled with the syntax theme in the Color Theme category.

In contrast, Sublime Text separates theme into `color_scheme` and `theme` in the preferences. For example, I can choose Material style for the workbench and Monokai for the syntax highlighting. Does the team have plan to separate them and let users have more flexibility to customize their editor?

By the way, I found that some of theme extensions use `.json` as their theme file (including the built-in [Monokai](https://github.com/Microsoft/vscode/blob/master/extensions/theme-monokai/themes/monokai-color-theme.json)), but the official documentation only mentions that we can use `yo code` to generate theme extension with an existing `.tmTheme` file. Is there any documentation for clarifying their difference and also the schema of the `.json` file?
Repository: pytorch
Issue: [feature request/proposal] Relax scale_factor for nearest neighbor upsampling
Labels: todo,feature,triaged

Much like #1257, I'd like to allow nearest neighbor upsampling to be non-uniform.  From what I can tell, this means going down into cuda/c level code.

It seems like [this](https://github.com/pytorch/pytorch/blob/master/torch/lib/THCUNN/generic/SpatialUpSamplingNearest.cu) is the relevant file, in particular lines [19-20](https://github.com/pytorch/pytorch/blob/master/torch/lib/THCUNN/generic/SpatialUpSamplingNearest.cu#L19-L20), [54-55](https://github.com/pytorch/pytorch/blob/master/torch/lib/THCUNN/generic/SpatialUpSamplingNearest.cu#L54-L55), and [](url) all use a single integer `scale_factor` parameter in simple ways, but also, [165-166](https://github.com/pytorch/pytorch/blob/master/torch/lib/THCUNN/generic/SpatialUpSamplingNearest.cu#L165-L166) is a cuda kernel call (I *think*).   The idea would be to change this to a pair of ints, and do the tuple casting up in the python layers.

@apaszke @soumith  any pointers about what I'd need to change or thoughts in general?  also pinging @lantiga, who's been working on another upsampling PR, and has done work at the cuda/c level.

FWIW and for anyone that finds this via search I'll point out that I've build a manual solution for my needs in a `forward()` call within my network.  Simply make a new `Variable` that's the size needed and manually fill the array with data from the smaller variable.
Repository: pytorch
Issue: Optimizer should track parameter names and not id
Labels: module: optimizer,triaged

In the optimizer's `param_groups['params']` the order of the parameters (in which they were given to the optimizer's init) matters. 
In load_state_dict the snippet shows this : 
```
id_map = {old_id: p for old_id, p in
  zip(chain(*(g['params'] for g in saved_groups)),
    chain(*(g['params'] for g in groups)))}

state = {id_map.get(k, k): v for k, v in state_dict['state'].items()}
```

If we change the order in which the parameters are given to the optimizer when loading, the code breaks as the `state` dict now incorrectly maps parameters to their states.

Consider model (when using, say, Adam optimizer)

```
class Model(nn.Module):
    def __init__(self):
    super(Model, self).__init__()
    self.p1 = nn.Linear(2,3, False)
    self.p2 = nn.Linear(3,4, False)
```
After saving, if the order in which the parameters are defined in the model changes i.e. if I change the class to have 
```
self.p2 = nn.Linear(3,4, False)
self.p1 = nn.Linear(2,3, False)
```
the loaded optimizer's state for p1 will be mapped to p2 and vice-versa. I tried this and this indeed happens which is wrong and now training cannot proceed (step() will, rightly so, give an error). 
The `nn.Module` class is robust to such behavior as it uses parameter names instead of id ordering.

IMO the optimizer should also use parameter names instead of ids and relying on the ordering in which they are supplied to the optimizer when initializing.

Corresponding [PyTorch-Discuss post](https://discuss.pytorch.org/t/possible-issues-in-optimizer/2685)

@soumith 

cc @vincentqb
Repository: realworld
Issue: Standardize README's for completed repos
Labels: Status: RFC,v2 changelog

For someone who is landing on an example repo and has no idea what RealWorld is, I'd imagine they'd be thinking "uh, wtf is this". For example, the backend codebases don't mention how to get an example frontend setup & running (much less where you can choose a frontend at all). This could easily be fixed with a standard "what is this"-esque section at the top of every README.

Further, would be great to have standard sections on common topics like "Installing Dependencies", "Running the Application", "Architecture Overview", etc that people will typically be looking for. Definitely a key improvement for the UX of perusing/exploring repo's.

Would love thoughts on this!
Repository: youtube-dl
Issue: SITE REQUEST: tv.m24.ru
Labels: site-support-request

Hello dear coders!
Now I want to ask you about adding support of tv.m24.ru into YDL.
The video streaming tech. is chunks based, i.e., the same as on russia.tv, vesti.ru, 1tv.ru.
Also this tv.m24.ru contains two resolutions' sets those user can choose.
Here is the log:
C:\>youtube-dl -F -v http://tv.m24.ru/videos/128227
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-F', '-v', 'http://tv.m24.ru/videos/128227']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.05.01
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 128227: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 128227: Downloading webpage
[generic] 128227: Extracting information
ERROR: Unsupported URL: http://tv.m24.ru/videos/128227
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp0io2aq9r\build\youtube_dl\YoutubeDL.py", line 760,in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp0io2aq9r\build\youtube_dl\extractor\common.py", line 429, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp0io2aq9r\build\youtube_dl\extractor\generic.py", line 2834, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: http://tv.m24.ru/videos/128227
Repository: opencv
Issue: Feature request: Support floating point image blending by FeatherBlender and MultiBandBlender
Labels: feature,category: stitching

##### System information (version)
- OpenCV => Latest from github
- Operating System / Platform => Ubuntu 16.04
- Compiler => GCC 5.4

##### Detailed description

Currently only 16 bit image (CV_16SC3) is supported by FeatherBlender and MultiBandBlender, is it possible add support for 32 bit floating point image (CV_32FC3) ?

``````
cv::Mat src = cv::Mat(h,w,CV_32FC3,cv::Scalar(0,0,0));
cv::Mat dst = cv::Mat(h,w,CV_32FC3,cv::Scalar(0,0,0));

cv::Mat src_valid = cv::Mat(h,w,CV_8UC1,cv::Scalar(255));
cv::Mat dst_valid = cv::Mat(h,w,CV_8UC1,cv::Scalar(255));

cv::detail::FeatherBlender featherblender(0.5f);

featherblender.prepare(cv::Rect(0, 0, w, h));
featherblender.feed(src, src_valid, cv::Point(0, 0));
featherblender.feed(dst, dst_valid, cv::Point(0, 0));

cv::Mat result;
cv::Mat result_mask;

featherblender.blend(result, result_mask);
``````

This returns error `OpenCV Error: Assertion failed (img.type() == CV_16SC3) in feed, file /home/hypevr/opencv/modules/stitching/src/blenders.cpp, line 151`, I had to convert it to 16 bit but there will be a lost of precision.
Repository: flutter
Issue: document flutter clause in build.gradle
Labels: tool,d: api docs,t: gradle,P2,team-tool,triaged-tool

In a newly-created Flutter directory, android/app/build.gradle contains this mysterious code snippet:

```
flutter {
    source '../..'
}
```

This seems to be implemented in flutter_tools/gradle/flutter.gradle. However, that file has few comments and none of them are high level.

It seems like we should add some high-level documentation explaining to users what this command does, so it's not just a mystery. Some JavaDoc in flutter.gradle would be useful too.
Repository: TypeScript
Issue: [Discussion] Better Way to Declare Globals in JavaScript files
Labels: Suggestion,Needs Proposal,VS Code Tracked,Domain: JavaScript

**Problem**
Using the new `checkJs` feature, it is currently difficult to tell TypeScript about a global variable:

```js
// @ts-check

myGlobal

window.myVar = 'foo';
```

<img width="458" alt="screen shot 2017-05-05 at 4 44 20 pm" src="https://cloud.githubusercontent.com/assets/12821956/25767871/268f4b00-31b2-11e7-988f-fe9f14165c60.png">


The only way around this that I know is to create a `.d.ts` file that defines these:

```ts
interface Window {
    myVar: string;
}

declare var myGlobal: string;
```

JavaScript users should not have to write `*.d.ts` files.

**Possible Approaches**
@egamma proposes that may be able to use the `global` comment from ESlint http://eslint.org/docs/user-guide/configuring : `/* global var1, var2 */`

I'd also be interested to see if we could put type information in a jsdoc somehow, something like:

```js
/**
 * @global {string} myGlobal 
 */
```
Repository: godot
Issue: Content margin of stylebox does not work with Popup
Labels: enhancement,discussion,confirmed,topic:gui

**Operating system or device - Godot version:**
all version of Godot

**Issue description:**
<!-- What happened, and what was expected. -->
Content margin value does not work with `Popup` and it's inherited `Control`s.
Would `Popup` be better inherited by `Container` instead of `Control`?
Repository: rust
Issue: Missed bound check removal
Labels: A-LLVM,I-slow,C-enhancement,A-codegen,T-compiler

A little test program:

```
#[inline(never)]
fn almost_product(nums: &[i32]) -> Vec<i32> {
    let mut result = vec![0; nums.len()];

    let mut prod = 1;
    for (i, &x) in nums.iter().enumerate() {
        result[i] = prod;
        prod *= x;
    }
    result
}

fn main() {
    let data = [1, 2, 3, 4, 11];
    println!("{:?}", almost_product(&data));
    let data = [1, 2, 3, 4, 11, 26, 54, 6];
    println!("{:?}", almost_product(&data));
}
```

If I compile it with:
`nightly-x86_64-pc-windows-gnu - rustc 1.19.0-nightly (f4209651e 2017-05-05)`

Using:
`rustc -C opt-level=3 --emit asm test1.rs`

I get this asm for the loop:

```
_ZN5test114almost_product17he2636a2faa7b0543E:
...
.LBB4_9:
    cmpq    %r12, %rdi
    jae .LBB4_10
    movl    (%r15,%rdi,4), %eax
    movl    %esi, (%rcx,%rdi,4)
    incq    %rdi
    imull   %esi, %eax
    addq    $-4, %rbx
    movl    %eax, %esi
    jne .LBB4_9
...
.LBB4_10:
    leaq    panic_bounds_check_loc.5(%rip), %rcx
    movq    %rdi, %rdx
    movq    %r12, %r8
    callq   _ZN4core9panicking18panic_bounds_check17h1fe2f83f670bcee9E
    ud2
```

The bound check isn't removed. To remove it I need to use get_unchecked_mut(), or code like this (with the same main function):

```
#![feature(core_intrinsics)]
use std::intrinsics::assume;

#[inline(never)]
fn almost_product(nums: &[i32]) -> Vec<i32> {
    let mut result = vec![0; nums.len()];

    let mut prod = 1;
    for (i, &x) in nums.iter().enumerate() {
        unsafe { assume(i < result.len()); }
        result[i] = prod;
        prod *= x;
    }
    result
}
```

Now the loop gives a clean asm:

```
.LBB3_11:
    movl    %edx, %esi
    movl    (%r12,%rcx,4), %edx
    imull   %esi, %edx
    movl    %esi, (%rax,%rcx,4)
    incq    %rcx
    addq    $-4, %rdi
    cmpq    %rcx, %rbx
    jne .LBB3_11
```

If I use:
`unsafe { *result.get_unchecked_mut(i) = prod; }`

The loop also gets unrolled four times:

```
.LBB3_15:
	movl	(%rcx), %esi
	imull	%edx, %esi
	movl	%edx, -12(%rbx)
	movl	4(%rcx), %edx
	imull	%esi, %edx
	movl	%esi, -8(%rbx)
	movl	8(%rcx), %esi
	imull	%edx, %esi
	movl	%edx, -4(%rbx)
	movl	12(%rcx), %edx
	imull	%esi, %edx
	movl	%esi, (%rbx)
	addq	$16, %rbx
	addq	$16, %rcx
	cmpq	%rdi, %rcx
	jne	.LBB3_15
```
Repository: vscode
Issue: [theming] Allow theming workbench fonts
Labels: feature-request,themes

Including

- Family
- Weight
- Style/Variant/Features
- Include typeface files in theme pack
- Per-language settings (to support fallbacks, cf. #5260)
Repository: vscode
Issue: [theming] Theming for workbench icons
Labels: feature-request,themes

Give one way to specify UI icons.
Repository: go
Issue: cmd/cgo: never generate Go fields for zero-sized C fields
Labels: NeedsFix,compiler/runtime

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
tested with 1.7.5 and 1.8.1

### What operating system and processor architecture are you using (`go env`)?
linux/amd64

### What did you do?
```go
package main

/*
struct foo {
	int x;
	char padding;
	char y[];
};
*/
import "C"
import "fmt"

var Y C.struct_foo

func main() {
	fmt.Println(Y.y)
}
```

### What did you expect to see?
Y.y undefined (type C.struct_foo has no field or method y)

(because Y.y is a zero-length field and Go code cannot refer to these fields)

### What did you see instead?
Compiles and prints:
```
[]
```
I've checked that it's dependent on memory alignment. If the `padding` field is removed from struct foo, generated cgo type doesn't have the `y` field. With the padding, the field is included.
Repository: pytorch
Issue: Cannot find Intel MKL
Labels: module: dependency bug,module: build,triaged,module: mkl

Attempting to compile pytorch from git, Intel MKL 2017 is not found unless I change in `torch/lib/TH/cmake/FindMKL.cmake`:

```
-  SET(mklvers "em64t")
+  SET(mklvers "intel64")
```
and define in the `build_all.sh` script in the cmake call `INTEL_MKL_DIR=$MKLROOT` and `CMAKE_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2017/linux/lib/intel64`.
Repository: godot
Issue: Light2D Mix/Mask mode issues with other lights
Labels: bug,topic:rendering,confirmed,topic:2d

Windows 10 x64 - Gtx 680 - GD v.3.0 x64

**Hello, Godot devs...**
I have come across a very make or break issue for me in Godot, and that is when I use a light2D with the blending mode Mix or Mask and if that light2D gets close to some or sometimes all of them, light2D's then it will randomly turn off / or get cut in half... Now if I re-open the scene all the lights who is in or close to the light2D with mix/mask mode will be randomly on or of. I've been experiencing this since 2.1.x and up to now on my main win 10 computer and on my win 10 x86 laptop in the editor or exported version of the project.

![adjustment layer_2](https://cloud.githubusercontent.com/assets/1938040/25806339/20c7ca1e-3403-11e7-80f9-dcaac3c7a312.gif)

**How I reproduce this:**
- Create at least one light2D with mask/mix mode
- Create some normal light2Ds with add mode
- Move around the light with mix mode over the other lights, if all is working as it shud try to re-open the level several times and that shud make some lights behave badly.

**Example project:**
https://www.dropbox.com/s/f0und6dkzzugxx2/Light2DModes_Project.zip?dl=0
[Light2DModes_Project.zip](https://github.com/godotengine/godot/files/989466/Light2DModes_Project.zip)
Repository: rust
Issue: “type must outlive the static lifetime” makes no sense
Labels: C-enhancement,A-diagnostics,T-compiler

For the following code

```
pub trait Arbitrary: Sized + 'static {}

impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
```

The diagnostic looks like this:

```
error[E0477]: the type `std::borrow::Cow<'a, A>` does not fulfill the required lifetime
 --> <anon>:3:20
  |
3 | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
  |                    ^^^^^^^^^
  |
  = note: type must outlive the static lifetime
```

The note here makes no sense, because the static lifetime is the longest lifetime of all and cannot really be outlived. We should reword the note so it doesn’t say “outlive”. 

Bonus points for explaining where the lifetime requirement comes from, because it is not entirely clear what here introduces the requirement, when the trait and implementation definitions aren’t so close together.
Repository: TypeScript
Issue: Noncrashing property access through non-null assertion operator should narrow that property to NonNullable
Labels: Bug,Help Wanted


**TypeScript Version:**  2.3 (Playground)

**Code**

Using `strictNullChecks`.

```ts
interface Foo {
    optional?: number;
}

interface Bar {
    foo?: Foo;
}

function test(bar: Bar) {
    if (bar.foo!.optional) {
        let num: number = bar.foo.optional;
    }

    if (bar.foo && bar.foo.optional) {
        let num: number = bar.foo.optional;
    }
}
```

**Expected behavior:**
No errors or warnings.

**Actual behavior:**
* `num` in first `if` block is `number | undefined`
* `bar.foo` in first `if` block can be `undefined`

![skarmavbild 2017-05-08 kl 12 58 06](https://cloud.githubusercontent.com/assets/1094822/25801641/cd4fbb08-33ee-11e7-8f7a-84ce4a5ea10d.png)
Repository: TypeScript
Issue: Object key signature is not taken into account with destructive assignment on method definition level
Labels: Bug

<!-- BUGS: Please use this template. -->

**TypeScript Version:**  2.3.2

**Code**
```ts
interface IMyInterface {
  onChange(changes : {[key : string] : {newValue : any, oldValue : any}})
}

class MyClass implements IMyInterface {
  onChange({config}) {
    console.log(config);
  }
}

class MyAnotherClass implements IMyInterface {
  onChange(changes) {
    const {config} = changes;

    console.log(config);
  }
}
```

**Expected behavior:**
compiled without errors

**Actual behavior:**
```
test.ts(5,7): error TS2420: Class 'MyClass' incorrectly implements interface 'IMyInterface'.
  Types of property 'onChange' are incompatible.
    Type '({config}: { config: any; }) => void' is not assignable to type '(changes: { [key: string]: { newValue: any; oldValue: any; }; }) => any'.
      Types of parameters '__0' and 'changes' are incompatible.
        Type '{ [key: string]: { newValue: any; oldValue: any; }; }' is not assignable to type '{ config: any; }'.
          Property 'config' is missing in type '{ [key: string]: { newValue: any; oldValue: any; }; }'.
```

**Note:** this affects Angular >1.5 users when writing component controllers and implementing `$onChanges` method
Repository: go
Issue: proposal: io/v2: add Context parameter to Reader, etc.
Labels: v2,Proposal

Related to #18507, it would be nice if the `io` interface methods all took in `Context` as their first parameter.  This allows a cancellation signal to be attached directly to the I/O calls that are using them, instead of requiring an out-of-band method, as in `net.Conn`.

This is obviously a backward-incompatible change and would have broad impact on the ecosystem.  I wanted to open this as a proposal for consideration in Go 2.

**EDIT:** See [below](https://github.com/golang/go/issues/20280#issuecomment-320712428) for the more backward-compatible proposal

**EDIT 2:** I've written an experience report/blog post detailing the background for this proposal: [Canceling I/O in Go Cap’n Proto](https://medium.com/@zombiezen/canceling-i-o-in-go-capn-proto-5ae8c09c5b29).  Feedback and alternatives welcome.
Repository: pytorch
Issue: [feature request] Support tensors of different sizes as batch elements in DataLoader
Labels: feature,module: dataloader,triaged,module: nestedtensor

Motivating example is returning bounding box annotation for images along with an image. An annotation list can contain variable number of boxes depending on an image, and padding them to a single length (and storing that length) may be nasty and unnecessarily complex.

```python
import torch.utils.data
loader = torch.utils.data.DataLoader(dataset = [(torch.zeros(3, 128, 128), torch.zeros(i, 4)) for i in range(1, 3)], batch_size = 2)
for batch in loader:
    print(batch)
```

Currently this blows with a message below because collate wants to `torch.stack` batch elements, regardless if they have same size:
```
File "...torch/utils/data/dataloader.py", line 188, in __next__
    batch = self.collate_fn([self.dataset[i] for i in indices])
  File ".../torch/utils/data/dataloader.py", line 110, in default_collate
    return [default_collate(samples) for samples in transposed]
  File ".../torch/utils/data/dataloader.py", line 92, in default_collate
    return torch.stack(batch, 0, out=out)
  File ".../torch/functional.py", line 56, in stack
    inputs = [t.unsqueeze(dim) for t in sequence]
RuntimeError: cannot unsqueeze empty tensor at .../torch/lib/TH/generic/THTensor.c:530
```

Returning a list instead of variable-sized tensor doesn't work either. Providing a custom collate isn't very nice either, since most of the default behavior needs to be copied, and the default collate doesn't allow hooks.

A solution would be either adding an easy way to extend the default collate, or changing the first collate's branch to something like:

```python
if all(map(torch.is_tensor, batch)) and any([tensor.size() != batch[0].size() for tensor in batch]):
     return batch
```

As a workaround, I'm currently monkey-patching the default collate like this:
```python
collate_old = torch.utils.data.dataloader.default_collate
torch.utils.data.dataloader.default_collate = lambda batch: batch if all(map(torch.is_tensor, batch)) and any([tensor.size() != batch[0].size() for tensor in batch]) else collate_old(batch)
```

cc @SsnL @VitalyFedyunin @ejguan @NivekT @cpuhrsch
Repository: flutter
Issue: Document why files are in the template
Labels: team,tool,d: examples,d: wiki,P2,team-tool,triaged-tool

Before we add more files to the template, I think we should make sure the template contains a README that documents, for each file in the template:

* What the file is for
* Why you would edit that file
* How to verify that the edits are valid
* How to test the file

The template is growing really big and it's not at all clear why some of these files are part of the user code and not just part of the framework.

We should also have a test that verifies that all files created by "flutter create" have an entry in this README file.