WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Description

When there are duplicated input points to Kmeans resulting to number of unique points < number of requested clusters, there is no error thrown. Instead, clustering continues to (seemingly) produce the number of clusters requested, but some of them are exactly the same, so the cluster labels produced for the input points do not go all the way to number of requested clusters.

Steps/Code to Reproduce

from sklearn.cluster import KMeans
import numpy as np

# some input points here are identical, so that n_total=17, n_unique=9
x2d = np.array([(1086, 348), (1087, 347), (1190, 244), (1190, 244), (1086, 348), (1185, 249), (1193, 241), (1185, 249), (1087, 347), (1188, 247), (1187, 233), (26, 111), (26, 111), (26, 110), (26, 110), (26, 110), (26, 110)])
kmeans = KMeans(n_clusters=10) # n_clusters > n_unique
c_labels = kmeans.fit_predict(x2d)
c_centers = kmeans.cluster_centers_

Expected Results

Either an error thrown, or the cluster labels produced should match the unique clusters only (i.e. no identical cluster centres)

Actual Results

>>> c_labels # note there's no entry for cluster 9
array([7, 2, 6, 6, 7, 5, 4, 5, 2, 1, 3, 8, 8, 0, 0, 0, 0], dtype=int32)
>>> c_centers # two of these 10 clusters have identical centers, so only 9 of them are unique
array([[ 26., 110.],
[ 1188., 247.],
[ 1087., 347.],
[ 1187., 233.],
[ 1193., 241.],
[ 1185., 249.],
[ 1190., 244.],
[ 1086., 348.],
[ 26., 111.],
[ 26., 110.]])

Versions

Darwin-16.7.0-x86_64-i386-64bit
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
NumPy 1.13.1
SciPy 0.19.1
Scikit-Learn 0.18.2

Issue 2:
Describe the bug

PCA fit_transform() gives different (and wrong) results with fit() first and then transform() on the same data, and doing two separately yields the correct results.

Steps/Code to Reproduce

from sklearn.decomposition import PCA

test_encoding=np.matrix([[0., 0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0., 0.],
[0., 0., 0., 0., 0., 1.],
[0., 0., 0., 0., 0., 1.]])

# two steps
pca = PCA(n_components=2)
pca.fit(test_encoding)
print(pca.transform(test_encoding)) # correct results

# one step
pca = PCA(n_components=2)
print(pca.fit_transform(test_encoding)) # wrong results, because the first 3 rows should be the same

Expected Results

array([[-5.65685425e-01, -8.88178420e-17],
[-5.65685425e-01, -8.88178420e-17],
[-5.65685425e-01, -8.88178420e-17],
[ 8.48528137e-01, 1.33226763e-16],
[ 8.48528137e-01, 1.33226763e-16]])

Actual Results

array([[-5.65685425e-01, 6.23316960e-17],
[-5.65685425e-01, -5.02181828e-17],
[-5.65685425e-01, -5.02181828e-17],
[ 8.48528137e-01, -1.27015565e-17],
[ 8.48528137e-01, -1.27015565e-17]])

Versions

import sklearn
sklearn.__version__ # '0.23.2'
Issue 1:
Challenge Increment a Number with JavaScript has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

Link to page:

https://www.freecodecamp.com/challenges/increment-a-number-with-javascript#?solution=var%20myVar%20%3D%2087%3B%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0AmyVar%2B%2B%3B%0A%0A

Issue 2:
Challenge Adjusting the Padding of an Element has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}

.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}

.yellow-box {
background-color: yellow;
padding: 10px;
}

.red-box {
background-color: red;
padding: 20px;
}

.green-box {
background-color: green;
padding: 20px;
}
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>

Edit by @raisedadead:

Camper is unable to advance between challenges due to slow/poor connectivity.
Issue 1:
I'm trying to calculate the NDCG score for binary relevance:

from sklearn import metrics

# test 1
y_true = [[3]]
y_score = [[5]]
metrics.ndcg_score(y_true, y_score)

And getting error

