WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Electron version: 0.37.2 + 0.36.12

Operating system: OS X 10.11.4 (15E65)

The process doesn't seem to exit like node does. I've reduced it to something babel-register is doing. I'm not sure if this is a bug within babel or electron, so feel free to close this if it's a bug with babel. It's the same behavior on both 0.37.2 and 0.36.12.

# works properly, does nothing and exits
node -e "require('babel-register')"

# hangs forever until you ctrl+c
ELECTRON_RUN_AS_NODE=true node_modules/.bin/electron -e "require('babel-register')"

A complete test:

mkdir electron-node-hang
cd electron-node-hang
npm init -y
npm install electron-prebuilt babel-register --save
ELECTRON_RUN_AS_NODE=true node_modules/.bin/electron -e "require('babel-register')"

Issue 2:
Description

Our project is using child_process#fork() to run npm commands, but it turns out taking much longer time than normal.

I haven't tested if this problem occurs when running other scripts, but as shown in the test below, running the same code in pure node behaves normally.

Reproduction

In a new folder, clone an empty app: git clone https://github.com/atom/electron-quick-start

cd into that directory and install npm locally: npm i npm

Open this app: electron .

In the console, run the following code

var npmpath=require('path').join(__dirname,'node_modules','.bin','npm');
var startTime=new Date().getTime();
var cp=require('child_process');
var child = cp.fork(npmpath,['dist-tag','ls','npm'],{stdio:'pipe',silent:true});
child.stdout.on('data', function(data) {
console.log('stdout: ' + data);
});
child.stderr.on('data', function(data) {
console.log('stdout: ' + data);
});
child.on('close', function(code) {
console.log('closing code: ' + code);
console.log('time: ' + (new Date().getTime()-startTime));
});

On my computer it takes about 36 seconds,

On the other hand, to test it in pure node,

Save the script above in the root directory of the same app as run.js

node run.js

On my computer it takes about 1.2 seconds, which is about the same as directly running this command in command line.

Platform

node 5.1.1

Chrome 47.0.2526.110

Electron 0.36.5

OS X 10.11.3
Issue 1:
Long pages such as in regex have many examples but it's difficult to know at a glance what the documentation contains without scanning the entire document. Having a table of contents would help a lot with this.

Here is a list of links to different TOC styles from various places for ways it could be done:

Python 2.7 has one in the sidebar. Stays with you as you scroll.

Python 3.5 seems to be slightly cleaner but similar. Doesn't stay with you.

mozilla javascript docs: is nicely in the sidebar. Follows you down the page (requires the window to be wide enough).

wikipedia: in the middle of the page. Doesn't scroll with you.

gitbook: stays with you. provides scrolling.

perl: looks like it's formatted like a man page.

I looked for some more but didn't find other good examples.

Of these, I like the mozilla, python 2, and gitbook TOCs best with the mozilla probably the best among them (probably because it's small and clean). However, I think the gitbook style is probably the most appropriate fit to the std libs style.

I've also provided a mockups of what a TOC could look like in that style which is similar to a different thread. Clearly, something would need to be done with the current sidebar to use this format.

Mockup:

Issue 2:
Here's a minimal code example that reproduces the error:

#![crate_name = "test"]
#![crate_type = "dylib"]

use std::ops::Div;

pub struct Test
{
pub test:i32,
}

impl Div<Test,Test> for Test { fn div( &self, v:&Test ) -> Test { Test{ test:self.test / v.test } } }

And part of the error:

note: D:\#dev\#compilers\Rust\bin\rustlib\i686-pc-windows-gnu\lib\libcore-4e7c5e5c.rlib(core-4e7c5e5c.o):(.text+0x6b9b): undefined reference to `rust_begin_unwind'

Version:

rustc 0.13.0-nightly (45cbdec41 2014-11-07 00:02:18 +0000)
binary: rustc
commit-hash: 45cbdec4174778bf915f17561ef971c068a7fcbc
commit-date: 2014-11-07 00:02:18 +0000
host: i686-pc-windows-gnu
release: 0.13.0-nightly

This also happens on the x86_64 nightly
Issue 1:
System info

Playwright Version: 1.31.2

Operating System: Ubuntu 22.04

Browser: WebKit

Source code

import { test } from '@playwright/test';

test('getByRole behaviour', async ({ page }) => {
await page.setContent(`
<html>
<body>
<my-dialog>
<button>dont click me</button>
</my-dialog>
<button>click me instead</button>
<script type="module">
class MyDialog extends HTMLElement {
connectedCallback() {
this.attachShadow({mode: 'open'});
this.shadowRoot.innerHTML = 'we dont add a slot here so the light dom is not visible'
}
}
customElements.define('my-dialog', MyDialog);
</script>
</body>
</html>
`);

// chrome finds 1 element, because only one is actually available to the user
// webkit finds 2 elements, so strict validation fails only in webkit
await page.getByRole('button').click();

// finds 2 elements, because there are two elements in the dom
// strict validation fails in all browsers, as expected
// await page.locator('button').click();
});

Config file is the default npm init playwright@latest, strict mode enabled.

Steps

Run the test in chrome and firefox, it works

Run the test in webkit and the click fails strict validation

Expected

All browsers behave the same, ideally the test should pass for all browsers.

Actual

WebKit seems to keep light-dom elements in the accessibility tree, even if they have no slot in the corresponding shadow-root. This causes getByRole to find more than one element to click on the page.

I am really not sure if this is a playwright issue, a playwright-webkit issues, or a webkit issue. I'd be perfectly happy with filing the issue somewhere else if we find this to be the wrong place.

Edit: Whoops, my copy pasta had an accidential display: none on the button, I removed that with an edit

Issue 2:
System info

Playwright Version: [v1.XX]

Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]

