WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
by sam.falvo:

What does 'go version' print?
go version go1.2 darwin/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

0. export GOPATH=$(pwd)
1. go get github.com/mailgun/mailgun-go
2. (cd src/github.com/mailgun/mailgun-go && git checkout
create-acceptance-tests)
3. go fmt github.com/mailgun/mailgun-go/acceptance

What happened?
It prints:
"""
can't load package: package github.com/mailgun/mailgun-go/acceptance: no buildable Go
source files in /Users/sfalvo/go/mailgun-go/src/github.com/mailgun/mailgun-go/acceptance
"""

What should have happened instead?
It should have reformatted the sources, printing the list of filenames it affected;
otherwise, it should have just returned to the shell with no output, indicating no
changes have been made, just as it does for 'normal' sources.

Issue 2:
This issue serves as a catch-all for the currently known issues with go/types so that
they don't get forgotten.

Known bugs (in addition to already filed bugs):
- Corner-case legal recursive structs and interface types may not be accepted. The
type-checker must not rely on those types' structure before the types are completely
defined.

Missing features:
- Some built-ins don't check parameters fully, yet (e.g. append).
- Use of labels is only partially checked.
- Unused variables and imports are not reported.
- Interface vs non-interface comparisons are not correctly implemented.
- Switch statements don't check duplicate cases for all types for which it is required.
- Some built-ins may not be callable if in statement-context.
- The reported signature for builtin "expressions" should be a *Signature
specialized for the given arguments.

API:
- Type and Method factory functions need to revisited and all properly documented. There
is a balance between external need and desire to protect internal invariants in case of
API misuse.
- Decide if gcimporter should be in separate package.

Optimizations:
- Method sets should always compute the sets for both pointer and value receiver types
and cache them. Will avoid repeated and expensive method set computation.
- Method sets should be used for some of the assignment checks where
"implements" functionality is needed.

Cleanups:
- Type-checking of expressions should be cleaned up. There is duplication in the code
that can be avoided. See the relevant TODOs.
Issue 1:
System information (version)

OpenCV => 4.5.4

Language=> python/cpp

Operating System / Platform => Windows

Compiler => MSVC 19.32.31332.0

I am trying to replicate PIL and scikit-image nearest-neighbor o/p in OpenCV but getting INTER_NEAREST o/p.

Original image:

img

OpenCV INTER_NEAREST:

cv2.resize(x,(0,0),fx=0.5,fy=0.5,interpolation=cv2.INTER_NEAREST)

OpenCV INTER_NEAREST_EXACT:

cv2.resize(x,(0,0),fx=0.5,fy=0.5,interpolation=cv2.INTER_NEAREST)

PIL :

x1=Image.fromarray(img)
x1.thumbnail((256,256),Image.Resampling.NEAREST)

scikit-image :

rescale(x,0.5,order=0,preserve_range=True, anti_aliasing=False)

As it can be seen, OpenCV INTER_NEAREST and OpenCV INTER_NEAREST_EXACT are matching, which is not expected.

The expected was that the OpenCV INTER_NEAREST_EXACT should match PIL and scikit-image o/p, but I am getting this difference:

Issue submission checklist

I report the issue, it's not a question

I checked the problem with documentation, FAQ, open issues,

forum.opencv.org, Stack Overflow, etc and have not found any solution

I updated to the latest OpenCV version and the issue is still there

There is reproducer code and related data files: videos, images, onnx, etc

Issue 2:
System information (version)

OpenCV => 2.4.9

Operating System / Platform => Ubuntu 16.04

Compiler => gcc 5.4.0

Detailed description

Nearest neighbor interpolation using cv2.resize does not give expected results.

Steps to reproduce

import cv2
import numpy as np

a = np.array([[0, 1, 2, 3, 4]], dtype=np.uint8)
print 'nearest', cv2.resize(a, dsize=(3, 1), interpolation=cv2.INTER_NEAREST)

gives

nearest [[0 1 3]]

expected

nearest [[0 2 4]]
Issue 1:
As discussed in #42222, it is often useful to require a vararg to be non-empty. However, a generalization of that idea is that one often wants to dispatch on vararg where at least one of the vararg entries is a narrower type, in order to avoid type piracy. (See e.g. this example in ChainRulesCore, cc @oxinabox.)

