WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Support for weights in percentile would be nice to have. A quick look suggests https://github.com/nudomarinero/wquantiles; I'd be happy to make a PR out of this implementation if there's interest.

Issue 2:
For our work we frequently need to compute weighted quantiles. This is especially important when we need to weigh data from recent years more heavily in making predictions.

I've put together a function (called weighted_quantile) largely based on the source code of np.percentile. It allows one to input weights along a single dimension, as a dict w_dict. Below are some manual tests, using xarray as starting point:

When all weights = 1, it's identical to using np.percentile:

>>> ar0
<xarray.DataArray (x: 3, y: 4)>
array([[3, 4, 8, 1],
[5, 3, 7, 9],
[4, 9, 6, 2]])
Coordinates:
* x (x) |S1 'a' 'b' 'c'
* y (y) int64 0 1 2 3
>>> np.percentile(ar0, q=[25, 50, 75], axis=-1)
array([[ 2.5 , 4.5 , 3.5 ],
[ 3.5 , 6. , 5. ],
[ 5. , 7.5 , 6.75]])
>>> weighted_quantile(da=ar0, q=[0.25, 0.5, 0.75], dim='y', w_dict={'y': [1,1,1,1]})
<xarray.DataArray (quantile: 3, x: 3)>
array([[ 2.5 , 4.5 , 3.5 ],
[ 3.5 , 6. , 5. ],
[ 5. , 7.5 , 6.75]])
Coordinates:
* x (x) |S1 'a' 'b' 'c'
* quantile (quantile) float64 0.25 0.5 0.75

Now different weights:

>>> weighted_quantile(da=ar0, q=[0.25, 0.5, 0.75], dim='y', w_dict={'y': [1,2,3,4.0]})
<xarray.DataArray (quantile: 3, x: 3)>
array([[ 3.25 , 5.666667, 4.333333],
[ 4. , 7. , 5.333333],
[ 6. , 8. , 6.75 ]])
Coordinates:
* x (x) |S1 'a' 'b' 'c'
* quantile (quantile) float64 0.25 0.5 0.75

Also handles nan values like np.nanpercentile:

>>> ar
<xarray.DataArray (x: 2, y: 2, z: 2)>
array([[[ nan, 3.],
[ nan, 5.]],

[[ 8., 1.],
[ nan, 0.]]])
Coordinates:
* x (x) |S1 'a' 'b'
* y (y) int64 0 1
* z (z) int64 8 9
>>> da_stacked = ar.stack(mi=['x', 'y'])
>>> out = weighted_quantile(da=ar, q=[0.25, 0.5, 0.75], dim=['x', 'y'], w_dict={'x': [1, 1]})
>>> out
<xarray.DataArray (quantile: 3, z: 2)>
array([[ 8. , 0.75],
[ 8. , 2. ],
[ 8. , 3.5 ]])
Coordinates:
* z (z) int64 8 9
* quantile (quantile) float64 0.25 0.5 0.75
>>> np.nanpercentile(da_stacked, q=[25, 50, 75], axis=-1)
array([[ 8. , 0.75],
[ 8. , 2. ],
[ 8. , 3.5 ]])

Lastly, different interpolation schemes are consistent:

>>> out = weighted_quantile(da=ar, q=[0.25, 0.5, 0.75], dim=['x', 'y'], w_dict={'x': [1, 1]}, interpolation='nearest')
>>> out
<xarray.DataArray (quantile: 3, z: 2)>
array([[ 8., 1.],
[ 8., 3.],
[ 8., 3.]])
Coordinates:
* z (z) int64 8 9
* quantile (quantile) float64 0.25 0.5 0.75
>>> np.nanpercentile(da_stacked, q=[25, 50, 75], axis=-1, interpolation='nearest')
array([[ 8., 1.],
[ 8., 3.],
[ 8., 3.]])

We wonder if it's ok to make this feature part of numpy, probably in np.nanpercentile?
Issue 1:
Hi,

