WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hello.

The function silhouette_samples of sklearn.metrics.cluster there are such cod rows:

results = zip(*pairwise_distances_chunked(X, reduce_func=reduce_func,
**kwds))
intra_clust_dists, inter_clust_dists = results
intra_clust_dists = np.concatenate(intra_clust_dists)
inter_clust_dists = np.concatenate(inter_clust_dists)

I've checked the work of clustering algorithms with np.concatenation and without ones. and nothing happened. So what is the role of that concatenations?

In the beginning of function silhouette_samples you create an object of LabelEncoder.

What is the reason to encode the labels after clustering algorithms, which return the labels in form of integer numbers from -1 to inf? As I tested on Iris dataset, the following function works well even with np.unique

le = LabelEncoder()
labels = le.fit_transform(labels)
n_samples = len(labels)
label_freqs = np.bincount(labels)
# Alternative
#check_number_of_labels(len(np.unique(labels)), n_samples)
check_number_of_labels(len(le.classes_), n_samples)

Thank you!

Issue 2:
Description

ValueError thrown when using dump_svmlight_file on a pandas dataframe that contains NaN values. The expected behavior should be to skip NaN values.

Steps/Code to Reproduce

from sklearn.datasets import dump_svmlight_file

import pandas as pd

df=pd.read_csv('somefile.csv')

dump_svmlight_file(df,[0]*len(df),'svmlightfile')

Actual Results

Traceback (most recent call last):

File "", line 1, in

File "/usr/lib64/python3.3/site-packages/sklearn/datasets/svmlight_format.py", line 393, in dump_svmlight_file

Xval = check_array(X, accept_sparse='csr')

File "/usr/lib64/python3.3/site-packages/sklearn/utils/validation.py", line 398, in check_array

_assert_all_finite(array)

File "/usr/lib64/python3.3/site-packages/sklearn/utils/validation.py", line 54, in _assert_all_finite

" or a value too large for %r." % X.dtype)

ValueError: Input contains NaN, infinity or a value too large for dtype('float64').#### Expected Results

Versions

Linux-2.6.32-573.26.1.el6.centos.plus.x86_64-x86_64-with-centos-6.7-Final

Python 3.3.0 (default, Feb 12 2013, 17:01:04)

[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]

NumPy 1.9.2

SciPy 0.14.1

Scikit-Learn 0.17.1
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.1

Operating System version: windowns10

Java version: jdk1.8

Steps to reproduce this issue

consumer set paramert mock = true

consumer add XxxServiceMock class

when provider receive connection more than executes provider throw RpcException

Expected Result

when provider throw RpcException，consumer side will invoke XxxServiceMock

Actual Result

provider return RpcResult，But not throw RpcException，so MockClusterInvoker can not catch

the RpcException and do not invoke XxxServiceMock

can i create a pr for it?

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.5

Operating System version: MacOS Catalina 10.15.1

Java version: 1.8.0_91

Steps to reproduce this issue

I just forked the proj and tried to compile the whole proj:

mvn clean install -DskipTests=true

then I got a compilation error.

It runs wrong in Win 10 either.

Expected Result

Build Success

Actual Result

