WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I am aware try-catch is emitted in 'for of' for some compatibility reason; however, it can be a surprising performance-hit on eg V8. Is there a way to suppress its emission (at the cost of some compatibility)?

Issue 2:
💻

Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

({
__proto__: a,
__proto__: a,
a: a = 1
})

REPL

Configuration file name

No response

Configuration

N. A.

Current and expected behavior

Currently Babel parses it without errors.

It should throw

Redefinition of __proto__ property.

just like Babel correctly throws in the following example:

({
__proto__: a,
__proto__: a,
})

Environment

REPL

Possible solution

This issue is very similar to #10262.

Like how we handle shorthandAssign

babel/packages/babel-parser/src/parser/expression.js

Lines 317 to 319
in
7250d25

if (refExpressionErrors.shorthandAssign >= node.left.start) {

refExpressionErrors.shorthandAssign = -1; // reset because shorthand default was used correctly

}

we should reset doubleProto only when it is used correctly.

babel/packages/babel-parser/src/parser/expression.js

Line 312
in
7250d25

refExpressionErrors.doubleProto = -1; // reset because double __proto__ is valid in assignment expression

Additional context

No response
Issue 1:
With Julia 0.4.0-dev, the input "a" "b" in the REPL leads to the output "a" instead of a string concatenation or an error. The second string "b" is silently discarded.

Issue 2:
I would suggest that new syntax "a..b" represents "[a, a+1, a+2, ... , b]".

The followings should then become true:

"1..5" represents "[1, 2, 3, 4, 5]".

"reverse(1..5)" represents "[5, 4, 3, 2, 1]".

"1..99[1:2:end]" represents "[1, 3, 5, 7, ..., 99]".

Related issue: #3737
Issue 1:
Feature

As the subject says it will be great if np.fill_diagonal had a k-ith diagonal argument as np.diag does. The behavior expected (and a hack for the solution) is better explained in the following StackOverflow question by me

Expected behaviour

>>> u = np.zeros(25).reshape(5, 5)
>>> u
array([[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.]])
>>> np.fill_diagonal(u, 1, k=1)
>>> u
array([[0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0.],
[0., 0., 0., 1., 0.],
[0., 0., 0., 0., 1.],
[0., 0., 0., 0., 0.]])

Current solution

>>> u = np.zeros(25).reshape(5, 5)
>>> u
array([[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.]])
>>> u[np.eye(len(u), k=1, dtype='bool')] = 1
>>> u
array([[0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0.],
[0., 0., 0., 1., 0.],
[0., 0., 0., 0., 1.],
[0., 0., 0., 0., 0.]])

Why this syntax?

This is already intuitive as np.diag use the same syntax. For example:

>>> u
array([[0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0.],
[0., 0., 0., 1., 0.],
[0., 0., 0., 0., 1.],
[0., 0., 0., 0., 0.]])
>>> np.diag(u, k=1)
array([1., 1., 1., 1.])

Unfortunately, as np.diag is a function, one cannot assign a value like np.diag(u, k=1) = 1. That's why implementing the k argument on np.fill_diagonal should be desired.

I want to take this issue and make a PR. Just want to discuss it before to better implement it and document it.

Issue 2:
It would be really nice if np.fill_diagonal could fill other diagonals besides the main diagonal. This would match the offset argument of np.diagonal.

Shouldn't require much code to allow this.
Issue 1:
I tried to solve the eigenvalues and eigenvectors of a Hermitian matrix, the code used to work nicely and still works in Cocalc, but not on my windows 10 (the system got some updates) now, and the error is very confusing, I can not figure out what is happening now, maybe someone also has a similar issue.

Python version: 3.7.2

NumPy version: 1.16

windows version: Windows Pro 19041.508

Intel: i7-3930K, 64 GB memory.

Reproducing code example:

I am not sure if this can be reproduced on another system, but it can be reproduced in my computer, I recorded a video showing how that happens:

https://www.youtube.com/watch?v=ZA_0kyXiXco

The matrix is 2048 by 2048, and if I call the linalg.eigh twice, it works. That is funny!

Issue 2:
Add support for the LDL decomposition, which is a variant of the Cholesky decomposition that doesn't take any square roots (faster). LAPACK has a function for this called DPTTRF, so I'm guessing that supporting this is just a matter of adding a wrapper for this function. Also, if this is something that would fit better in Scipy, let me know.
Issue 1:
Floyd opened SPR-9266 and commented