ValueError: Only ('multilabel-indicator', 'continuous-multioutput', 'multiclass-multioutput') formats are supported. Got binary instead

Below code snippet is working which has more than 1 item. Please suggest why single item array is not working.

from sklearn import metrics

# test 1
y_true = [[6 ,5, 4, 3, 2, 1]]
y_score = [[120, -2, -6, -3, 2, 12]]
metrics.ndcg_score(y_true, y_score)

Issue 2:
See this code example:

>>> t = [[1]]
>>> p = [[0]]
>>> metrics.ndcg_score(t, p)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/cbournhonesque/.pyenv/versions/bento/lib/python3.8/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/Users/cbournhonesque/.pyenv/versions/bento/lib/python3.8/site-packages/sklearn/metrics/_ranking.py", line 1567, in ndcg_score
_check_dcg_target_type(y_true)
File "/Users/cbournhonesque/.pyenv/versions/bento/lib/python3.8/site-packages/sklearn/metrics/_ranking.py", line 1307, in _check_dcg_target_type
raise ValueError(
ValueError: Only ('multilabel-indicator', 'continuous-multioutput', 'multiclass-multioutput') formats are supported. Got binary instead

It works correctly when the number of elements is bigger than 1: https://stackoverflow.com/questions/64303839/how-to-calculate-ndcg-with-binary-relevances-using-sklearn
Issue 1:
I started having trouble with a site I have in development that uses Joomla 3.1.5 with Bootstrap (meet gavern template) under IE10 on Win7 Ultimate. So I tried opening the getbootstrap site under IE10 and it also has big issues (attached). The home page loads the background, a couple text fields and nothing else, and when I go to getbootstrap.com/components I get this error in the console:SCRIPT87: Invalid argument. holder.js, line 119 character 4.

If I go to getbootstrap.com/2.3.2, I get this error: SCRIPT5002: Function expected

holder.js, line 316 character 2.

IE10 goes into compatibility mode with IE7 Standards Document Mode when the page loads. Some pages display blank white - even though all the code has loaded if I call up the view source window - and then if I resize the window it goes black.

I have an NVIDIA GeForce Display, not one of the displays with known issues for IE10. There is another person on the Joomla forum who has this issue so I know it is not just my computer. It seems to be ie10 and Windows Ultimate.

Issue 2:
if the PC has

"helvetica" font,

and

css sais

font-family: "helvetica";

IE 9&10 can not display anything.

so I think it is important,

"helvetica" should be removed from defolt "font-family".

thank you.
Issue 1:
Calling scipy.stats.hypergeom.pmf with a total of 0 Type I objects (and therefore, having a maximal k value of 0), returns a NaN value instead of 1.0.

From the documentation :

pmf(k, M, n, N) = choose(n, k) * choose(M - n, N - k) / choose(M, N),

Fixing k = n = 0, we have :

pmf(0, M, 0, N) = choose(0, 0) * choose(M - 0, N - 0) / choose(M, N),

= 1 * choose(M, N) / choose(M, N)

= 1 * 1

= 1

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/57 on 2006-04-02 by @rkern, assigned to @rkern.

The function tmean in file source:trunk/Lib/stats/stats.py needs review.

Please look over the StatisticsReview guidelines and add your comments below.
Issue 1:
The weekly build with nightly wheels from numpy and pandas

has failed. Check the logs for any updates that need to be

made in matplotlib.

https://github.com/matplotlib/matplotlib/actions/runs/2722394505

Issue 2:
The weekly build with nightly wheels from numpy and pandas

has failed. Check the logs for any updates that need to be

made in matplotlib.

https://github.com/matplotlib/matplotlib/actions/runs/2600273155
Issue 1:
Screenie: http://puu.sh/l7m9w/0f05381eb0.png

I finished the lesson, but I'm unable to progress. This happened with every lesson in the jQuery section, but all the others finally worked after a dozen clicks or thereabouts. The script runs correctly, and the hinge animated takes place (wasn't able to puush fast enough to catch it in action). I'm going to keep clicking in the hopes that it eventually works, but it is very discouraging.