I got this error:

Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile-custom (default) on project dubbo-serialization-protobuf: Could not transfer artifact org.apache.dubbo:protoc-gen-dubbo-java:exe:osx-x86_64:1.19.0-SNAPSHOT from/to apache.snapshots (https://repository.apache.org/snapshots): Remote host closed connection during handshake
Issue 1:
At the moment there are different class names (e.g. .warn, .danger, .important) to indicate types for button, span.label and .alert-message elements. I think it would be smart to create a single set of types for all of them.

Issue 2:
Hi,

When we try to download with the customization tool (without any change in the form), an error occured in the bootstrap.zip file ( bootstrap/css/error.txt)

{"type":"Parse","message":"Syntax Error on line 792","index":25106,"filename":"bootstrap.css","line":792,"column":11,"extract":[" *margin: -5px 0 5px;"," ove rflow: hidden;"," background-color: @top;"]}

The error is described

Hope it helps,

Regards
Issue 1:
It would be nice to export WaitGroup.counter and WaitGroup.waiters to enable the client
to instrument those and take actions when needed.

Issue 2:
by surajn.vnit:

What does 'go version' print? go1.3 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.
Setup -
- Front end HTTP server implemented using Go. It requests 1 backend service over HTTP.
Front end service waits for 10ms or the response from the backend service, whichever
earlier and sends response to the user.
Code - http://play.golang.org/p/rE0Q7N2nmT
- Back End Service - HTTP service implemented using Go. Accepts request, sleeps for 5ms
and responds back.
- Concurrency test: weighttp -n 10000 -c 2 -t 1 -k "http://127.0.0.1:8084/";

What happened?
1. Number of connections with the backend service in TIME_WAIT kept on increasing
(>5000 at the end of test)
2. Changed the MaxIdleConnsPerHost to 4. Number of connections to backend service is
constant at 4 and are in ESTABLISHED state.

What should have happened instead?
1. Ideally 2 to 4 persistent connections are sufficient to handle this much load. But
every connection after the limit MaxIdleConnsPerHost is reached, I think is not
persistent. This leads in too many connections being established and broken. This can in
turn bring the system down - which I am seeing at a little high concurrency.

This can be an issue for a service which have to communicate 100+ backend HTTP services,
as we cannot keep very high limit for MaxIdleConnsPerHost.

Case 2 is the expected behavior. So if MaxIdleConnsPerHost is sufficient, then there is
no issue.

Please provide any additional information below.

This can be the possible duplicate of
https://golang.org/issue/6785. Please check.
Golang-nuts link - https://groups.google.com/forum/#!topic/golang-nuts/-SLvF5OzOSI.
Issue 1:
When using the declaration option the .d.ts files are all generated in the output directory of the .js files. Please provide an option to define the output directory and/or the output file for the declarations.

Issue 2:
I need to make an automated building of my typescript projects. Typescript compilation results (i.e .js and .d.ts files) need further separate processing.

It would be nice if there is separate compilation option to specify output directory for generated declarations. Something like this:

//tsconfig.json
{
"CompilerOptions": {
...
"declaration": true,
"declarationDir": "target/typings"
...
}
}```
Issue 1:
Environment

Windows build number: [10.0.18362.295]
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?

MSYS2 / MINGW64:

$ uname -srvo
MINGW64_NT-10.0-18362 3.0.7-338.x86_64 2019-07-11 10:58 UTC Msys

$ bash --version
GNU bash, version 4.4.23(1)-release (x86_64-pc-msys)

Emacs from MSYS2's mingw64/mingw-w64-x86_64-emacs package:

(emacs-version)
"GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-06-03"

Steps to reproduce

Run MSYS2 / MINGW64 bash in Windows Terminal, e.g. in a CMD tab with

set MSYSTEM=MINGW64&& c:\msys64\usr\bin\bash --login -i

Run Emacs in the terminal (emacs -nw) and quit it immediately

Back at the bash prompt, enter a few characters, say 123

Press the left-arrow as often as needed to move the cursor to the

beginning of the line (in this example 3 times)

Enter some other characters

Expected behavior

The cursor moves with the left-arrow keystrokes to the beginning of the line

New text appears line start

Actual behavior

The cursor stays at the end of the line, although the internal position is updated

and new text appears at line start.

When I delete text using Backspace or Delete, the cursor jumps to the correct position,

but jumps back to the end of line when new text is entered.

It seems that MINGW Emacs and MSYS2 bash don't play well in Windows Terminal -- in

the classic Windows console there is no issue.

This might be related to #2561.

Issue 2:
Summary of the new feature/enhancement

Proposed technical implementation details (optional)
Issue 1:
📝 Provide a description of the new feature

Could you please add an option to FancyZones, that will let you remove the displaying of the zone numbers when changing zones. A font type and size option would be nice also, for those who wish to keep the display of zone numbers. The numbers are a bit unsightly for those who appreciate skinning.

What is the expected behavior of the proposed feature? What is the scenario this would be used?

To improve the overall appearance of FancyZones. Zones are Zones, once they are created, they don't need numbers to provide any additional functionality. The zone colours and active zone is colour highlighted.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Thanks guys. Nice app.

Issue 2:
Environment

Microsoft Windows [Version 10.0.18363.778] (1909)

PowerToys 0.17.0

FancyZones

Steps to reproduce

Had set Fancy zones with a 3 wide by 2 down grid (so 6 panes) with space around zones set to 10 on 1 of my 3 monitors (all external to the laptop I use).

Was working fine initially when I dragged 6 apps into each pane on my non-primary 4K monitor

Later I moved one of the windows to another monitor but when I dragged it back (with shift pressed) the screen didn't change to having the grid on it and it didn't snap into place.

I went into the settings from the taskbar icon but clicking on "Edit Zones" did nothing

After I quit the PowerToys settings window, right clicking on its taskbar icon did nothing

After I killed the PowerToys.exe process (after taking a memory dump which is 106MB compressed) and restarted it, everything started working fine again

Expected behavior

Window snaps into grid position after showing grid outline on the monitor I had set up

Actual behavior

Window didn't snap into grid position and didn't show grid lines on any monitor

Screenshots
Issue 1:
In strict mode, React will call render method twice, to catch mutate-during-render type of bugs. However, there is an inconsistency in the way this is done for useRef().

During the first render only, each call will give you a fresh ref object. During subsequent calls, you will be given the same object during both calls.

React version: 17.0.2

Steps To Reproduce

Here is a little app to demo this.

import React from "react";
import "./styles.css";

const Hooky = () => {
const ref = React.useRef(null);
const [num, setNum] = React.useState(0);

ref.current = (ref.current || 0) + 1;

return (
<div>
<p>
Val: {num} <br />
<button onClick={() => setNum(Math.random())}>Roll</button>
</p>
<p>Ref count: {ref.current}</p>
</div>
);
};

const App = () => {
const [show, setShow] = React.useState(false);

return (
<div>
<h2>Show or hide</h2>
<button onClick={() => setShow(!show)}>{show ? "Hide" : "Show"}</button>
<hr />
{show && <Hooky />}
</div>
);
};

export default App;

Click "Show". You will see ref count set to 1, indicating the useRef has returned a different object both times it was called (it could also mean the component was called only once, but that isn't the case, I checked using debugger). If you force rerender by clicking the other button, the ref will increase in increments of 2, which is what you'd expect.

Link to code example: https://codesandbox.io/s/react-fiddle-forked-fkocg?file=/src/App.js

The current behavior

useRef in strict mode has one behavior during first render and other during subsequent renders.

The expected behavior

useRef operates consistently during all renders. Either always gives you the same object, or has a separate object for each "lane" and always reuses the same one.

Basically, the counter in the code sandbox example should either go: 2 4 6 8 or 1 2 3 4. Not 1 3 5 7, as it does now.

Why this matters

Practical issue where I encountered this was trying to do subscribe/unsubscribe system using refs. I want my components to consistently subscribe and subscribe callbacks, kind of like element ref works. This failed when I detected callbacks not getting called, due to a duplicate ref object provided the first time component is rendered.

Issue 2:
https://facebook.github.io/react/docs/perf.html

IMO this is insufficient. Where are we supposed to place each of the API calls? Some example code would be great.
Issue 1:
In seaborn 0.6.0, alpha parameter no longer works with violinplot. Used to work fine with 0.5.1

Example to duplicate:

import seaborn as sns

import matplotlib.pyplot as plt

fig = plt.figure()

sns.set_style("whitegrid")

tips = sns.load_dataset("tips")

ax = sns.violinplot(x=tips["total_bill"], alpha=0.1)

plt.show()

Issue 2:
It doesn't appear to be possible to (easily) plot a non-normed histogram on the margins of a jointplot. Since I'm interested in adding some annotations to the margins, for my use-case it's important that the histogram actually represents bin counts.

I suppose this is actually a limitation of distplot itself, since It looks like passing hist_kws={'normed':False} directly the margin distplot results in a duplicate keyword error. This would be solved if the manual keyword argument dictionaries could override the default distplot arguments to plt.hist(), but unfortunately it doesn't appear to do this.

Plotting a histogram directly onto the margin with JointGrid.plot_marginals also fails because it requires the function to accept a "vertical" argument. It turns out plt.hist expects an orientation='horizontal' instead. (as per http://matplotlib.org/examples/pylab_examples/scatter_hist.html)

I suppose I could write a wrapper for plt.hist and pass it to JointGrid.plot_marginals, or just manually plot two histograms on each axis independently, but I would hope this could be a bit easier task to accomplish within the JointGrid framework =)

If the marginal histograms were not normed, then automatically adding appropriate scales to the marginals would also be nifty!
Issue 1:
Environment

Windows build number: [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.2.1831.0

Any other software?

WSL Ubuntu: [1804.2019.521.0]

Steps to reproduce

Install Pragmata Pro Mono Liga 0.827 font (any other Unicode font should work as well).

Open the Windows Terminal with WSL Ubuntu tab.

Download and display the UTF-8 Demo Text.

$ curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt

Expected behavior

No visible interline gap (the screenshot is from Cmder 180626 with WLS Ubuntu):

Actual behavior

Visible sparse interline gap:

Issue 2:
Just a reminder for the new Windows Terminal, remember to make sure block and line drawing characters fill their cells properly at all zoom levels.

This is really important for ANSI-art and TUI apps.

See color bleeding and horizontal lines in the larger Windows Terminal tab.

Also, some characters are randomly replaced by � (<?>) characters when changing zoom level or when printing out lot of VT markup.
Issue 1:
I'm having a play around with replacing selenium in my automated tests with playwright and i can't seem to get drag and drop to work using the 'move', 'down', and 'up methods on page.mouse. the app i'm testing uses DragEvent.dataTransfer so i imagine this is why i'm not having any luck. is there a reccomended way to simulate drag and drop events using the current api, or better yet, would it be possible to introduce an api for simulating drag and drop events?

p.s. i would prefer not to use page.eval to trigger events using javascript if possible.

cheers.

Issue 2:
Drag and drop should work with playwright. Using the existing mouse apis should generate working dragstart, drag, and drop events. There should also be new APIs to simulate dropping in external content, and to inspect content dragged from the web page.
Issue 1:
When adding a host entry using the hosts module, if the name matches an existing entry with a different ip, the entire entry line is removed, even if it contains other aliases. I would expect it to leave the other entries in place.

Ever more so, if the entry for the current name/ip exists AND the name exists in another entry, the other entry line is removed and a second instance of the existing entry is added.

with ip=192.168.3.10 hostname=vagrant-chef-server state=present

127.0.0.1 vagrant-chef-server vagrant-chef-server localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

bacame:

192.168.3.10 vagrant-chef-server
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

and if I fix that file to put 127.0.0.1 back, the next run produces:

192.168.3.10 vagrant-chef-server
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.3.10 vagrant-chef-server

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

ovirt_storage_domains

SUMMARY

In the documentation it's stated that we can remove SDs like this:

ansible/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py

Lines 208 to 212
in
0566d46

# Remove storage domain

- ovirt_storage_domains:

state: absent

name: mystorage_domain

format: true

But it's not working, since dc is required parameter for the module:

ansible/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py

Line 473
in
0566d46

data_center=dict(required=True),

Even if removing the required == True if will fail since in the pre-remove step the attached_sd_service is used, and in order to get it, you implicitly use the DC name provided in parameters.

ansible/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py

Lines 330 to 339
in
0566d46

def _attached_sds_service(self):

# Get data center object of the storage domain:

dcs_service = self._connection.system_service().data_centers_service()

# Serach the data_center name, if it does not exists, try to search by guid.

dc = search_by_name(dcs_service, self._module.params['data_center'])

if dc is None:

dc = dcs_service.service(self._module.params['data_center']).get()

if dc is None:

return

This is problematic from my view, since some SD can be in unattached state, in this case DC name parameter doesn't make sense and the pre-remove step should be skipped.

But in any case I think we should use the absent state as described in example, without any specification of datacenter.
Issue 1:
Bug report

Both "module" export and "import" export of exports field are resolved in duplication.

What is the current behavior?

3rd party lib swr's output assets are resolved in different cases:

When swr is imported, it resolves to swr/dist/index.esm.js

Then subpath import swr/infinite is imported, which is relying on swr

Then swr is resolved in 2nd time, but now swr/dist/index.mjs is resolved

If the current behavior is a bug, please provide the steps to reproduce.

https://github.com/beeebox/webpack-esm-duplicated-resolve

yarn start

browser should open on localhost:3000

open devtools and search "swr"

you'll see swr/dist/index.esm.js and swr/dist/index.mjs are both resolved there

What is the expected behavior?

swr/dist/index.mjs or swr/dist/index.esm.js is resolved only all the time

Other relevant information:

webpack version: v5.70.0

Node.js version: v14.17.0

Operating System: MacOS 12.0.1

Additional tools:

Issue 2:
Bug report

I have submitted this question in stackoverflow, but I haven't received any reply。

https://stackoverflow.com/questions/65642712/webpack-5-cannot-reuse-caches-in-different-file-structures

What is the current behavior?

I use the file cache of Webpack5 through the following configuration, and set the cache files in a public folder

In the case of the file directory structure unchanged, build again. At this time, caching can be applied successfully, greatly reducing the build time

I copied the entire project code to the same directory as testbuild

Under the new directory testBuild, execute the build and find that the previously generated cache is not applied. It generates new ones

Supplementary Note: This test is to simulate the real CI construction process, and my goal is to significantly reduce the build time on CI construction

cache: { type: 'filesystem', cacheDirectory: path.resolve(paths.cachePath,'prod-cache'), }

If the current behavior is a bug, please provide the steps to reproduce.

Because of the problem of office environment, I can't code to GitHub warehouse. All I can offer is a few configuration fragments

What is the expected behavior?

In the case of the same code, different file directories can reuse the file cache

Other relevant information:

webpack version: 5.11.0

Node.js version: v10.15.3

Operating System: window 10

Additional tools:
Issue 1:
Hi, i'am running webpack 1.13.1

//works
import {SuperClass} from '../super_class';
class SubClass extends SuperClass () {}

//doesn't work
//TypeError: Super expression must either be null or a function, not undefined
import {SuperClass} from '../main';
class SubClass extends SuperClass () {}

Issue 2:
Do you want to request a feature or report a bug?

report a bug

What is the current behavior?

For web targets when the process global is encountered the process/browser.js module is included in the bundle. The problem is the drive letter is sometimes not in sync with the drive letter as specified by process.cwd().

This is a problem creating duplicate copies of this internal module when the path differs only by the case of the drive letter. We have no control over how internal modules are expanded.

Our practice is to observe process.cwd() and return config after checking the case of the drive letter with entry points and aliases matching the drive letter case. This has eliminated 99% of duplicate module warnings. However the internal modules if they expand out to paths where the drive letter casing is different than the process.cwd() casing we get duplicates of internal modules in our bundle.

�[1m�[33mWARNING in ./node_modules/process/browser.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* C:\WebClientToolkit\node_modules\process\browser.js
Used by 3 module(s), i. e.
C:\WebClientToolkit\packages\core\wct-http\source\index.js
* c:\WebClientToolkit\node_modules\process\browser.js
Used by 1 module(s), i. e.
c:\WebClientToolkit\node_modules\path-browserify\index.js�[39m�[22m

If the current behavior is a bug, please provide the steps to reproduce.

I can provide our config, however it's going to happen when bundling web targets on windows unless you get 'lucky' and the expansion for the internal process module happens to match process.cwd().

What is the expected behavior?

There should not be duplicates of internal modules.

If this is a feature request, what is motivation or use case for changing the behavior?

When the path is expanded for internal modules check process.cwd() and match the drive letter case.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

We're on webpack 3.6.0 and Node 6.10.3.
Issue 1:
Version

2.6.10

Reproduction link

https://codepen.io/xiaohai/pen/zgKwyZ?editors=1010

Steps to reproduce

点击二级路由A

点击一级路由

点击二级路由B

此时加载的组件却是 二级路由A

What is expected?

修复这个问题

What is actually happening?

使用 transition 与 keep-alive 时, transition 的 mode 设置为 out-in, 会导致路由组件加载错误

Issue 2:
Vue.js / vue-router versions

Vue.js 2.2.2

vue-router 2.3.0

Reproduction Link

https://jsfiddle.net/2tdjec9q/

Steps to reproduce

step1: click to /b you will see this is B

step2: click to /c you will see this is C

step3: click to / you will see this is B not this is A

What is Expected?

at step3 i need this is A not this is B

What is actually happening?

at step3 i need this is A

if not use mode="out-in" this will run success