WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
What problem does this feature solve?

Sorry, the following content is not translated accurately, so use Chinese.

Example

当程序中出现链式计算属性依赖时，我们可能希望的是仅当被依赖的计算属性变更时，它所依赖的计算属性才会重新去计算。而不是因为被依赖的计算属性重新计算链了，所以所有依赖它的计算属性都要重新计算。这样在链式的依赖的计算属性中，可以节省很多计算工作。

What does the proposed API look like?

仅当被依赖的计算属性变更时，它所依赖的计算属性才会重新去计算。

Issue 2:
Version

2.5.13

Reproduction link

https://jsfiddle.net/72gzmayL/

Steps to reproduce

Open the jsfiddle link, see console output.

What is expected?

Render function isn't called.

What is actually happening?

Render function is called even when nothing is changed.

This creates unnecessary render function calls, which leads to performance issues when the component is complex and render function calls aren't cheap.
Issue 1:
Uncaught Exception:

Error: EPERM, operation not permitted '/tmp/atom.sock'

at Error (native)

at Object.fs.unlinkSync (fs.js:807:18)

at AtomApplication.module.exports.AtomApplication.deleteSocketFile (/usr/share/atom/resources/app/src/browser/atom-application.js:193:21)

at AtomApplication.module.exports.AtomApplication.listenForArgumentsFromNewProcess (/usr/share/atom/resources/app/src/browser/atom-application.js:172:12)

at new AtomApplication (/usr/share/atom/resources/app/src/browser/atom-application.js:88:12)

at Socket.createAtomApplication (/usr/share/atom/resources/app/src/browser/atom-application.js:43:16)

at Socket.emit (events.js:107:17)

at net.js:436:14

at process._tickCallback (node.js:378:11)

Whenever I try to start atom, I get this error.

Running on: Archlinux 64 bit.

Atom version is 0.165.0-1

Issue 2:
When I start it from my user, it gives me this error:

A JavaScript error occured in the browser process

Uncaught Exception:
Error: EPERM, operation not permitted '/tmp/atom.sock'
at Error (native)
at Object.fs.unlinkSync (fs.js:807:18)
at AtomApplication.module.exports.AtomApplication.deleteSocketFile (/usr/share/atom/resources/app/src/browser/atom-application.js:193:21)
at AtomApplication.module.exports.AtomApplication.listenForArgumentsFromNewProcess (/usr/share/atom/resources/app/src/browser/atom-application.js:172:12)
at new AtomApplication (/usr/share/atom/resources/app/src/browser/atom-application.js:88:12)
at Socket.createAtomApplication (/usr/share/atom/resources/app/src/browser/atom-application.js:43:16)
at Socket.emit (events.js:107:17)
at net.js:436:14
at process._tickCallback (node.js:378:11)

Once I close this message, a debug tools window launches:

However, when I start it as root, it launches just fine. Except it is running as root, of course.
Issue 1:
The current implementation is frankly embarrassing.

Issue 2:
The libuv build seems to work fine, with no errors or warnings, but when the build gets to compiling Julia, I'm getting some uv issues. It's saying /usr/local/include/uv.h though, so maybe it's not using the downloaded libuv?