For example, suppose that Base defines a function foo(x::Number...) = 1. Now, in my own package I want to define a more specialized version of foo when x... includes at least one element of MyNumber:

foo(x::Union{Number,MyNumber}...) = 2

Unfortunately, the second method is type piracy, and overrides the Base method in all cases.

If we had a syntax to declare that at least one of the arguments was a MyNumber, and corresponding support in the dispatch system, that would allow us to obtain the desired dispatch behavior.

Syntactically, my suggestion would be to define a new variant of Vararg{T,N}, e.g. VarargOne{T1, T, N}, to denote a tuple of N > 0 elements of type Union{T,T1}, at least one of which is of type T1. This would allow e.g.

foo(x::VarargOne{MyNumber,Number,N}) where {N} = 2

Issue 2:
Okay, so this is a bit of a weird feature request, but there are some circumstances, for example when writing a CAS, where you want to dispatch on whether some type T occurs anywhere in an args list. Currently, the only real way to do this is with a trait like mechanism, e.g.

struct T end
struct HasT end
struct DoesntHaveT end

has_T(::Tup) where {Tup <: Tuple} = T ∈ Tup.parameters ? HasT() : DoesntHaveT();

f(args...) = f(has_T(args), args...)
f(::HasT, args...) = 1;
f(::DoesntHaveT, args...) = 2;

julia> f(1, 2, 3, T(), 4)
1

julia> f(1, 2, 3, 4)
2

I think it would be quite useful if there was a built-in dispatch mechanism for this. Perhaps a syntax like

f(args::Tup) where {Tup <: Tuple, T ∈ Tup} = ...

or even

f(args_left..., ::T, args_right...) = ...

where args_right is allowed to have instances of T in it?

I get that this is probably too complicated and niche a thing to put in the dispatch system, but I figured I should bring it up in case anyone else and thoughts on this and I didn't see an issue for it.
Issue 1:
From dotnet/vscode-csharp#370 as part of @gregg-miskelly's request.

When you hover over a variable and expand some variables on debug mode, you see the text is not fitting the box:

VS Code Info:

Version 1.1.1
Commit def9e32467ad6e4f48787d38caf190acbfee5880
Date 2016-05-13T13:38:00.094Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0

dotnet CLI info:

.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e

Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
RID: ubuntu.14.04-x64

Issue 2:
If a data hover shows the attributes of an object, in many cases string attribute values are not completely visible because the data hover window is too narrow.

It would be great if the data hover could automatically try to fit all values.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Specifying label class should not cause warning:

Warning: Material-UI: the key `label` provided to the classes property is not implemented in Tab.
You can only override one of the following: root

Current Behavior

Warning above is shown in console

Steps to Reproduce (for bugs)

https://codesandbox.io/s/14k2jny23q

Context

Your Environment

Tech
Version

Material-UI
next

React
16.0.0

browser
chrome

etc