Challenge Waypoint: Use jQuery to Modify the Entire Page has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");
$("#right-well").children().css("color", "green");
$("#left-well").children().css("color", "green");
$(".target:nth-child(2)").addClass("animated bounce");
$(".target:even").addClass("animated shake");
$("body").addClass("animated hinge");

});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-change-the-css-of-an-element-using-jquery has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Code fails validation ("Your target1 element should have red text." continues to show a red X even though the condition has been met). Interestingly, if "Run Code" is pushed several (sometimes >5) times, the code does eventually pass even though nothing changed.

Screenshot after pressing "Run Code":
Issue 1:
When I close an unsaved file, I get a popup saying "foo has changes, do you want to save them?". The popup has three buttons "Save", "Cancel" and "Don't Save".

The standard Windows dialog for this allows me to hit n to select Don't Save.

WIBNI Atom would allow me to do the same, at least on Windows?

Issue 2:
(this is possibly windows only, tested with 0.113.0)

Steps To Reproduce

Open Atom

Type something into a new editor or change an existing file (doesn't matter which)

Attempt to close the tab (for example Ctrl+W)

Correctly, a dialogue opens, that will give you a choice how to proceed

current (faulty) behaviour

The Keyboard is pretty much useless for this dialogue. You can only Hit [Enter] to save.

Desired Behaviour

These interactions all don't work, but would be very much needed, all of these are very much standard behaviour for any application:

[left] and [right] should switch focus between buttos (so we can select a different thing with keyboard only)

[esc] should Cancel

[alt] should bring up shortcut labels (much like it does for the application menu, i.e. _F_ile, which means press [Alt+F])

[tab] should cycle between the buttons, [shift-tab] should cycle backwards.
Issue 1:
I didn't know but it seems that PHP is replacing dots by underscores in parameter names in all global variables ($_GET, $_POST, ...). This bug in PHP is described on stackoverflow and on php.net.

Since the Request class uses those globals in createFromGlobals method, all values in Request::$query, Request::$attributes, ... are "wrong".

Is this a known and accepted behavior ? There is a Gist with a proposed solution. Do you think it is worth a PR or do I have to wait for @fabpot's one on RequestFactory (#8957) ?

Issue 2:
Symfony/Component/BrowserKit/Client->submit uses $form->getPhpValues() which uses parsestr which automagically converts . to _, this breaks compatibility with forms intended for non-PHP services.

Background

I am trying to write a functional test for connecting to an OpenID2 implementation in ASP.NET, however this requires use of a (auto-submitted by javascript) form with names like hidden form names like openid.mode.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.5-SNAPSHOT

Operating System version: win10

Java version: 1.8

Steps to reproduce this issue

A compilation error occurred when cloning the latest code to local, as follows: cannot resolve com.alibaba.spring: Spring context support: 1.0.4-snapshotPls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.0

Operating System version: mac

Java version: 1.8

org.apache.dubbo.config.AbstractConfig:

static {
// this is only for compatibility
Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());
}

The jvm hook is registered by default. When the user uses spring, the default hook is not removed. It was the earliest cause of this shutdown graceful, mainly due to this reason. Please note：

Spring does not register hooks by default, but users may register themselves, spring-boot will also register hooks by default.

org.apache.dubbo.config.spring.extension.SpringExtensionFactory.ShutdownHookListener:

private static class ShutdownHookListener implements ApplicationListener {
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof ContextClosedEvent) {
// we call it anyway since dubbo shutdown hook make sure its destroyAll() is re-entrant.
// pls. note we should not remove dubbo shutdown hook when spring framework is present, this is because
// its shutdown hook may not be installed.
DubboShutdownHook shutdownHook = DubboShutdownHook.getDubboShutdownHook();
shutdownHook.destroyAll();
}
}
}
Issue 1:
I need show the format of date of this way 'dd/mmm/yyyy', thanks

<Field style={style.field} title="Birthday" name="dob" disabled={sendIn} component={TextField} validate={Validations.required} type="date" InputLabelProps={{ shrink: true, }} />