I am not sure if any one has raised this concern before.

I saw this in StackOverflow : http://stackoverflow.com/questions/8417232/spring-delegatingfilterproxy-multi-threading-concerns

Running in high load, the "synchronized (this.delegateMonitor)" in the "doFilter" method may be a bottleneck. it could be better synchronization is placed in the double null check.

Affects: 3.1.1

Issue Links:

#15046 Unnecessary blocking in DelegatingFilterProxy ("duplicates")

1 votes, 2 watchers

Issue 2:
Yury Lapko opened SPR-10413 and commented

Unnecessary thread blocking occurs every time when the method doFilter is called. Can be used double check locking to avoid unnecessary thread blocking.

Affects: 3.2.2

Reference URL: https://github.com/SpringSource/spring-framework/blob/3.2.x/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java

Issue Links:

#13904 Spring DelegatingFilterProxy synchronization in multi-threading ("is duplicated by")

Referenced from: commits c26272c, 20ddd32
Issue 1:
I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] 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

There is no simple solution or workaround to add a new named router-outlet at runtime.

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

We have a use case where we need to dinamically display modules ( which needs a router ) at runtime.

We have no clue how many modules need to be added. Imagine something like a pluggable framework.

We found a solution to 'inject' a router-outlet tag using a ng-template and a ViewContainerRef. But we have issues with the name attribute. Managed to fix this by making our own router-outlet directive, but this is not a good long-term solution.

We do not need binding on it, but some way to programatically set the router-outlet name only when it is created. Would be lovely if maybe instead of the @Attribute we could have something that can take a string property instead of a string literal.

Note: Not sure if this is a duplicate of : #12522. We need to only set it when created insted of having it as an @Input ( that would imply binding would work on it )

Issue 2:
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

creating a messages.xlf using Angular CLI: ng xi18n

As i don't need to translate English to English I use the generated file to build the English version

ng serve --aot --locale en --i18n-file src/messages.xlf

=> All strings are missing

(i think this comes from empty <target /> in the xfl file)

Same for all other languages. Documentation suggests to copy the messages.xlf to /locale/messages.??.xlf. If I now build the localized version with a incomplete translation, all not translated strings are missing.

Expected behavior

I would expect that missing translations show the original string instead of nothing.

Minimal reproduction of the problem with instructions

see Current behavior

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

Keeping all translation files up to date in time is a complicated workflow and then a not translated string is better than a missing string.

Please tell us about your environment:

Angular version: 4.0.1

Browser: Firefox/Chrome

Language: N/A

Node (for AoT issues): v6.10.1
Issue 1:
Hi!

My entry module uses a dynamic require, which forces Webpack to try to build every file under the context directory into one gigantic bundle. Is there a way to restrict which files webpack tries to bundle in this case? For example, ignoring any files underneath various test directories? Is there also a way to force webpack to split these files out into several bundles?

I think, because the dynamic require is so ambiguous, Webpack determines that every file within the context directory should be bundled with the entry file so that they're all available should the dynamic require need them. That makes plenty of sense, but at some point I'd like require to send off an ajax request for the next bundle. How can I force that?

Thanks!

Issue 2:
What is the current behavior?

When using public/private field declarations in an es6 class. Webpack fails to bundle with the below error