I need that the url is changed, when clicking a tab.

So when there are three tabs:

<div class="tab-content">
<div class="tab-pane fade in active" id="home">...</div>
<div class="tab-pane fade" id="profile">...</div>
<div class="tab-pane fade" id="messages">...</div>
<div class="tab-pane fade" id="settings">...</div>
</div>

and you are clicking on "profile" the url should change from site.com to site.com/#profile

Is that already possible and I did not see that in documentation?

Thank you

Zoker

Issue 2:
Hello,

am i missing something or the only way to link to a specific tab is by setting .active class to tab navigation and .tab-pane elements?

For example, i lets look at demo of this tab system:

http://twitter.github.com/bootstrap/javascript.html#tabs

It has two links with href attributes set on #home and #profile which are targeting elements with those IDs and showing them accordingly. So everything is fine there, but what if i want to link to #profile tab from another page? Maybe I am missing something really obvious, but it seems that this is not possible simply by appending #profile to page url?

Like i said, i might have missed something, but if I did not, it would be absolutely great if this could be implemented in bootstrap!

Thanks.
Issue 1:
Hi to all :)

I'm using Symfony 2.7 and I have a trouble with the Validator component.

I wrote a configuration yaml and php code to validate a Test model:

Acme\Bundle\AcmeBundle\Model\Test:
properties:
message:
- Type:
type: string
message: 'The message must be a string.'
- Length:
max: 10
maxMessage: 'The message cannot be longer than {{ limit }} characters'

$validator = $this->get('validator');

$model = new \Acme\Bundle\AcmeBundle\Model\Test();
$model
->setMessage('aaaaaaaaaaaaaaaaaaaa');

$errors = $validator->validate($model);

if ($errors->count() > 0)
{
echo 'Errors num: '. $errors->count(). "\n";
$errorMessages = array();

foreach ($errors as $error)
{
$field = $error->getPropertyPath();

if (!isset($errorMessages[$field]))
$errorMessages[$field] = [];

$errorMessages[$field][] = $error->getMessage();
}

var_dump($errorMessages);
}

The output should show an error but I'm getting the same error message twice:

Errors num: 2
array(1) {
["message"]=>
array(2) {
[0]=>
string(53) "The message cannot be longer than 10 characters"
[1]=>
string(53) "The message cannot be longer than 10 characters"
}
}

What am I doing wrong?

Issue 2:
I have a form with a collection of images. The user can re-order the images. I am using Doctrine2's Criteria for sorting the images.

public function getImages()
{
$criteria = Criteria::create()
->orderBy(array('rank' => Criteria::ASC, 'id' => Criteria::ASC));

return $this->images->matching($criteria);
}

If the form is submitted and contains an error, the images are not loaded in the order submitted by the user. FYI, I am sorting the rank as a hidden field. The user drag/drops which updates the hidden rank in the html.

I am pretty sure this was working correctly when I found it here: #8315

The Criteria class should re-order the collection using logic, rather than a query since the query has already been run.
Issue 1:
Hi,

Version: TS 1.6

module foo.bar {
export function baz(){}
};

module foo {
const a1 = bar['baz']; // foo.bar['baz']
const a2 = (<any>bar)['baz']; // foo.bar['baz']
const a3 = (bar as any)['baz']; // bar['baz']
}

The emit for a3 appears to be wrong.

Issue 2:
foo.ts

export function foo() { }

bar.ts

import { foo } from './foo';

(foo as any);

bar.js

var foo_1 = require('./foo');
foo;

(<any>foo) works correctly btw.
Issue 1:
As mentionned in the 2.1.0 new functionnalities list :

"Improved prepended and appended inputs. No need to place the input and .add-on on the same line of code (sorry about that by the way). Break them up as you like and they'll still stick together with some crafty font-size working."

http://blog.getbootstrap.com/2012/08/20/bootstrap-2-1-0-released/