Issue 2:
TextField with a label set to something and type set to date but with no initial value displays the label and mm/dd/yyyy on top of each other in the TextField. Once you enter the field, the label moves up as superscript and the mm/dd/yyyy remains and is readable.

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

Expected Behavior

When the date picker has no value, if it is going to display the expected date format in the field, it should treat that as a value and move the label up to superscript. Alternatively, don't display the date format unless the user enters the field and there is no value.

Current Behavior

Currently the label and date format overwrite each other if there is no value for the TextField.

Steps to Reproduce (for bugs)

Example on codesandbox.io:

https://codesandbox.io/s/6ljy4wq04k

Your Environment

Tech
Version

Material-UI
1.0.0-beta.9

React
15.6.1

browser
Chrome 60.03
Issue 1:
The Git history for this repository is invalid. You'll run into this if you enable verification of the history in your configuration (which should really be the default):

[transfer]
fsckobjects = true

[fetch]
fsckobjects = true

[receive]
fsckobjects = true

% git clone https://github.com/kennethreitz/requests.git
Cloning into 'requests'...
remote: Counting objects: 16580, done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object

If you look at the commit with verification disabled, you can see the problem:

commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8
Author: Shrikant Sharat Kandula <shrikantsharat.k@gmail.com>
Date: Thu Sep 8 02:38:50 2011 +51800

Typo in documentation

The kwarg is named `headers`, not `header`. Also, its a dict, not a set.

I don't have a suggestion on how to approach this. It's quite unfortunate. The history would probably have to be rewritten, and that would be awful. I do think it's worth noting though... verification by default may become the default on various distributions or even upstream.

Issue 2:
Hi Kenneth,

I'd like to see this feature: allow developers to specify more hooks per category, and let them be applied in pipe.

I'll be very glad to produce a patch.
Issue 1:
System information (version)

OpenCV => Any version:

Operating System / Platform => Windows 64 Bit and Windows 32 Bit

Compiler => Visual Studio 2015

Detailed description

dist.h compile without NEON or GNUC

It will cause Memory out of bound Error!!

Because size * sizeof(pop_t), larger than original size

opencv/modules/flann/include/opencv2/flann/dist.h

Line 468
in
b39cd06

reinterpret_cast<const unsigned char*> (b), size * sizeof(pop_t));

Steps to reproduce

Issue 2:
System information (version)

OpenCV => : 4.1.2:

Operating System / Platform => :Windows 64 Bit:

Compiler => :Visual Studio 2015:

Detailed description

Steps to reproduce

I converted from a keras model to tensorflow. But I get this error. Has anyone already encountered this type of error?
Issue 1:
I tried using the @types/lodash package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow.

Authors: @bczengel, @chrootsu, @stepancar

Ref

lodash/lodash#3475

Error Details

Code

import * as _ from "lodash";
const res = _.chain([1, 2, 3]).take(1);

Error

sh-3.2# tsc
index.ts(3,13): error TS2684: The 'this' context of type 'LoDashExplicitWrapper<number[]>' is not assignable to method's 'this' of type'LoDashExplicitWrapper<ArrayLike<number> | null | undefined>'. Types of property 'push' are incompatible.
Type '<T>(this: _.LoDashExplicitWrapper<ArrayLike<T> | null | undefined>, ...items: T[]) => _.LoDashExp...' is not assignable to typ
e '<T>(this: _.LoDashExplicitWrapper<ArrayLike<T> | null | undefined>, ...items: T[]) => _.LoDashExp...'. Two different types with this
name exist, but they are unrelated.
Type 'LoDashExplicitWrapper<number[]>' is not assignable to type 'LoDashExplicitWrapper<ArrayLike<number> | null | undefined>'.
sh-3.2#

Environment

{ ts: '1.0.0',
npm: '5.5.1',
ares: '1.10.1-DEV',
cldr: '31.0.1',
http_parser: '2.7.0',
icu: '59.1',
modules: '57',
nghttp2: '1.25.0',
node: '8.9.0',
openssl: '1.0.2l',
tz: '2017b',
unicode: '9.0',
uv: '1.15.0',
v8: '6.1.534.46',
zlib: '1.2.11' }