Browser: [All, Chromium, Firefox, WebKit]

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

[https://github.com/your_profile/playwright_issue_title]

or

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
await page.getByRole('checkbox').check();
await expect(page.getByRole('checkbox')).toBeChecked();
});

Steps

[Run the test]

[...]

Expected

[Describe expected behavior]

Actual

[Describe actual behavior]
Issue 1:
System information (version)

OpenCV => 4.1.0-dev

Operating System / Platform => Ubuntu x64 bionic 18.04.1

Compiler => gcc 8.0.1

Hello, There is a bug with dot product dot (InputArray m) const when used in c++ implementation, But strangely this bug is not present in python implementation.

Detailed description

Check following python code:

Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> a = np.zeros((5, 5),np.float32)
>>> b = np.ones((5,1),np.float32)
>>> a.dot(b)
array([[0.],
[0.],
[0.],
[0.],
[0.]], dtype=float32)

which works as expected.

But when I tried to implement the same code in C++, it throws the following error everytime regardless of the case:

abhishek@abhishek-HP-Pavilion-Notebook:~/testing$ ./test
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.1-dev) /home/abhishek/Downloads/opencv-master/modules/core/src/matmul.cpp:3274: error: (-215:Assertion failed) mat.size == size in function 'dot'

Aborted (core dumped)

Steps to reproduce

The code I'm using for c++ is as below:

#include <opencv2/opencv.hpp>
#include <iostream>
#include <cassert>
#include <fstream>

int main(){
cv::Mat a = cv::Mat::ones(5,5, CV_32F);
cv::Mat b = cv::Mat::ones(5,1, CV_32F);
cout << a.dot(b) << endl ;
return 0;
}

Issue 2:
System information (version)

OpenCV => 4.0.1, master branch e2dbf05

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2017

Detailed description

The compilation of the DNN module fails with several error C2398, e.g. due to the narrowing at line 106 in op_inf_engine.cpp

netBuilder.connect(inpId, {layerId, i});

possible fix

netBuilder.connect(inpId, { static_castInferenceEngine::idx_t(layerId), static_castInferenceEngine::idx_t(i)});

Affected files are

convolution_layer.cpp

pooling_layer.cpp

op_inf_engine.cpp
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/859 on 2008-07-24 by @cournape, assigned to @cournape.

Detected under valgrind, and looking at the code, it looks like there is a problem, but I don't know enough about that code to solve it quickly:

Tests compress2d==5148==
==5148== Conditional jump or move depends on uninitialised value(s)
==5148== at 0x4636A27: PyArray_MapIterReset (arrayobject.c:10242)
==5148== by 0x466B511: array_subscript (arrayobject.c:2549)
==5148== by 0x466C07B: array_subscript_nice (arrayobject.c:3173)
==5148== by 0x80C7235: PyEval_EvalFrameEx (ceval.c:1193)
==5148== by 0x80CB0D6: PyEval_EvalCodeEx (ceval.c:2836)
==5148== by 0x80C92DD: PyEval_EvalFrameEx (ceval.c:3669)
==5148== by 0x80C95C4: PyEval_EvalFrameEx (ceval.c:3659)
==5148== by 0x80CB0D6: PyEval_EvalCodeEx (ceval.c:2836)
==5148== by 0x81133BA: function_call (funcobject.c:517)
==5148== by 0x805CB36: PyObject_Call (abstract.c:1861)
==5148== by 0x80C7CE3: PyEval_EvalFrameEx (ceval.c:3853)
==5148== by 0x80CB0D6: PyEval_EvalCodeEx (ceval.c:2836)