ERROR in ./index.js 2:9
Module parse failed: Unexpected token (2:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| class Rectangle {
> height = 0;
| width;
|

ERROR in ./index.js 10:2
Module parse failed: Unexpected character '#' (10:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| class RectangleP {
> #height = 0;
| #width;
| constructor(height, width) {

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

index.js

class Rectangle {
height = 0;
width;

constructor(height, width) {
this.height = height;
this.width = width;
}
}

class RectangleP {
#height = 0;
#width;
constructor(height, width) {
this.#height = height;
this.#width = width;
}
}

webpack.config.js

const { resolve } = require('path');

module.exports = {
entry: './index.js',
output: {
path: resolve(__dirname, 'dist'),
filename: '[name].js'
},
resolve: {
extensions: [ '.js' ]
}
}

What is the expected behavior?

Code gets bundled.

Other relevant information:

webpack version: 4.41.5

Node.js version: v12.12.0

Operating System: macOS Catalina

Additional tools:
Issue 1:
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary):

TensorFlow version (use command below):

Python version:

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version:

GPU model and memory:

You can collect some of this information using our environment capture

script

You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior

Describe the expected behavior

Code to reproduce the issue

Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Other info / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Issue 2:
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary):

TensorFlow version (use command below):

Python version:

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version:

GPU model and memory:

You can collect some of this information using our environment capture

script

You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior

Describe the expected behavior

Code to reproduce the issue

Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Other info / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
Issue 1:
Input Code

let a: string = 'a';
(<any>a) = null;

Babel/Babylon Configuration (.babelrc, package.json, cli command)

{
sourceType: 'module',
plugins: [
'typescript',
],
}

Expected Behavior

no error

Current Behavior

ERR ../main.ts Transformation error
SyntaxError: Invalid left-hand side in assignment expression (2:2)

Possible Solution

?

Context

i need to parse typescript to codemod it using jscodeshift and ast-types. it is already working, except for this error.

Your Environment

software
version(s)

Babel
-

Babylon
7.0.0-beta.40

node
9.5.0

npm
5.7.1

Operating System
macOS 10.12.6

Issue 2:
💻

Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, ...)

Input code

https://codesandbox.io/s/bold-pond-g5nzv

Configuration file name

No response

Configuration

No response

Current and expected behavior

If you will try to check example - you will notice that submenu items have collision with key names, however, if you will check what are expected assignment to this keys - they are no issue supposed to be. Moreover this code is working right now, but with different packages, mostly with 7.12.13, after I tried to re-generate my lock.yarn file - application gets broken.

Expected behavior:

Submenus in that particular case shouldn't have key's collision/duplication and as single-players.

Current behavior:

If you will expand any submenu - you will see warnings about duplicated keys also, if you will hover any sub-menu's item - they all will be highlighted, because of the same key value.

Environment

Node 12

Possible solution

Possibly it might be caused somewhere in between 7.12.13 and latest one

Additional context

Tried this on on manual config and with react-scripts, after new installations (yarn re-generation as well) - code works with issue. If i compile my code with old yarn.lock file for manual config (based on 7.12.13) - everything works as expected.
Issue 1:
I setup my laptop so that my day to day work is not in an admin account. For most software, when comes upgrade time, all I have to do is enter the admin account login and password when prompted and I can proceed. This is not the case with Atom. Everytime I want to upgrade, I have to manually download Atom and replace the executable.

I have tried completely unsintalling Atom and everything related to Atom in ~, ~/Library, /Library, etc, then rebooting my machine (twice) and then installing Atom to solve. That did not change the situation.

Issue 2:
I've never been able to get the autoupdate to work. It detects a new version, happily downloads, but when I click restart and update, it quits the app, presumably fails to update, and then relaunches, and starts redownloading the update. Usually then I have to get into a hit-quit-a-bunch-war to get it to stop relaunching on quit.

I've pasted the error output from OS X console below:

7/8/14 8:04:09.265 AM Atom[39769]: App load time: 201ms
7/8/14 8:04:35.014 AM Atom[39769]: Download completed to: file:///Volumes/Secondary/Users/pbhogan/Library/Application%20Support/com.github.atom.ShipIt/update.ja3pAYF/download
7/8/14 8:04:42.995 AM com.apple.launchd.peruser.569031419[209]: (com.github.atom.ShipIt[39791]) assertion failed: 13E28: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
7/8/14 8:04:44.875 AM ShipIt[39791]: Beginning installation
7/8/14 8:04:44.893 AM ShipIt[39791]: Couldn't abort install and restore owned bundle to previous location file:///Applications/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
7/8/14 8:04:56.125 AM ShipIt[39791]: Application launched at file:///Applications/Atom.app
7/8/14 8:04:56.125 AM ShipIt[39791]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7fefdc41a260 {NSLocalizedDescription=Permission denied}
7/8/14 8:04:56.125 AM ShipIt[39791]: ShipIt quitting
7/8/14 8:04:56.131 AM com.apple.launchd.peruser.569031419[209]: (com.github.atom.ShipIt[39791]) Exited with code: 1
7/8/14 8:04:56.132 AM com.apple.launchd.peruser.569031419[209]: (com.github.atom.ShipIt[39794]) assertion failed: 13E28: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
7/8/14 8:04:56.435 AM Atom[39792]: App load time: 190ms
Issue 1:
❓ after pytorch Stable(1.5) installation on macOS Catalina

python 3.8

pytorch Stable(1.5)

error

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/torch/_C.cpython-38-darwin.so, 2): Library not loaded: @rpath/libc++.1.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/torch/_C.cpython-38-darwin.so
Reason: image not found

cc @ezyang @seemethere @malfet

Issue 2:
🐛 Bug

Install on MacOS fails with pip.

To Reproduce

(venv) ➜ whatlies git:(master) ✗ python -m pip install torch
(venv) ➜ whatlies git:(master) ✗ python
Python 3.7.7 (v3.7.7:d7c567b08f, Mar 10 2020, 02:56:16)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/vincent/Development/whatlies/venv/lib/python3.7/site-packages/torch/__init__.py", line 81, in <module>
from torch._C import *
ImportError: dlopen(/Users/vincent/Development/whatlies/venv/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so, 9): Library not loaded: @rpath/libc++.1.dylib
Referenced from: /Users/vincent/Development/whatlies/venv/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so
Reason: image not found

Google suggested doing this;

(venv) ➜ whatlies git:(master) ✗ brew install libomp

That unfortunately did not work.

Expected behavior

No error.

Environment

(venv) ➜ whatlies git:(master) ✗ python collect_env.py
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Mac OSX 10.15.3
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.7
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.18.3
[pip3] torch==1.3.1
[pip3] torchvision==0.5.0
[conda] Could not collect

cc @ezyang @gchanan @zou3519 @bdhirsh @seemethere @malfet @walterddr
Issue 1:
Challenge change-styles-based-on-data has an issue.

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36.

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

It isn't the particular challenge but more so with how these challenges' tests evaluate the solutions. If you change the name of the variable, in this case dataset, to anything else (that you haven't already used in previous d3 challenges) the solution works.

Even if you go back to the previous challenge (that passed), and submit again, it will respond that the variable has already been declared. I had the same issue with mobile on android 6.0 using chrome 56.

<body>
<script>
const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];

d3.select("body").selectAll("h2")
.data(dataset)
.enter()
.append("h2")
.text((d) => (d + " USD"))
// Add your code below this line

// Add your code above this line
</script>
</body>

Issue 2:
The last 2-3 days my activity calendar is blank. It shows no activity although it says i have completed 217 items so far.

When i open chrome's console it has an error that might help in solving the problem which says "Uncaught TypeError: Cannot read property 'getTime' of undefined".

I tried to open the page with firefox which i rarely used but never with freeCodeCamp in case it was a cache problem but still didn't work.

I attached the screenshot below for your convenience.
Issue 1:
I want add an element to the top of the LeftNav which contains the user's picture and name, but it seems like all that I can specify are menu items. I don't see how I can have complicated content inside MenuItems from the examples.

Any guidance of what I should do?

Issue 2:
Is there a way to make the LeftNav component composable? I need to add a custom component into the LeftNav. Is there a way to add another MenuItemType or pass in children into the render function on the LeftNav?
Issue 1:
Describe what you were doing when the bug occurred:

1.

2.

3.

Please do not remove the text below this line

DevTools version: 4.2.0-a8b8ffb89

Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:162685)