Issue 2:
[x ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Button should be styled according to override specified for it in createMuiTheme. As per example here https://material-ui.com/customization/themes/#customizing-all-instances-of-a-component-type

Current Behavior

Nothing changes, stays as it was

Steps to Reproduce (for bugs)

My implementation:

import React from "react";
import { MuiThemeProvider, createMuiTheme } from "material-ui/styles";

const theme = createMuiTheme({
palette: {
primary: {
50: "#eaf6f8",
100: "#cae9ed",
200: "#a6dbe1",
300: "#82cdd5",
400: "#68c2cc",
500: "#4db7c3",
600: "#46b0bd",
700: "#3da7b5",
800: "#349fae",
900: "#2590a1",
A100: "#68c2cc",
A200: "#4db7c3",
A400: "#3da7b5",
A700: "#4db7c3",
contrastDefaultColor: "light"
},
secondary: {
50: "#fef9e9",
100: "#fcefc8",
200: "#fbe5a3",
300: "#f9db7e",
400: "#f7d363",
500: "#f6cb47",
600: "#f5c640",
700: "#f3be37",
800: "#f2b82f",
900: "#efac20",
A100: "#f7d363",
A200: "#f6cb47",
A400: "#f2b82f",
A700: "#efac20",
contrastDefaultColor: "dark"
},
error: {
50: "#fbeeee",
100: "#f4d4d4",
200: "#edb7b7",
300: "#e59a9a",
400: "#e08484",
500: "#da6e6e",
600: "#d66666",
700: "#d05b5b",
800: "#cb5151",
900: "#c23f3f",
A100: "#e08484",
A200: "#da6e6e",
A400: "#d66666",
A700: "#cb5151",
contrastDefaultColor: "dark"
},
overrides: {
MuiButton: {
// Name of the styleSheet
root: {
// Name of the rule
background: "linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)",
borderRadius: 3,
border: 0,
color: "white",
height: 48,
padding: "0 30px",
boxShadow: "0 3px 5px 2px rgba(255, 105, 135, .30)"
}
}
}
}
});

const Theme = ({ children }) => <MuiThemeProvider theme={theme}>{children}</MuiThemeProvider>;

export default Theme;

Buttons are children of Theme. Palette changes took effect, but nothing related to overrides did :/

Context

Ideally I want to overwrite all my custom styles in one place.

Your Environment

Tech
Version

Material-UI
beta.26

React
16

browser
chrome

etc
Issue 1:
I writing the fron-end code from Sublime Text3 to Visual Studio Code. But I only open one instance of vscode one times, sometimes, I should open another project at same time. Now the vscode on windows only support one intance one time?

Issue 2:
Ubuntu 12.04, vscode 0.10.1

Currently when you run Code if there is an instances already running (or shift clicking the app icon in Windows/Ubuntu) it will activate the currently opened window. This should open a new instance, the same goes for opening a new instance of Code with a folder as an argument when an instance is already open.

It's a very common use case for many developers to have multiple editors with the same folder open.

Repro:

Code (open instance of vscode)

Code

Expected:

A new instance of vscode is opened

Actual:

The current instance of vscode is activated
Issue 1:
[x ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I think there is no actual page behind the component demo's and the link should probably just open the sub navigation

Current Behavior

As there is no actual page for the sub menu header, the link results in a 404.

Steps to Reproduce (for bugs)

Navigate to https://material-ui-1dab0.firebaseapp.com/getting-started/usage/

In the bottom paragraph there is a link to the components demo's

https://material-ui-1dab0.firebaseapp.com/component-demos

404

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

That the Popover content will adjust to the dynamically loaded/delayed content

Current Behavior

The popover initially loads. You see a tiny little div because the data has not yet loaded in. Once it does come in, half of the div is now off screen.

Steps to Reproduce (for bugs)

Create a simple component that has a delayed render like so

class DelayedComponent extends React.Component {

state = {
isSet: false
};

componentDidMount() {
setTimeout(() => {
this.setState({
isSet: true
});
}, 1000);

}

render() {
if (!this.state.isSet)
return <div></div>
else
return (
<div>
this is some really long text to test the Popover component with
<FormControl component="fieldset">
<FormLabel component="legend">anchorReference</FormLabel>
<RadioGroup
row
aria-label="anchorReference"
name="anchorReference"
value={this.state.anchorReference}
>
<FormControlLabel value="anchorEl" control={<Radio />} label="anchorEl" />
<FormControlLabel
value="anchorPosition"
control={<Radio />}
label="anchorPosition"
/>
</RadioGroup>
</FormControl>
</div>
);
}
}

And use the Popover like so:

render() {
...
<Popover
open={open}
anchorEl={anchorEl}
anchorReference={anchorReference}
anchorPosition={{ top: positionTop, left: positionLeft }}
onClose={this.handleClose}
anchorOrigin={{
vertical: anchorOriginVertical,
horizontal: anchorOriginHorizontal,
}}
transformOrigin={{
vertical: transformOriginVertical,
horizontal: transformOriginHorizontal,
}}
>
<DelayedComponent />
</Popover>
...
}

Position a button to trigger the Popover flush right

Open the popover

Context

When using Popover with content that could load in delayed I would hope the Popover could adjust for the change or a method could be provided. If there were access to the positioning method used inside Popover then it would allow for updating of delayed content. From what I see that would be setPositioningStyles() inside of Popover.

With that access provided I can then fire off that setPositioningStyles from outside the Popover and give it the proper positioning. If this were approved I would not mind taking on the work.

Thanks

Your Environment

Tech
Version

Material-UI
1.0.0-beta.23

React
16

browser
Chrome

etc
Issue 1:
TypeScript Version:

1.8.7

Code

import "reflect-metadata";

function dec(target: Object, propertyKey: string) {
}

it("Check emitted design types", () => {
class B {
}

class A {
@dec
b: B;
}

// Works as expected
expect(Reflect.getMetadata("design:type", A.prototype, "b")).toBeDefined();
});

it("Check emitted design types - reverse order", () => {
class A {
@dec
b: B;
}

class B {
}

// Fails!!!
expect(Reflect.getMetadata("design:type", A.prototype, "b")).toBeDefined();
});

Expected behavior: I'd expect design type metadata to be defined in both cases

Actual behavior: Only first case works as expected

Issue 2:
I have the following code:

@decorator
class A {
constructor(param : B) {

}
}

class B {

}

function decorator(target: any) {
return target;
}

console.log(Reflect.getMetadata("design:paramtypes", A));

The expected output should be: [function B()], but the actual output is [undefined]. The issue is related to the definition order in the resulting js file, in which there is the following code:

var A = (function () {
function A(param) {
}
A = __decorate([
decorator,
__metadata('design:paramtypes', [B])
], A);
return A;
})();
var B = (function () {
function B() {
}
return B;
})();

Since A is defined by a IIFE, in its execution scope B is not yet defined, so the generated metadata is incorrectly set to undefined. The only workaround I can use now is to declare B before A.
Issue 1:
See https://github.com/scrapy/scrapy/pull/4543/files/4c12a234ae65d49678a9840708ff5e7b9d6dcecc#diff-04eeb72b0ac2a03d00f2b1dcc3268ebc

Issue 2:
We should add support for following FTP links like:

ftp://www.example.com/somedir/somefile.xml

I suppose Requests will only use the URL attribute (and perhaps some data in meta, if it's needed).

As for Responses, they will contain the file contents in the body, as one would expect.

here should be a flag to enable/disable passive FTP, perhaps even per spider.
Issue 1:
It's pretty unexpected that the behavior of x <= pd.Series(...) depends on whether x is a python float or a np.float64:

>>> import pandas as pd
>>> import numpy as np
>>> 5 <= pd.Series(range(10))
0 False
1 False
2 False
3 False
4 False
5 True
6 True
7 True
8 True
9 True
dtype: bool
>>> np.float64(5) <= pd.Series(range(10))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pandas/core/ops.py", line 588, in wrapper
if len(self) != len(other):
TypeError: len() of unsized object
>>> pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.2.0-54-virtual
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.16.2
nose: 1.3.3
Cython: None
numpy: 1.9.2
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 0.12.1
sphinx: None
patsy: 0.3.0
dateutil: 2.2
pytz: 2014.4
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.3.1
openpyxl: 1.8.6
xlrd: 0.9.3
xlwt: None
xlsxwriter: None
lxml: 3.3.2
bs4: None
html5lib: None
httplib2: 0.7.2
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: 2.5.2 (dt dec pq3 ext)
>>>

Issue 2:
Problem description

I have the following .csv file:

A
A
B

one
one
two

0
34
0.1

I want to use the first two rows to create MultiIndex columns. However, the first and second columns are duplicated and pandas is handling that in a weird way.

Code Sample, a copy-pastable example if possible

print(pd.read_csv('test.csv',header=[0,1]).columns)
>> Index([('A', 'one'), '('A', 'one').1', ('B', 'two')], dtype='object')

This output is a total mess, the first column and last are tuples while the second column is a string. Also, this is not a MultiIndex, it's an Index. Raising an error or having the option to delete the duplicate columns would be a better solution.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.5.2.final.0

python-bits: 64

OS: Linux

OS-release: 4.4.0-97-generic

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_GB.UTF-8

LOCALE: en_GB.UTF-8

pandas: 0.21.0

pytest: 2.9.2

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.24.1

numpy: 1.13.3

scipy: 0.18.1

pyarrow: None

xarray: None

IPython: 5.1.0

sphinx: 1.4.6

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.3

blosc: None

bottleneck: 1.1.0

tables: 3.2.3.1

numexpr: 2.6.1

feather: None

matplotlib: 1.5.3

openpyxl: 2.3.2

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.3

lxml: 3.6.4

bs4: 4.5.1

html5lib: None

sqlalchemy: 1.0.13

pymysql: None

psycopg2: None

jinja2: 2.8

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None
Issue 1:
If the following app is run with one Foo class definition and then "hot restarted" after a second Foo definition is added, flutter run hangs.

class Foo { }
class Foo { }
void main() { print(new Foo()); }

Performing hot restart...
compiler message: lib/main.dart:61:7: Error: Duplicated definition of 'Foo'.
compiler message: class Foo { }
compiler message: ^
compiler message: lib/main.dart:60:11: Error: Duplicated name: Foo
compiler message: class Foo { }
compiler message: ^
E/flutter ( 4573): [ERROR:flutter/shell/common/engine.cc(151)] Could not prepare to run the isolate.
E/flutter ( 4573): [ERROR:flutter/shell/common/engine.cc(116)] Engine not prepare and launch isolate.

Issue 2:
I am trying to scroll the GridView horizontally when screen orientation is portrait and vertically when the screen orientation is landscape. However, I noticed a very strange behavior. What I mean is that when I change device orientation the widget scrolls the way I want, however the touch input stays the same, e.g. I start the app in portrait mode and I scroll the grid from left to right. Then, I change the device orientation and I still have to scroll the grid from left to right instead of from top to bottom.

Here's the code gist, if you run it you will get what I mean:

https://gist.github.com/realvotum/b72e03e909e5bf0b47a5cd11e53ef67a

My observation is that when you uncomment the Appbar line, it works like a charm. Also, when you comment out the padding inside GridView.count, it also works the way I expect. If you delete ScrollController, it works too, yet I want to have GridView scroll callbacks to measure the offset.

Is it a bug or am I doing something wrong? If so, how can I swap the scroll direction of the GridView based on the device orientation preserving the given padding and keep the scroll offset between orientation changes (without Appbar) ?

I also noticed that ListView.builder behaves the same.

Thank you in advance!

Doctor summary (to see all details, run flutter doctor -v):

[✓] Flutter (Channel beta, v0.11.3, on Mac OS X 10.14 18A391, locale pl-PL)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.1)
[✓] Connected device (1 available)
Issue 1:
I'm submitting a ... (check one with "x")

[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When binding the required attribute on an input tag, angular2 applies the required validator through the RequiredValidator directive even if the supplied expression evaluates to false.

Expected/desired behavior

The validator is not added or checks the supplied expression before validation.

Reproduction of the problem

import { Component } from '@angular/core';

@Component({
selector: 'demo-bug',
template: `
<input type="text" [(ngModel)]="value" [required]="isRequired" #spy>
<br>
{{spy.className}}
`
})
export class BugComponent {
value: string;
isRequired = false;
constructor() { }
}

http://plnkr.co/edit/os4Y1lA2P1wlbpq8ThNt

What is the expected behavior?

ng-invalid is not applied

What is the motivation / use case for changing the behavior?

Correct behavior

Please tell us about your environment:

Angular version: 2.0.0-rc.4

Browser: [all]

Language: [all]

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

I created a component nav-header which is meant to contain my

code. And to ensure that this is maintained across my application. When I use the <router-outlet></router-outlet> it duplicates the body of my application component where called.

For instance if I call the <router-outlet></router-outlet> in the nav-header component, it duplicates and inserts the application component in the nav-header component.

Expected/desired behavior

That it doesn't duplicate the code :-)

Reproduction of the problem

You can have a look at my application here, in particular these files:

Application Component

Application Modules

Header Navigation Component

What is the expected behavior?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

3.19.0-65-generic #73~14.04.1-Ubuntu SMP AMD64

Angular version: 2.0.0-rc.5

Browser: [Chrome Latest | Firefox Latest ]

Language: [TypeScript 1.8.10]
Issue 1:
sns.pairplot(credit_data , x_vars = ['Annual Income','Current Credit Balance'],

y_vars = ['Monthly Debt', 'Maximum Open Credit'], aspect = 3)

Issue 2:
Just updated to seaborn 0.11.0 and matplotlib 3.3.1.

Run this code:

iris = sns.load_dataset("iris")
sns.pairplot(data=iris, hue="species", y_vars='sepal_width');
sns.pairplot(data=iris, hue="species", y_vars='sepal_width', x_vars=['sepal_length', 'petal_length']);

And saw it:

And this problem appeared in all previously created pairplots, that have parameter y_vars