The problem is inside the macro PyArrayIter_GOTO: some items of the argument destination are accessed without having been set previously (when they are swapped with the copyswap function).

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/333 on 2006-10-11 by @FrancescAlted, assigned to unknown.

The next exposes the problem:

In [142]:dt1=numpy.dtype('i4')
In [143]:numpy.array(0, dtype=dt1.type)
Out[143]:array(0)
# good, but
In [144]:dt2=numpy.dtype(('i4',(2,)))
In [145]:numpy.array(0, dtype=dt2.type)
---------------------------------------------------------------------------
exceptions.MemoryError Traceback (most recent call last)

/home/faltet/python.nobackup/numpy/<ipython console>

MemoryError:

Moreover:

In [147]:numpy.array([0], dtype=dt1.type)
Out[147]:array([0])
# good, but
In [148]:numpy.array([0], dtype=dt2.type)
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent call last)

/home/faltet/python.nobackup/numpy/<ipython console>

TypeError: expected a readable buffer object

I'd say that the .type is an scalar type that should be independent of the shape of the base dtype.
Issue 1:

Issue 2:
Bug report

Something now breaks this code that used to work. Now, I have to call plt.subplots first and use stackplot on an axis object.

TypeError: stackplot() got multiple values for argument 'x'

from matplotlib import pyplot as plt
plt.stackplot([1,2,3], [1,2,3])

Should be equivalent to

fig, ax = plt.subplots()
ax.stackplot([1,2,3], [1,2,3])

Matplotlib version

Operating system:

Matplotlib version: 3.0.0

Matplotlib backend (print(matplotlib.get_backend())): 'module://ipykernel.pylab.backend_inline'

Python version: 3.6.6

Jupyter version (if applicable): 4.4.0

Other libraries:

Installed matplotlib using conda with default channel.
Issue 1:
Again from the paypal/bootstrap-accessibility-plugin, these changes should be added to the documentation and the JS plugin.

Tab Panel

Add ARIA roles like tablist, presentation, and tab for tabs UL, LI.

Add tabIndex, aria-expanded, aria-selected, aria-controls for tab.

Add ARIA roles of tabpanel, tabIndex, aria-hidden, and aria-labelledBy for tabPanel.

Add keydown event listener for the tab to work with keyboard.

Dynamically flip tabIndex, aria-selected, and aria-expanded for tab when it is activated and add aria-hidden to hide the previously visible tab.

Issue 2:
Please see following demo image, when text is too short, popover's arrow should be correctly adjusted to point to the center of the label.

image

http://cl.ly/image/0W38012y3K1H

I've created a simple fix for that, but it's doing from outside of the plugin, would be great if it's integrated into the plugin itself, please see it here:

sample code

https://gist.github.com/coodoo/5667953
Issue 1:
Environment

Microsoft Windows [Version 10.0.18362.418]

Steps to reproduce

Open windows terminal and move it with cursor to a new screen in a dual screen setup. Specifically from a 4k to 1080p monitor.

Expected behavior

The windows terminal window should move to the other screen.

Actual behavior

The window when moved to the other screen freezes and then crashes.

Note: It works if the windows terminal window starts and is maximised on the first monitor and then is win+shift+arrowed to the other monitor. No crash but if it is not maximized and either moved by way of win+shift+arrows OR cursor drag then it crashes.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.418]
Windows Terminal version (if applicable): 0.6.2951.0

Steps to reproduce

Open Windows Terminal with "only one tab open"

Drag to another monitor with a lower resolution (from 2160p to 1080p)

Expected behavior

Terminal is dragged onto another monitor

Actual behavior

It crashes.

Funny thing: The terminal doesn't crash when I have more than one tab open.
Issue 1:
TypeScript Version:

1.8.9

React.__spread has been deprecated for a while, and has been removed in 15.0.

(facebook/react@a142fd2)

When upgrading a typescript project to React 0.15, an error is shown that React.__spread is not defined when using spread props.