Since 2.1.0 there is no more need to put the input and the .add-on on the same line to avoid displaying a space. This work correctly with Firefox, Chrome and IE, but not on Safari. I tested with Safari 4 and 5 for Windows and I still get a space between the input and the .add-on if the inuput tag and the .add-on one are on two different lines.

Issue 2:
It would be nice to see a visual representation of what is defaulted/changed to for each element you can customize. For example the @WarningBackground element that you can modify the color, it would be nice to see what that HEX code actually represented
Issue 1:
If I try and list the snapshots for a given repository 'foo' while there is a snapshot in progress, ES appears to block until the snapshot is complete:

GET http://localhost/_snapshot/foo/_all

I realize you can use the status API, but why should the GET block?

Issue 2:
This would block until current snapshot is completed. This could take a looooooooong time.

curl http://es:9200/_snapshot/<s3_storage>/_all?pretty

Happens with s3 plugin, maybe this issue belongs to it.

cc @imotov
Issue 1:
PowerToys version: v0.20.1

PowerToy module: PowerToys Run

I have made a shortcut for a folder on Desktop named Whatsapp. When I search Whatsapp in PT Run, the search results include the folder Whatsapp as an application, as in the image below.

Please fix this issue as fast as possible because sometimes, the folder Whatsapp sometimes comes as the first result and leads to open the Folder instead of the app.

Issue 2:
Summary of the new feature/enhancement

Support for multiple monitor profiles.

For example: When switching from a home office with 1 external monitor, to a commercial office with 2 different external monitors, the ability to quickly changes the monitor profiles to support each, without needing reconfiguration, would be helpful.

Proposed technical implementation details (optional)
Issue 1:
TS 1.7.0

This is valid ES6 from Mozilla but invalid TS:

function drawES6Chart({size = 'big', cords = { x: 0, y: 0 }, radius = 25} = {})
{
console.log(size, cords, radius);
// do some chart drawing
}

drawES6Chart({
cords: { x: 18, y: 30 },
radius: 30
});