CC src/init.o
In file included from /usr/home/alex/repos/julia/src/init.c:22:
In file included from ./julia_internal.h:520:
In file included from /usr/local/include/libunwind.h:23:
/usr/local/include/libunwind-x86_64.h:111:9: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat]
typedef struct unw_tdep_save_loc
^
/usr/local/include/libunwind-x86_64.h:120:9: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat]
typedef struct
^
/usr/home/alex/repos/julia/src/init.c:111:9: warning: implicit declaration of function 'pthread_attr_get_np' is
invalid in C99 [-Wimplicit-function-declaration]
pthread_attr_get_np(pthread_self(), &attr);
^
/usr/home/alex/repos/julia/src/init.c:268:22: error: use of undeclared identifier 'UV_RAW_FD'
case UV_RAW_FD:
^
/usr/home/alex/repos/julia/src/init.c:269:22: error: use of undeclared identifier 'UV_RAW_HANDLE'; did you mean
'UV_HANDLE'?
case UV_RAW_HANDLE:
^~~~~~~~~~~~~
UV_HANDLE
/usr/local/include/uv.h:183:22: note: 'UV_HANDLE' declared here
UV_HANDLE_TYPE_MAP(XX)
^
/usr/home/alex/repos/julia/src/init.c:269:22: error: duplicate case value 'UV_HANDLE'
case UV_RAW_HANDLE:
^
/usr/home/alex/repos/julia/src/init.c:264:22: note: previous case defined here
case UV_HANDLE:
^
/usr/home/alex/repos/julia/src/init.c:349:72: error: use of undeclared identifier 'UV_PIPE_READABLE'; did you mean
'UV_READABLE'?
if (uv_pipe_init(jl_io_loop, (uv_pipe_t*)handle, (readable?UV_PIPE_READABLE:UV_PIPE_WRITABLE))) {
^~~~~~~~~~~~~~~~
UV_READABLE
/usr/local/include/uv.h:717:3: note: 'UV_READABLE' declared here
UV_READABLE = 1,
^
/usr/home/alex/repos/julia/src/init.c:349:89: error: use of undeclared identifier 'UV_PIPE_WRITABLE'; did you mean
'UV_WRITABLE'?
if (uv_pipe_init(jl_io_loop, (uv_pipe_t*)handle, (readable?UV_PIPE_READABLE:UV_PIPE_WRITABLE))) {
^~~~~~~~~~~~~~~~
UV_WRITABLE
/usr/local/include/uv.h:718:3: note: 'UV_WRITABLE' declared here
UV_WRITABLE = 2,
^
3 warnings and 5 errors generated.
gmake[1]: *** [Makefile:129: init.o] Error 1
gmake: *** [Makefile:90: julia-src-release] Error 2

The system is FreeBSD 11.0-release-p1 amd64. Let me know what other information is needed.
Issue 1:
TypeScript Version:

1.8.0

Code

I'm porting my ASP.NET MVC app platform (Serenity) which were using Saltaralle C# -> JS transpiler to TypeScript. Currently TS is an alternate option but hoping to make it primary soon, after resolving some issues.

Saltaralle and its predecessor Script# uses some code similar to TypeScript internal modules or namespaces. So it was natural for me to choose this model over more complicated AMD/CommonJS etc. modules, which is a bit overkill for web apps in my humble opinion. Also it is much easier to explain to novice users.

I'm using tsconfig.json with outFile option, and no "files" list, so all .ts files in all subfolders are included by default.

If you have A.ts:

namespace Some {
export class A {
}
}

and B.ts:

namespace Some {
export class B extends A {
}
}

I'd expect combined output.js file to have A defined before B, otherwise it would cause a javascript error.

But, sometimes this is true, sometimes opposite. I know that you'd suggest me to put /// references or put files in correct order in tsconfig.json files property, or use external modules, but this exactly what i'm trying to avoid. I've read among several issues reported here, and workarounds offered like these, but dependency order resolving shouldn't be the job of developer, compilers are specially made for this.

I'd handle these workarounds myself, for my own projects, but my targeted users (devs) usually don't have the skills to understand what this ordering is all about. They'll simply report a bug with details: "not working", and without looking at their output file, i can't even guess what it is really about.

I understand that in some edge cases this might be difficult, but please offer an option to perform topological sort on input files for basic cases like this, e.g. a class extends another, references it in a decorator argument etc.

Expected behavior:

I'd expect internal modules to be topologically sorted based on dependencies.

Actual behavior:

Sometimes it is not. Derived class outputted before base class.

Issue 2:
There are cases, where a property can not just be any string (or a set of strings), but needs to match a pattern.

let fontStyle: 'normal' | 'italic' = 'normal'; // already available in master
let fontColor: /^#([0-9a-f]{3}|[0-9a-f]{6})$/i = '#000'; // my suggestion

It's common practice in JavaScript to store color values in css notation, such as in the css style reflection of DOM nodes or various 3rd party libraries.

What do you think?
Issue 1:
The contrast ratio of Bootstrap's default alert boxes do not conform to WCAG 2.0 standards.

By using this tool: http://webaim.org/resources/contrastchecker/ it can be shown that both AAA and AA levels aren't met for all alert boxes (.alert, .alert-danger, .alert-error, .alert-info, .alert-success).

I have customised the alert boxes to suit my needs, however I felt I should mention my findings for your consideration.

Issue 2:
Hello,

For the AA level in WCAG2 : Using a contrast ratio of 3:1 for large text and 4,5:1 for small text and providing additional visual cues on focus for links or controls where color alone is used to identify them - http://www.w3.org/TR/2012/NOTE-WCAG20-TECHS-20120103/G183. http://www.paciellogroup.com/blog/2012/05/whats-large-text-in-wcag-2-0-parlance/

For exemple, the warning alert box have a contrast of 2,5 (background-color: #FCF8E3; color: #C09853;).

We should have at least (background-color: #FCF8E3; color: #A16B0F;).

you can use contrast-a http://www.dasplankton.de/ContrastA/ or the Juicy Studio: Colour Contrast Analyser https://addons.mozilla.org/en-US/firefox/addon/juicy-studio-accessibility-too/
Issue 1:
Hi,

I cannot find a way to define multiple tasks which executes different commands in the .vscode/tasks.json file of my project directory.

From what I understood, I can only declare a single TaskConfiguration within this file. Am I wrong?

To make my problem more understandable, let's say I would like to define 3 tasks with their own set of arguments:

foo: foo --arg

bar1: bar --arg 1

bar2: bar --arg 2

How can I make tasks.json reflect this need?

Issue 2:
var express = require('express');

var app = express();

var port = process.env.PORT || 3000;

app.listen(port);

In the following code I required express but when I enter app and press crtl + space it shows no suggestions.

It would be nice to have code assist for installed packages because nodejs developers always play with packages.
Issue 1:
Unless I am missing an existing configuration option (searched through the default settings, nothing jumped out at me), VS Code will always default to CRLF (at least on Windows).

For developers targeting cross platform (particularly with publishing packages to npm, for example) it would be nice to be able to set a user setting to default to LF instead of CRLF (or vice versa for other scenarios).

Issue 2:
twitter thread https://twitter.com/domenic/status/697921719529398272
Issue 1:
The code base seems to use lots of identifiers for private member objects or functions that start with an underscore, followed by an uppercase letter, such as IslandWindow::_ApplyWindowSize (/src/cascadia/WindowsTerminal/IslandWindow.h#L99).

The C++ standard however says:

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required. Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use.

(From https://eel.is/c++draft/lex.name#3.1)

Using such identifiers is technically an invocation of undefined behavior.

Issue 2:
Back in the XAML days and when I first learned PowerShell, I fantasized about being able to write a little control that would take some inputs and render a graphic, and then perhaps even stream into that control and have the graphic change in realtime.

Imagine a little chart printed out in the console as the result of a command. People could write little graphical widgets and package them up.

A bit like Out-Grid in PowerShell but a little rectangle graphic would pop out in the console itself on the next line. Today we have Jupyter Notebooks which are a similar idea.

I guess this could be done with SVG today?

Perhaps if SVG can be rendered inline within a bounding rect and if the SVG source markup can be referenced and updated and then dynamically the UI redraws, then people will figure out a way to build up the pieces from other stuff already out there.

Or perhaps printing bitmap/rasters into the console is all that's needed, so long as the source bitmap can be dynamically updated (to animate it), and then the vector rasterization part is something pluggable in the pipeline before it.
Issue 1:
The Code of Conduct link at the following node is a deadend:

https://github.com/numpy/numpy/blob/v1.19.0/.github/CODE_OF_CONDUCT.md

Issue 2:
Documentation

Not sure where to file this. The github template for the Code Of Conduct https://github.com/numpy/numpy/blob/master/.github/CODE_OF_CONDUCT.md (https://github.com/numpy/numpy/blame/master/.github/CODE_OF_CONDUCT.md#L1) refers to an address that 404s, namely

https://www.numpy.org/devdocs/dev/conduct/code_of_conduct.html, not sure if this an issue with the URL or the place to which it points.
Issue 1:
Describe the workflow you want to enable

I want to use a pipleine that includes

a feature selection step (like SelectKBest)

a HistGradientBoostingEstimator with monotonicity and/or categorical features

The problem is that specifying the features for this requires indices or a boolean mask, but the feature selection means the mask/indices will be off.

You can do this with a custom class/FunctionTransformer, and you can do it without a pipeline, but it would be nicer to have it in a pipeline.

Describe your proposed solution

Allow specifying categorical features or monotonicity constraints via feature names.

Describe alternatives you've considered, if relevant

A custom class

Not using a pipeline

Additional context

No response

Issue 2:
Describe the workflow you want to enable

As of current version, we need to specify monotonicity constraints for each feature as an array-like object ( e.g. [0,1,1] ) in HistGradientBoostingClassifier/Regressor. It would be a good quality of life improvement if we can specify the constraint as dict (e.g. {"feature_name1":0, "feature_name2":1 ...}) if the input X is a dataframe.

References:

https://scikit-learn.org/stable/modules/ensemble.html#monotonic-cst-gbdt

https://scikit-learn.org/stable/auto_examples/ensemble/plot_monotonic_constraints.html

https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier

Describe your proposed solution

Make the following changes inside fit function for HistGradientBoostingClassifier/Regressor:

Change input type for monotonic_cst to array-like or dict.

If constraint is specified as a dict, add a validation check for verifying if X is a dataframe with string column names.

Iterate through column names in X, add constraint if specified in the dict to array-like object or add default value if no constraint is specified explicitly. Return array-like object in place of original dict.

Describe alternatives you've considered, if relevant

No response

Additional context

No response
Issue 1:
If you set the facecolor of a patch with an alpha value, e.g.

facecolor=(1,0,0,0.5)

the alpha value is ignored; only the patch's _alpha property is used. This makes it impossible to have a patch with an opaque edge and a (partially) transparent fill.

I've only tested this on the TkAgg backend.

Issue 2:
Bug report

duplicate pick events occurring in 3.4.rc1

In MNE-Python, our CIs that test against 3.4.rc1 are failing, because pick events are getting fired twice for every time an artist is picked (this is not happening on 3.3.4). It's happening in a very complicated interactive figure, and I haven't yet managed to work up an MWE that doesn't depend on MNE-Python. But, I've used git bisect to isolate the first test failure to matplotlib commit 6d79e6e. I will continue trying to further isolate this, but in the meantime if anyone is familiar with MPL changes in the last 4 months, I'd be happy to hear ideas about what might be going on here.

Code for reproduction

This code mirrors what we're doing but is too minimal, in that it doesn't yield doubled pick events:

import matplotlib.pyplot as plt
from matplotlib.text import Text

def pick_handler(event):
if isinstance(event.artist, Text):
print("PICKED")

fig, ax = plt.subplots()
_ = ax.plot((0, 1), (0, 1))
for lab in ax.get_yticklabels():
lab.set_picker(True)

fig.canvas.mpl_connect('pick_event', pick_handler)

This code reproduces, but with mne dependency:

import numpy as np
import matplotlib.pyplot as plt
import mne
# make fake data
data = np.random.standard_normal((2, 100))
info = mne.create_info(['ch1', 'ch2'], 1000)
raw = mne.io.RawArray(data, info)
# plot it
fig = raw.plot()

In the resulting figure, clicking on one of the yticklabels (the channel names) is supposed to mark the channel as bad (which among other effects, will turn it light grey). This doesn't happen because the pick event is fired twice, effectively marking and then unmarking the bad channel before a redraw can happen (I have confirmed this by simply inserting a print statement in the pick handler; it prints twice for each click). There is nothing wrong with the code that marks bad channels; you can do it by clicking on the channel trace itself (which responds to button_press_event instead of pick_event, for complicated reasons).

Matplotlib version

Operating system:

Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.3.2.post1516+g6d79e6edd

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

Python version: 3.8.8

Jupyter version (if applicable):

Other libraries: mne: current main (0.23.dev0)

matplotlib installed via pip install -e . from a git clone.
Issue 1:
Test case. Fails for score_func=f_classif as well.

# Fixed already, I had an old .11-git release
import numpy as np
from sklearn.feature_selection import *
X = np.array([[-0.35407973, -0.73858161, -1.21871862, 0.01362241, -0.3565459 ],
[-2.92151461, -0.64259241, -0.43849487, 1.01860028, -0.84427892],
[-0.83171833, -0.0852727 , -1.89007728, -1.31564981, 0.1420426 ],
[-0.62100712, 0.86350539, -0.49176233, -0.51831504, 1.98832398],
[ 1.2643767 , 0.33973403, -0.82126126, -0.08305002, -0.4985046 ]])

y = np.array([-0.17966557, -0.19387233, 1.77140599, 0.78315866, -1.40862817])

transformer = SelectKBest(score_func=chi2, k=3)
transformer.fit(X, y)
transformer.transform(X).shape[1]
assert transformer.transform(X).shape[1] == 3

import numpy as np
from sklearn.feature_selection import *
X = np.array([[-0.35407973, -0.73858161, -1.21871862, 0.01362241, -0.3565459 ],
[-2.92151461, -0.64259241, -0.43849487, 1.01860028, -0.84427892],
[-0.83171833, -0.0852727 , -1.89007728, -1.31564981, 0.1420426 ],
[-0.62100712, 0.86350539, -0.49176233, -0.51831504, 1.98832398],
[ 1.2643767 , 0.33973403, -0.82126126, -0.08305002, -0.4985046 ]])

y = np.array([-0.17966557, -0.19387233, 1.77140599, 0.78315866, -1.40862817])

transformer = SelectPercentile(score_func=chi2, percentile=60)
transformer.fit(X, y)
transformer.transform(X).shape[1]
assert transformer.transform(X).shape[1] == 3

Issue 2:
error: Command "aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/nvidia/.local/lib/python3.5/site-packages/numpy/core/include -I/home/nvidia/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c sklearn/neighbors/quad_tree.c -o build/temp.linux-aarch64-3.5/sklearn/neighbors/quad_tree.o -MMD -MF build/temp.linux-aarch64-3.5/sklearn/neighbors/quad_tree.o.d" failed with exit status 1
Issue 1:
by mdriley:

307 means "try the same verb on this new URL".

Client allows callers to define a redirect policy (CheckRedirect) for whether a given
HTTP redirect should or shouldn't be followed. However, Client.Do() passes an additional
policy to doFollowingRedirects() for GET, HEAD, PUT, and POST that is called before
CheckRedirect. For PUT and POST, that policy only redirects on 302 and 303. Further,
doFollowingRedirects() explicitly changes the verb from POST or PUT to GET on redirect.
As a result, the API provides no way for callers to follow a 307 redirect and keep the
verb.

I imagine the code was written not to follow these redirects because the spec for this
case says "the user agent MUST NOT automatically redirect the request unless it can
be confirmed by the user". The API should allow the CheckRedirect policy to say
such redirects are okay.

wget and curl both support these redirects.

Issue 2:
Running gc for go 1.0.3.

In this code
http://play.golang.org/p/ePVOi7HdkD

the compiler gives a syntax error of "prog.go:7: syntax error: unexpected name,
expecting semicolon or newline or }", but in the code given, the actual problem is
that there is a comma missing between the integer and the error return values. Might be
worth adding as a possible case.
Issue 1:
OpenCV => 4.2

Operating System / Platform => Windows 64 Bit

opencv-contrib-python 4.2.0.34

opencv-python 4.2.0.34

Detailed description

Video is 06.933 sec long with 25 FPS, what makes 173 frames (observed in video player)

However :

cap = cv2.VideoCapture(video_path)
cap.get(cv2.CAP_PROP_FRAME_COUNT)

gives 172 frames. And while counting manual:

while(cap.isOpened()):
ret, frame = cap.read()
if ret == True:
frame_index += 1
else:
break

it can't go any further than 168 frame

Sadly I can't share the video file

Issue 2:
System information (version)

OpenCV => tag 4.1.0

Operating System / Platform => ubuntu 16.04 x64

Compiler => gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)

Detailed description

i have installed llvm/halide, and build opencv with halide support (with debug version).

i use the source code exactly the same as https://docs.opencv.org/3.3.1/de/d37/tutorial_dnn_halide.html

and download the files from https://raw.githubusercontent.com/DeepScale/SqueezeNet/master/SqueezeNet_v1.1/train_val.prototxt and https://github.com/DeepScale/SqueezeNet/raw/master/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel

Steps to reproduce

just to run the application compiled from the above source code, it crashes. And so gdb it to get the bt:

...

#4 0x00007ffff5a66701 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

#5 0x00007ffff5a66919 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

#6 0x00007ffff5f6af51 in cv::error (exc=...) at /work/media/opencv_work/opencv/modules/core/src/system.cpp:1032

#7 0x00007ffff5f6b01e in cv::error (_code=-5, _err="Duplicate blobs produced by multiple sources", _func=0x7ffff7a35c10 <cv::dnn::dnn

4_v20190122::(anonymous namespace)::CaffeImporter::addOutput(opencv_caffe::LayerParameter const&, int, int)::func> "addOutput", _file=0x7ffff7a35470 "/work/media/opencv_work/opencv/modules/dnn/src/caffe/caffe_importer.cpp", _line=427) at /work/media/opencv_work/opencv/modules/core/src/system.cpp:1044

#8 0x00007ffff7786f9f in cv::dnn::dnn4_v20190122::(anonymous namespace)::CaffeImporter::addOutput (this=0x7fffffffdd10, layer=..., layerId=2, outNum=0) at /work/media/opencv_work/opencv/modules/dnn/src/caffe/caffe_importer.cpp:427

#9 0x00007ffff7786ae2 in cv::dnn::dnn4_v20190122::(anonymous namespace)::CaffeImporter::populateNet (this=0x7fffffffdd10, dstNet=...)

at /work/media/opencv_work/opencv/modules/dnn/src/caffe/caffe_importer.cpp:402

#10 0x00007ffff77872e9 in cv::dnn::dnn4_v20190122::readNetFromCaffe (prototxt="train_val.prototxt", caffeModel="squeezenet_v1.1.caffemodel") at /work/media/opencv_work/opencv/modules/dnn/src/caffe/caffe_importer.cpp:458

#11 0x0000000000404c22 in main (argc=1, argv=0x7fffffffe1f8) at /work/media/opencv_work/halide_try/classprob.cpp:43