It looks like it'll be turned into a warning instead soon(facebook/react@fc1cfb6), but it's advisable to migrate tsx transformations from using React.__spread to using Object.assign

Issue 2:
TypeScript Version:

1.8.10

Node version :v4.2.2

OS: OSX

Code

Main.ts

/// <reference path="./typings/node/node.d.ts"/>

import * as http from 'http';

namespace Scratch
{
export class ServerWrapper {

public constructor() {
this.server = http.createServer();
}

public Start(handler :(request :http.ClientRequest, response :http.ClientResponse)=>void) :void {
this.server.listen(handler);
}

private server : http.Server;
}
var s = new Scratch.ServerWrapper();
s.Start((req,res)=>{});
}

Compile with

tsc ./Main.ts --outFile /dev/stdout

Expected behavior: (what is emitted as Main.js when --outFile is not specified)

"use strict";
var http = require('http');
var Scratch;
(function (Scratch) {
var ServerWrapper = (function () {
function ServerWrapper() {
this.server = http.createServer();
}
ServerWrapper.prototype.Start = function (handler) {
this.server.listen(handler);
};
return ServerWrapper;
}());
Scratch.ServerWrapper = ServerWrapper;
var s = new Scratch.ServerWrapper();
s.Start(function (req, res) { });
})(Scratch || (Scratch = {}));

Actual behavior:

/// <reference path="./typings/node/node.d.ts"/>
Issue 1:
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

A plain element attribute (no syntax sugar) containing a number value is being bound to the component as a string value.

Expected behavior

The attribute would be converted to the data type of the input variable it's being bound to... or at the very least the compiler would warn me of the data-type mismatch.

Reproduction of the problem

Create a component with the following property that uses the Input decorator:

@Input('maxlength') public maxLength: number;

Use the custom component somewhere like so:

<custom-component maxlength="250"></custom-component>

Note that the "maxLength" property in the JavaScript code contains a string value despite being defined as a number data type.

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

I want to be able to use a strict equals (===) to compare "maxLength" to "length", but that doesn't work if "maxLength" is a string and "length" is a number.

Please tell us about your environment:

Windows 8.1, Visual Studio 2015, npm, IIS Express 10

Angular version: 2.0.0

Browser: Chrome 52.0.2743.116

Language: TypeScript 1.8.10

Node (for AoT issues): node --version = using JIT, not AoT

Issue 2:
When building reusable components, using boolean properties, such as checked, disabled, readonly, etc., is extremely common. This ends up looking like this:

class CoolCheckbox {
private _checked: boolean;

@Input()
get checked() {
return this._checked;
}

set checked(v: boolean) {
// Is "checked" if *any* value is present other than `false` or `"false"`.
this._checked = value != null && `${value}` !== 'false';
}
}

This is a lot of boilerplate to create a simple boolean bound property, and something that needs to be done for every boolean @Input. The same problem also applies to number inputs.

A simple approach for TypeScript users might be to create their own decorator, something like

@Input() @BooleanField() checked: boolean;

Unfortunately, this is incompatible with using the offline-compiler, as the presence of user-defined decorators prevents tree-shaking. As such, this seems to be something that should really be built into the framework itself. This could look something like:

class CoolCheckbox {
@BooleanInput() checked: boolean;
}

@pkozlowski-opensource has encountered the same friction for ngBootstrap.

cc @tbosch @mhevery
Issue 1:
Original report at SourceForge, opened Fri Feb 11 22:02:28 2011

One of the annoying things about axes.hist is that with histtype='step' the automatic legend style is an empty box, instead of a line, as I would expect. This behaviour doesn't seem to make sense, because it seems a line would be much more appropriate for this case. Example code to demonstrate this:

import matplotlib.pyplot as plt

plt.hist([0,1,1,2,2,2], [0,1,2,3], histtype='step', label="histtype='step'")

plt.legend()

plt.show()

With the current uncustomisability of legend styles one can get around this by using proxy Line2D objects in building the legend, but this can be a common operation and becomes messy and annoying.

The cause of this is the fact that in axes.py::7799 (current SVN head), in axes.hist, patch objects are always created, even for the line-based step style. I searched the tracker, and couldn't find this mentioned before.

Attached is a patch that makes the very simple change of swapping out the call to .fill for .plot (only the function is changed here, not yet the documentation), and it appears to work but I haven't tested exhaustively.

Is this intended behaviour, that I am just not understanding the requirement for?

This will cause the return signature to possibly include Line2D's, instead of just patches. Will this break anything?