To get it works, we must remove "= {}", so we can`t invoke function without arguments:

function drawES6Chart({size = 'big', cords = { x: 0, y: 0 }, radius = 25} )
{
console.log(size, cords, radius);
// do some chart drawing
}

drawES6Chart( { }) // ok
drawES6Chart() // Error

But It works with array destructuring :

function drawES6Chart( [size = "big" ,cords = { x: 0, y: 0 }, radius = 25 ] = [] )
{
console.log(size, cords, radius);
// do some chart drawing
}
drawES6Chart([]); // Ok
drawES6Chart(); // Ok

I think empty object should work with default values:

var {size = 'big', cords = { x: 0, y: 0 } } = {} // Error

Should it work with no default values ?

var {p,q } = {}

Firefox screenshoot:

Issue 2:
function foo({ x, y = {}} = { x: 0, y: {}}) {

}

foo(); // Fine
foo({ x: 0, y: 0 }); // Fine
foo({ x: 0 }); // Error

The last line should not be an error because the y property has a default initializer. The error goes away if I remove the default initializer { x: 0, y: {}} on the parent.

I think the rule would be that even if we get the type of a parameter / variable / binding element from an initializer, we still have to traverse the binding pattern to determine whether binding properties are optional.
Issue 1:
Describe the workflow you want to enable

At the moment it is possible to use nystroem only by specifying the component number. Datapoints

are then randomly chosen. I want to be able to pick my data points with other methods like K-Means++.

Describe your proposed solution

The solution would be to enable the parameter n_components to take n-dim arrays and pandas dataframes as input.

So n_components = [ ... ] with a small len(n_components) check because of the sample size.

I think this is a rather small fix to enable some nice functionality You could make a comment, that the array

has to be a subset of the data which nystroem is applied to.

Describe alternatives you've considered, if relevant

Additional context

Issue 2:
Dear developers,

I would to ask for support for the provide specific landmarks points to approximate the Nystroem kernel approximation. In the current version of the code, the points are chosen randomly. In this case it is often more convenient for the user to select them beforehand using some method and already build the approximation using this method.

Possible solution

To be presented in a separate PR
Issue 1:
I'd like to move rarely used/optional features of my application to separate chunks, so they can be loaded lazily.

I'm using require.ensure with a chunk name:

require.ensure([], function(){
require("feature-foo");
}, "feature-foo");

In the above example feature-foo.js requires other modules from all over the place, but tries to use require.ensure consistently when requiring other features from other chunks.

This works as expected only if I have one "feature" chunk. As soon as I add more chunks, many modules end up being in multiple chunks at the same time, massively increasing total size of the application. Example webpack stats have the same issue:

http://webpack.github.io/analyse/#module/119

How can I ensure that every module lives only in one chunk and that is never ever ever ever in more than one chunk?

Unfortunately, the dependency graph of my app is a ball of mud, so I can't guarantee that I don't have any circular dependencies or cross dependencies between chunks.

I'd be OK if need for a module to be in more than one chunk was a compilation error, or if the module was moved to the entry chunk, or triggered load of more chunks. Just never duplicate any code.

Issue 2:
When using next.js 10.2, im unable to successfully re-join the container code with the single runtime chunk.

I was previously able to re-merge them with a simple plugin

compiler.hooks.emit.tap(PLUGIN_NAME, (compilation) => {
const { assets } = compilation;
const assetArray = Object.keys(assets);

let runtimePath = assetArray.find((asset) => {
return asset.includes(this._options.runtime);
});
const runtime = assets[runtimePath];
let remoteEntryPath = assetArray.find((asset) => {
return asset.includes(this._options.fileName);
});
const remoteEntry = assets[remoteEntryPath];
const mergedSource = new ConcatSource(runtime, remoteEntry);
assets[remoteEntryPath] = mergedSource;
});

However, this no longer works and I get a "container does not exist" error, even when typing directly into the browser console window.remoteName will return undefined.

My idea is to try and get the runtime requirements added to the normal webpack runtime, then duplicate the asset and strip the hashed name off of it. This should give me a "normal" functioning container capable of booting and running without having to track down and load both the webpack runtime and the container.js file of the remote

@sokra, do you have any ideas around how I can force the usually code split runtime requirement back into the standard webpack runtime?
Issue 1:
I think boolean in EventEmitter parameter is an antipattern, lot of articles ara in this topic:

http://silkandspinach.net/2004/07/15/avoid-boolean-parameters/

from

new EventEmitter(false)

to

new EventEmitter({isAsync: false})

One more thing node EventEmitter is sync by default:

https://github.com/Gozala/events/blob/master/events.js

Issue 2:
Ref: #5808 #6287

Currently we're overriding the JS EventEmitter's subscribe function with a timeout, this should be removed, which will default to sync delivery. Dart Streams are async by default, and we'll need to force them to sync for this case.
Issue 1:
Basically in my twig template (if you come from Symfony2 you will know what I mean), if you have this sort of usage:

<button data-loading-text="{{ 'foo.bar.save_button.label'|trans }}" class="btn primary">{{ 'foo.bar.save_button.label'|trans }}</button>

I'm just saying that I want the "disabled" behaviour of the button, but I don't want the text to change when the button is loading. However, there is obviously a bit of duplication here in my template that I'd rather avoid to keep my line size down and typing down.

How about some sort of alternative value / attribute when you want the text to be the same?

Or, maybe what I'm really looking for is just a disabled state?

myButton.button("disabled");

Issue 2:
There's one line that uses the slide.bs.carousel event, and there are others that use slid.bs.carousel. Is this a typo? I don't know if I'm missing anything, sorry in that case!

https://github.com/twbs/bootstrap/blob/master/js/carousel.js#L106
Issue 1:
Issue Type:

Bug Report

Ansible Version:

ansible 1.6.7

Environment:

Red Hat Enterprise Linux Server release 6.5 (Santiago)

Summary:

When using the lvg module, if vg_options is not provided then Ansible will crash with a traceback.

Steps To Reproduce:

Play:

- name: Create the data LVM VG
lvg: vg=data pvs=/dev/xvda2 pesize=32

Traceback:

TASK: [partitioning | Create the data LVM VG] *********************************
failed: [testwebpost21] => {"failed": true, "parsed": false}
invalid output was: SUDO-SUCCESS-ieypxlylttyivekkfyplwlhjtktktnub
Traceback (most recent call last):
File "/home/ec2-user/.ansible/tmp/ansible-tmp-1406270471.12-134934980308379/lvg", line 1460, in <module>
main()
File "/home/ec2-user/.ansible/tmp/ansible-tmp-1406270471.12-134934980308379/lvg", line 119, in main
vgoptions = module.params.get('vg_options', '').split()
AttributeError: 'NoneType' object has no attribute 'split'

Expected Results:

I expect this play to work.

I expect not to have to provide the vg_options arg, since it is documented as optional (and appears to be optional in the source code too)

Actual Results:

Ansible crashes with a traceback - as above in the "Steps To Reproduce" section.

Known workaround:

Provide vg_options as an empty string, for example:

- name: Create the data LVM VG
lvg: vg=data pvs=/dev/xvda2 pesize=32 vg_options=""

Issue 2:
ISSUE TYPE

Bug Report

Problem Still reproducible after ansible upgrade ( duplicate from #14677)

ANSIBLE VERSION

ansible 2.2.0 (devel c9a5b1c555) last updated 2016/06/02 15:42:56 (GMT +200)
lib/ansible/modules/core: (detached HEAD ca4365b644) last updated 2016/06/02 15:43:14 (GMT +200)
lib/ansible/modules/extras: (detached HEAD b0aec50b9a) last updated 2016/06/02 15:43:15 (GMT +200)
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

Python 2.7.5 (default, Oct 11 2015, 17:47:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2

Ansible Configuration:
ansible_ssh_user: xxxx
ansible_ssh_pass: xxxxx
ansible_connection: winrm
ansible_ssh_port: 5985

CONFIGURATION

OS / ENVIRONMENT

Ansible running in RHEL 7.2

OS remote is Windows 2008R2 with powershell 4.0

SUMMARY

When delegating an action for a windows host to a linux host I get this error:

FAILED! => {"failed": true, "msg": "ssl: 500 WinRMTransport. [Errno 111] Connection refused"}

STEPS TO REPRODUCE

Try delegating an action from a windows host to a linux host:
file: main.yml
- name: 01-EsperarTermineReinicioServidor
wait_for: port=3389 host="192.168.1.10" delay=10 timeout=600 state=started
delegate_to: 127.0.0.1

EXPECTED RESULTS

ACTUAL RESULTS

FAILED! => {"failed": true, "msg": "ssl: 500 WinRMTransport. [Errno 111] Connection refused"}
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.6.5

Operating System version: xxx

Java version: xxx

问题：

排序会出现问题

com.alibaba.dubbo.common.extension.support.ActivateComparator 这个比较器在这种场景下的排序会出现问题。

现象：

扩展接口的实现类实现了多个接口，其中包括当前SPI接口，还有其它接口，如果实现类实现接口的顺序第一个不是SPI接口，则排序是错误的。

原因：

因为ActivateComparator 代码的表逻辑判定是第一个必须是SPI接口---》o1.getClass().getInterfaces()[0].isAnnotationPresent(SPI.class)。

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.

I am wondering whether you want a code static analysis tool to avoid simple mistakes in Dubbo, I saw #1513 this suggestion, and maybe a Error Prone (https://github.com/google/error-prone) from google is a good choice.

Maybe it sometimes annoys us, but it can definitely help us to eliminate some serious bug.

How do you guys think?
Issue 1:
A clear and concise description of what the bug is.

Expected results

Error msg telling that dataset already exists

Actual results

Error saving dataset Object Object

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

dataset list view in react CRUD

create dataset

try to create same dataset

See error

Environment

(please complete the following information):

superset version: superset version

python version: python --version

node.js version: node -v

npm version: npm -v

latest master

cc @nytai

Issue 2:
Evaluating superset for our BI/analytical dashboards. Could not find drill down option. My use case would be I want to show Geo wise Sales in a Pie Chart and on click of that User should redirected to another page with Country wise Sales Chart.

Do let me know if you have anything similar to that or any workaround.

Thanks

Sougata
Issue 1:
Description

A deprecation warning is thrown when using sklearn. Recently cloudpickle was updated to do away with this warning, the sklearn version needs to be updated accordingly.

Steps/Code to Reproduce

I imagine this occurs anywhere cloudpickle is imported. I am getting it from:

from sklearn.ensemble import RandomForestRegressor

and using said Regressor

Expected Results

No deprecation warning should be thrown

Actual Results

/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

import imp

Versions

System

python: 3.6.6 (default, Sep 12 2018, 18:26:19) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
executable: /usr/bin/python3.6
machine: Linux-4.15.0-36-generic-x86_64-with-Ubuntu-18.04-bionic

BLAS

macros: NO_ATLAS_INFO=1, HAVE_CBLAS=None
lib_dirs: /usr/lib/x86_64-linux-gnu
cblas_libs: cblas

Python deps

pip: 18.1
setuptools: 40.0.0
sklearn: 0.20.0
numpy: 1.15.3
scipy: 1.1.0
Cython: None
pandas: 0.23.4

Issue 2:
Description

I get this error after importing the module

/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp

Can I ignore it?

How to solve it?

Steps/Code to Reproduce

import sklearn

Expected Results

NO ISSUE

Actual Results

/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp

Versions

PLATFORM=Linux-4.15.0-34-generic-x86_64-with-Ubuntu-18.04-bionic

PYTHON=Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0]

NUMPY=NumPy 1.15.2

SCIPY= SciPy 1.1.0

SKLEARN=Scikit-Learn 0.20rc1
Issue 1:
Describe the bug

The optional field "response" of the class AxiosError<T, D> has the type AxiosResponse<T, D>. But I found it to be an XMLHttpRequest when running into a cors error. The same XMLHttpRequest is also set on the "request" field. I tried to find the code where this error is thrown but was not able to yet.

To Reproduce

Try triggering a cors error.

Expected behavior

Only the "request" field should be set with the XMLHttpRequest, the value of the "response" field should be undefined.

Environment

Axios Version 0.27.2

Adapter XHR

Browser Chrome

Browser Version 104

Additional context/Screenshots

Issue 2:
Describe the bug

When performing an axios request which is rejected with ERR_NETWORK the created AxiosError contains the request as response.

This leads to the issue that the response of the AxiosError contains the status code 200 and the body of the request although in reality no response was received.

I think the issue is that the request is passed as 5th parameter (response) of the AxiosError constructor here:

axios/lib/adapters/xhr.js

Line 119
in
bc733fe

reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request));

To Reproduce

Sample project:

sample.zip

Running the sample project with npm run test prints the following to the console:

error code: ERR_NETWORK
response status: 200
response body: {"foo":"bar"}

Expected behavior

The response field in the AxiosError created due to ERR_NETWORK should be undefined.

Environment

Axios Version 0.27.2

Adapter XHR

Browser -

Browser Version -

Node.js Version 18.0.0

OS: macOS 12.3.1

Additional Library Versions msw: ^0.39.2

Additional context/Screenshots

NA
Issue 1:

Issue 2:
NOTE :Old title was 'GLTFexporter prevent exporting duplicates of same image when used in multiple materials'

Is your feature request related to a problem? Please describe.

same images used in multiple materials exports as duplicates leading to increase in file size

Describe the solution you'd like

If same textureLoader object is used then have the exporter save the image once & have the materials refer to this single image

Additional context

Also applicable for other exporters like USDZ