Typescript

version : 2.6.1

target: "es6"

module: "commonjs"

types/lodash: 4.14.82

Issue 2:
_.chain from @types/lodash is broken on Typescript 2.6

I have little knowledge of lodash internals, but the project that I'm working on uses it a lot. Using the new @ts-ignore silences the error, but I wanted to register it here.

Reproducing:

install typescript ~2.6.0

tsc -init

npm i lodash @types/lodash --save

index.ts:

import * as _ from 'lodash'

var a = _.chain([1,2,3]).map((x) => { return x + 1 })

console.log(a.value())

run tsc

Result:

index.ts(3,9): error TS2684: The 'this' context of type 'LoDashExplicitWrapper<number[]>' is not assignable to method's 'this' of type 'LoDashExplicitWrapper<ArrayLike<number> | Dictionary<number> | NumericDictionary<number> | null |...'.
Types of property 'push' are incompatible.
Type '<T>(this: _.LoDashExplicitWrapper<ArrayLike<T> | null | undefined>, ...items: T[]) => _.LoDashExp...' is not assignable to type '<T>(this: _.LoDashExplicitWrapper<ArrayLike<T> | null | undefined>, ...items: T[]) => _.LoDashExp...'. Two different types with this name exist, but they are unrelated.
Type 'LoDashExplicitWrapper<number[]>' is not assignable to type 'LoDashExplicitWrapper<ArrayLike<number> | Dictionary<number> | NumericDictionary<number> | null |...'.
index.ts(3,31): error TS7006: Parameter 'x' implicitly has an 'any' type.

Dependencies:

"@types/lodash": "^4.14.80",
"lodash": "^4.17.4"

@aj-r, @thorn0, @andy-ms any ideas?
Issue 1:
Elasticsearch version:

5.0

Plugins installed: []

x-pack

JVM version:

1.8

OS version:

ubuntu 14.05

Description of the problem including expected versus actual behavior:

enter command

service elasticsearch start

after 10s failed.

/var/log/elasticsearch there is no logs.

so I was test /etc/init.d/elasticsearch, it seems to timeout and immediately finished.

I have no idea... what can i do anything?

thanks your support.

Steps to reproduce:

1.

2.

3.

Provide logs (if relevant):

Describe the feature:

Issue 2:
Elasticsearch version: 5.0.0

Plugins installed: none

JVM version:

openjdk version "1.8.0_91"

OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)

OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

OS version: Ubuntu 14.04.5 LTS

Description of the problem including expected versus actual behavior: Elasticsearch fails to start, doesn't gives any logs.

Steps to reproduce: I'm using Ansible script to create my infrastructure. I had the same issue when I tried to upgrade my ES from 2.3 to ES 5.0. To determine the root cause, I've tried it in a new server with no installations.

name: Install apt-transport-https

apt: name=apt-transport-https state=present

name: Add Java (OpenJDK) Repository

apt_repository: repo='ppa:openjdk-r/ppa' state=present

name: Install Java (OpenJDK)

apt: pkg=openjdk-8-jdk state=installed update_cache=yes

name: Add Elasticsearch Key

apt_key:

url: 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'

name: Add Elasticsearch Repository

apt_repository: repo='deb https://artifacts.elastic.co/packages/5.x/apt stable main' state=present

name: Install Elasticsearch

apt: pkg=elasticsearch state=installed update_cache=yes

name: Init Elasticsearch

command: update-rc.d elasticsearch defaults 95 10

name: Enable Elasticsearch (Start on boot)

service: name=elasticsearch enabled=yes

Provide logs (if relevant): I don't see any logs, link to the YML file.

https://gist.github.com/ronakjain90/08ae1c225f806af81e383aba24804a60

Describe the feature: Since I'm just trying to install the ES with no extra plugins, it seems weird that it just fails to start providing no clue why is it is crashing, since there are no logs that I can see. ES 5.0 works fine in my MacBook though.