Thoughts?

SourceForge History

On Fri Feb 11 22:02:28 2011, by ndevenish: File Added: 401440: histtype_plot.patch

Issue 2:
Bug report

Bug summary

Code for reproduction

# Paste your code here
#
#

Actual outcome

# If applicable, paste the console output here
#
#

Expected outcome

Matplotlib version

Operating system:

Matplotlib version:

Matplotlib backend (print(matplotlib.get_backend())):

Python version:

Jupyter version (if applicable):

Other libraries:
Issue 1:
The generated code for

type NameOrNameArray = string | string[];

function createName(name) {
if (typeof name === "string") {
return name;
} else if (typeof name == 'number') {
return name.toString();
} else {
return name.join(" ");
}
}

var greetingMessage = `Greetings, ${createName(3213) }`;
alert(greetingMessage);

is

function createName(name) {
if (typeof name === "string") {
return name;
}
else if (typeof name == 'number') {
return name.toString();
}
else {
return name.join(" ");
}
}

the else after } should not newline.

Issue 2:
I know many users of TypeScript are from a C# background and expect to write conditionals like in that language. However, for JavaScript developers the standard for formatting conditionals is different. When TypeScript converts conditionals to JavaScript, it outputs the else and else if statements like so:

}
else if(whatever) {
}
else {
}

The normal JavaScript format is:

} else if (whatever) {
} else {
}

Most teams have coding rules and code review mechanisms in place to make sure these conventions are followed. For a reference on standard JavaScript formatting conventions, please consult Douglas Crockford's guide: http://javascript.crockford.com/code.html. About half way down you'll find the convention for conditionals.

At very least it would be nice to have a flag that we could set to get the expected formatting instead of the C/C# style you are currently producing.
Issue 1:
does not validate with swagger-tools CLI tool: https://github.com/apigee-127/swagger-tools/blob/master/docs/CLI.md#validate

Issue 2:
After #18126 fixed by #18170, I run density test again.

Now the hot spot on the critical path is an inefficient cache access(https://github.com/kubernetes/kubernetes/blob/master/pkg/client/cache/store.go#L75) when listing nodes that uses reflection. Reflection causes a lot of allocations.

A simple fix would be

func NodeKeyFunc(obj interface{}) (string, error) {
key, ok := obj.(*api.Node)
if !ok {
return "", fmt.Errorf("not *api.Node type")
}
meta := key.ObjectMeta
if len(meta.Namespace) > 0 {
return meta.Namespace + "/" + meta.Name, nil
}
return meta.Name, nil
}

The simple fix improves the throughput of scheduler by 15%-20% on 1000 nodes case.

@lavalamp What do you think about this issue?

/cc @hongchaodeng @wojtek-t @gmarek @davidopp
Issue 1:
Describe the workflow you want to enable

Current score_func for feature selection methods does not consider multicollinearity between features.

Describe your proposed solution

Introduce mRMR (Minimum Redundancy and Maximum Relevance) score as score_func for feature selection methods.

Variant of mRMR scores in a nutshell:

MID: Mutual Information to target - Mutual Information between features

MIQ: Mutual Information to target / Mutual Information between features

FCD: F Statistic to target - Correlation between features

FCQ: F Statistic to target / Correlation between features

From what I understand Mutual Information and F Statistic already implemented as score_func in scikit-learn, so these mRmR scores are somewhat an extension of it.

Issue 2:
Speaking with @jorisvandenbossche IRL, we come to discuss about the mRMR feature selection among other methods.

#5372 intended at first to implement the mRMR with mutual information as a metric. However, it has been merged such that mutual information could be used in the SelectKBest class. It was also discuss that the mRMR mechanism could be implemented in a separate PR with the possibility to plug any metric.

Therefore, I was wondering if scikit-learn will be interested to have this transformer to perform feature selection.

I would be interested to know the different opinions

@agramfort @MechCoder @jnothman @GaelVaroquaux @amueller @jorisvandenbossche
Issue 1:
Became important when you extend, for example, DefaultValueAccessor to work with ng-model

and see a list of errors:

ERROR in ./rating/rating.ts
(50,5): Supplied parameters do not match any signature of call target. (2346)

ERROR in ./timepicker/timepicker.ts
(151,5): Supplied parameters do not match any signature of call target. (2346)
...

I was trying to do it my self but, but constructor type parameters are come as string, not parsed, to dgeni templates

Issue 2:
Dgeni should output public constructors in our .d.ts files