at m (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:332158)

at sc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:332375)

at fi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59263)

at Hi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:66573)

at lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104884)

at kc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89467)

at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89392)

at pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:86341)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:45721

Component stack: in sc

in div

in div

in _o

in Unknown

in n

in Unknown

in div

in div

in zi

in Ge

in un

in ba

in Rc

Issue 2:
In React 15, ComponentWillUnmount called first before the rendering of next component in DOM. In the current version (v16), ComponentWillUnmount was called after the mounting of next component.

It creates an issue with my existing code, since I reuse the same component after the history changes so it invokes the componentWillMount with new props and change in URL and thereafter, it invokes the ComponentWillUnmount of same component.

Is there still a way to do this in a synchronous way?
Issue 1:
Ambient class declarations implementing an interface require the user to repeat the type members declared in the interface.

For example with the interface

interface IFoo {
bar: string;
qux(): number;
}

an ambient declaration of Foo as

declare class Foo implements IFoo {}

fails with Class 'Foo' incorrectly implements interface 'IFoo'. Property 'bar' is missing in type 'Foo', while the following works as expected, but duplicates all declarations:

declare class Foo implements IFoo {
bar: string;
qux(): number;
}

While it should be possible to specialise when declaring an ambient class, it would be very convenient if unchanged type members would not need to be redeclared.

Issue 2:
http://typescript.codeplex.com/workitem/1125

Following should be allowed:

interface IFoo {
foo();
}

declare class Foo implements IFoo {}

If abstract classes are added in the future, they would inherit all interface methods as abstract (like in Java).