WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm submitting a

[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

Not sure if this is a bug or a feature request, but radokirov@google.com suggested me to file an issue.

When there is a list of primitives, let say booleans let list: Array<boolean> = [true, true, false, true], *ngFor is not capable to track it correctly. It's clear from documentation, that it is required to use some tracking function, but it looks overkilled to implement a tracking function that looks like this:

track(i: number): number {
return i;
}

Expected behavior

Is it possible to add a predefined variable index as a tracking parameter?

*ngFor="let item of list; let i = index; trackBy: index"

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/I1MP9vMfDyC9jdCgJCe0?p=preview

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

Get rid of unnecessary tracking function.

Please tell us about your environment: Goobuntu, Cider

Angular version: 2.2.1

Browser: Chrome 55.0.2883.87 (64-bit)

Language: TypeScript

Issue 2:
Helps manual debugging
Issue 1:
Version: 0.192.0

Problem

autoindent fails to indent parameter lists. Note: If I hit enter after fake_function(, param= would be indented 3x -- class > def > foo.

class Bar(unittest.TestCase):
def test_indentation(self):
foo = fake_function(param='hello',
second_param='world', # should have indented this line
) # and this one, too

After saving, atom-beautify correctly indents the parameters

class Bar(unittest.TestCase):

def test_indentation(self):
foo = fake_function(param='hello',
second_param='world', # fixed!
) # me, too!

But now, autoindent fails to reset indentation back to the beginning of the line

[...]
foo = fake_function(param='hello',
second_param='world',
)

bar = 'after_continuing typing' # ach!!

Unfortunately atom-beautify doesn't quite fix this ever time.

foo = fake_function(param='hello',
second_param='world',
)
bar = 'after_continuing typing'

Note

I recently updated atom-beautify as an attempt to help resolve the issue, but I am now getting errors there. The problems mentioned above still exist, but I will update if anything changes.

Update

Here's some testing in

Sublime3:

def testing_indentation_in_sublime(some_var):
first_line = "works"
second_test = func_indentation(multiple_param,
auto_indents,
still_here,
) # parenthesis auto matched when typed!

third_test = alt_indentation(
looks_just_like above,
which_was_wrong,
but_this_works,
)

fourth_line = existing_indentation('retry last pasting',
'broken')
and_indent_is_kept

fifth_line = backspace_only_does_one_space('testing existing indent',
'testing')
indentation = "working!!"

if check_nested_indent is not None:
basic_indent = True
elif check_indent:
also_works = True
if nested:
so_far = so_good
else:
also_good = True
else:
uh_oh = 'is this really that hard?'

return end_of_function

def still_indented():
'''sigh.'''
indentation = 'not perfect here, either (but way better)'

Eclipse

def indent_test_eclipse(some_var):
first_line = 'smoke test'
second_test = func_with_param(style_one,
hey_it_works,
)
back_to_the_beginning = 'holy crap.'
third_test = func_with_alt_style(
hrmmm,
)

if nested_indent is not None:
basic_indent = True
elif reindents_on_space_not_colon:
still_okay = True
if nested:
so_far = so_good
else:
also_good = True
else:
must_be_difficult = True

return end_of_function

def correctly_indents_after_return():
'''Woo hoo'''

return True

Issue 2:
Pressing enter after continuing a list or tuple on a second line. It should either auto indent one tab, or to the first char of the previous item, but it just goes to the beginning of the line. Manually pressing auto indent (Lines->Auto Indent, or cmd+i), doesn't do anything.

should be either

somefunc(bar,
m)

or

somefunc(bar,
m)
Issue 1:
Recently I have carefully read the code in pytorch/torch/optim/sgd.py . According to the document in this file, the current implementation of SGD optimizer is as follows:

v_(t+1) = mu*v_t + grad(w_t)
w_(t+1) = w_t - lr*v_(t+1)

Where v_t is the momentum and w_t is the weight value in step t. grad(x) is the gradient for x .

The implementation is OK for this formulation. But I am confused with the implementation of Nesterov Accelerated SGD(NAS). Following the formulation of [1][2], the formulation of NAS under PyTorch's implementation should be

v_(t+1) = mu*v_t + grad(w_t)
w_(t+1) = w_t + mu*(v_(t+1)-v_t) - lr*v_(t+1)

However, the current implementation of NAS is:

v_(t+1) = mu*v_t + grad(w_t)
w_(t+1) = w_t - lr*(grad(w_t) + mu*v_(t+1))

I am not sure how to get this formulation. How do you think about this ?

[1] http://cs231n.github.io/neural-networks-3/

[2] http://www.cs.toronto.edu/~hinton/absps/momentum.pdf

Issue 2:
🐛 Bug/Reproduce:

Slicing only sort-of-respects no_grad(). The resulting tensor does not have a history, but does require gradient. However using it does not then materialise a gradient accumulator.

import torch
x = torch.rand(2, 2, requires_grad=True)
with torch.no_grad():
y = x[:, :1]

z = y.clone()
print(y.requires_grad) # True
print(z.grad_fn.next_functions) # ((None, 0),)

For context, this came up during a custom autograd.Function.forward where there's an implicit no_grad().

Expected behavior

For y not to require gradient.

Environment

PyTorch Version (e.g., 1.0): 1.6.0

OS (e.g., Linux): Linux

How you installed PyTorch (conda, pip, source): conda

Python version: 3.8.3
Issue 1:
Is there a reason for not using core-js? From the es6 compat table core-js covers a lot more than es6-shim.

Issue 2:
Currently we generate one setter registration per bind value. For example, this annotation:

'bind': {'text': 'tool-tip'}

attached to two classes, A and B would generate

registerSetters({'text': (A obj, String value) => obj.text = value})
registerSetters({'text': (B obj, String value) => obj.text = value})

Instead we need to generate a single setter registration using a common parent class of A and B. This would be tough to do without resolving in our transformer, which we would like to avoid. As a first approximation, we can omit the parameter type (A and B above) which will be interpreted as dynamic.

To do this, we need global knowledge of the setters which would be registered.

Modify the bind_generator transformer, its primary inputs are the .ngDeps.dart files generated by the app entry points.

Parse these files, gathering information on the setters to be generated.

Also parse all .ngDeps.dart files imported by the primary inputs.

Where there are multiple setters for a single property, remove type information from the registered setter.

Output a .ngSetters.dart file with a setupReflection method that registers all setters.

Generate code to import and call setupReflection during app setup.
Issue 1:
Electron version: 1.8.1

Operating system: macOS 10.12.5

Expected behavior

Tray > contextMenu > menuItem(role="about")

when I click menuItem to show about panel, can handle click event to show app.

Actual behavior

no place can write click handle can make app to activate

How to reproduce

Create a menuItem with "about" role in the tray's contextMenu. Run another application, with the window at the top, covering the electron's app. Click about menuItem in tray contextmenu. Can not be shown covered under the about the panel

Issue 2:
Electron version: Electron built at aea06ed

Operating system: macOS 10.13.2

Expected behavior

MenuItem click handlers should get called in the popped up context menu.

Actual behavior

Click handlers never getting called back.

How to reproduce

Open a popup in the main window:

window.webContents.on('context-menu', (event) => {
const menu = new Menu()
menu.append(new MenuItem({label: 'MenuItem1', click() { console.log('item 1 clicked') }}))
menu.append(new MenuItem({type: 'separator'}))
menu.append(new MenuItem({label: 'MenuItem2', type: 'checkbox', checked: true}))
menu.popup(mainWindow)
})

Right click on the running window and select MenuItem1, the log item 1 clicked should print but doesn't.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I would like to map through an array and render multiple components / elements inside of the Snackbar component.

message={
<div>
{array.map(item => {
return (
<Chip
key={item}
className={classes.chip}
label={`${item}`}
onDelete={() => this.handleDelete(item)}
/>
)
})}
</div>
}

This renders perfectly fine, however I believe there is no way to pass a key from what I see in the SnackbarContent.js file. This is what gives me the unique "key" warning. I could make a PR for it if anyone else things that would be a good idea.

Thoughts?

Issue 2:
material-ui 1.0.0-beta16 is depend on recompose 0.26 and material-ui-icons beta.15 (latest) is depend on recompose 0.25

it cause we see multiple recompose module in built bundle file. you can use webpack-visualizer-plugin for see more detail.

I have searched the issues of this repository and believe that this is not a duplicate.

Your Environment

$ yarn list|grep -e material-ui -e recompose
├─ material-ui-icons@1.0.0-beta.15
│ └─ recompose@^0.25.1
├─ material-ui@1.0.0-beta.16
│ ├─ recompose@^0.26.0
│ ├─ recompose@0.26.0
├─ recompose@0.25.1

$ yarn why recompose
yarn why v1.1.0
[1/4] Why do we have the module "recompose"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
info This module exists because "material-ui-icons" depends on it.
info Disk size without dependencies: "4.86MB"
info Disk size with unique dependencies: "5.98MB"
info Disk size with transitive dependencies: "11.66MB"
info Number of shared dependencies: 16
Done in 1.04s.

how it should be fixed?

you need update recompose dependency in material-ui-icons. and both modules has same recompose.
Issue 1:
Sorry for my poor English~

My project dependencies are:

"devDependencies": {
"babel-core": "^6.24.0",
"babel-loader": "^6.4.0",
"babel-preset-env": "^1.2.1",
"babel-preset-es2015": "^6.24.0",
"html-webpack-plugin": "^2.28.0",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1"
}

And the webpack.config.js has a loader :

test: /\.(js|jsx)/,
use: "babel-loader?presets[]=env",
exclude: /(node_modules|idea)/

the code:

for (let i = 0; i < 3; console.log(i),i++) {
let i = "abc";
console.log(i);
}

expected result:

abc
0
abc
1
abc
2

but output

abc
abc

Is that a BUG?

Issue 2:
Issue originally made by @bergus

Bug information

Babel version: v6.x (babel.io/repl)

Options

plain preset es-2015, nothing else

Input code

"use strict";
function foo1() {
for (let bar = 2; bar < 3; bar++) {
let bar = 4;
}
}
function foo2() {
var bar;
for (let bar = 2; bar < 3; bar++) {
let bar = 4;
}
}

[[ https://babeljs.io/repl/#?evaluate=true&lineWrap=false&presets=es2015&code="use%20strict"%3Bfunction%20foo1()%20{%20%20for%20(let%20bar%20%3D%202%3B%20bar%20<%203%3B%20bar%2B%2B)%20{%20%20%20%20let%20bar%20%3D%204%3B%20%20}}function%20foo2()%20{%20%20var%20bar%3B%20%20for%20(let%20bar%20%3D%202%3B%20bar%20<%203%3B%20bar%2B%2B)%20{%20%20%20%20let%20bar%20%3D%204%3B%20%20}} | produces ]]

"use strict";

function foo1() {
for (var bar = 2; bar < 3; bar++) {
var bar = 4;
}
}
function foo2() {
var bar;
for (var bar = 2; bar < 3; bar++) {
var _bar = 4;
}
}

Description

In foo1 it should produce two different bar variables - the one in the body of the loop is block-scoped and not the same as the one created by the loop. See also http://stackoverflow.com/q/37855990/1048572

Now that might be a simple bug, but it's getting weird in foo2 where a function-level bar is introduced (both let and var and parameters reproduce this). Here the bar variables of the loop and the body are indeed separated as expected, but the one of the loop header collides with the function-scope one. This does usually work - as long as there is no let declaration in the loop body.
Issue 1:
🐛 Bug

Issue 2:
🐛 Bug

To Reproduce

here is my code

auto out = faceDetect->forward({ tensor_image }).toTuple();

c10::cuda::CUDACachingAllocator::emptyCache();

...some tensor ops on gpu

boundingBoxesOfOne = torch::masked_select(boundingBoxesOfOne, mask);

faceDetect is a sfd net,after forward(),if i call emptyCache(),it will cost 170ms time to emptyCache;if i don't call emptyCache(),masked_select will cost 170ms;so i don't know how to optimize this situation，thks！

Environment

libtorch Version 1.0 :

OS windows10:

CUDA/cuDNN version: 9.0

GPU models and configuration: GTX 1060

Additional context
Issue 1:
Environment

Windows pro 1903

4k with 225% for screen

PowerToys version: v0.16.1

Steps to reproduce

Just drag and drop windows with 'shift'

Expected behavior

Fully using whole screen,

Better assign 'win + shift + arrow' to fancyzones and leave 'win + arrow' as system default.

It would be better if and adjust by drag the border of both zones as window system default for temporary.

Actual behavior

There is space not usable on the right of screen.

Seems ok now with v0.16.1 after reboots (not sure is it because of reboots?) 👍

Screenshots

Issue 2:
Environment

Microsoft Windows [Version 10.0.18363.752]
PowerToys version: 16.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Border to 0, 2 column layout, override windows snap

Try snapping any windows explorer window

Expected behavior

No gaps

Actual behavior

There will be a gap at the left or right side depending on where you snap (snap left, gap left)

Correct behaviour observed in version 14. Versions 15+ all have been tested and exhibit the "gap" behaviour.
Issue 1:
Given a tsconfig like this:

{
"extends": ["@tsconfig/strictest/tsconfig.json", "@tsconfig/node16/tsconfig.json"],
}

An error like this happens:

playwright test --config tests/e2e/config.ts

TypeError: The "path" argument must be of type string. Received an instance of Array

Issue 2:
Let us know what functionality you'd like to see in Playwright and what your use case is.

Do you think others might benefit from this as well?

I consider it worthwhile to introduce new kinds of matchers to expect the number of elements that locator.count() returns.

const locator = page.locator('.selector')

await expect(locator).toHaveCount(2) // already implemented
await expect(locator).toHaveCountGreaterThan(5)
await expect(locator).toHaveCountLowerThan(10)

For consistency, there could also be added .toHaveLengthGreaterThan() and .toHaveLengthLowerThan().
Issue 1:
I found the animations doesn't save in Storage.

Issue 2:
Description of the problem

There are several features of THREE that aren't accessible from the Editor. When I say accessible, I mean combination of:

properties are not visible for editing

objects not being able to be created

objects not being able to be imported or exported.

Ideally, the Editor should be capable of creating and editing most objects and features that the API contains. This issue is really more to keep track of what the Editor can and can't do currently. I'm listing features that I think the Editor would be capable of handling.

Cameras

PerspectiveCamera

OrthographicCamera

ArrayCamera

CubeCamera

StereoCamera

Core

BufferAttribute

BufferGeometry

Layers

InstancedBufferAttribute

InstancedBufferGeometry

InstancedInterleavedBuffer * (#16050)

InterleavedBufferAttribute

Geometry

BoxGeometry

CircleGeometry

ConeGeometry

CylinderGeometry

DodecahedronGeometry

EdgesGeometry *

ExtrudeGeometry

IcosahedronGeometry

LatheGeometry

OctahedronGeometry

PlaneGeometry

RingGeometry

ShapeGeometry

SphereGeometry

TetrahedronGeometry

TorusGeometry

TorusKnotGemetry

TubeGeometry

WireframeGeometry **

Lights

AmbientLight

DirectionalLight

HemisphereLight

PointLight

RectAreaLight (#16251)

SpotLight

LightProbe

Materials

LineBasicMaterial

LineDashedMaterial

MeshBasicMaterial

MeshDepthMaterial

MeshLambertMaterial

MeshMatcapMaterial

MeshNormalMaterial

MeshPhongMaterial

MeshPhysicalMaterial

MeshStandardMaterial

MeshToonMaterial

PointsMaterial

RawShaderMaterial

ShaderMaterial

ShadowMaterial

SpriteMaterial

Objects

Group

LOD

Line

LineLoop

LineSegments

Mesh

InstancedMesh

Points

SkinnedMesh

Sprite

Textures

Texture (properties not editable #13882, #15695)

CubeTexture (#13880)

VideoTexture

Misc

Animations

Audio

* = Serializable, but not deserializable

** = Serializable, but not as the original geometry (i.e. WireframeGeometry is serialized as BufferGeometry)

Three.js version

Dev

r103

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/1628 on 2012-03-25 by @WarrenWeckesser, assigned to unknown.

stats.gamma.pdf(x, 1) should be equivalent to exp(-x). In particular, stats.gamma.pdf(0, 1) should be 1. Currently it returns nan:

In [1]: import scipy

In [2]: scipy.__version__
Out[2]: '0.11.0.dev-9ee2d9b'

In [3]: from scipy.stats import gamma

In [4]: gamma.pdf([0.0, 0.0001], 1.0)
/Users/warren/local_scipy/lib/python2.7/site-packages/scipy/stats/distributions.py:3353: RuntimeWarning: divide by zero encountered in log
return (a-1)*log(x) - x - gamln(a)
/Users/warren/local_scipy/lib/python2.7/site-packages/scipy/stats/distributions.py:3353: RuntimeWarning: invalid value encountered in multiply
return (a-1)*log(x) - x - gamln(a)
Out[4]: array([ nan, 0.9999])

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1326 on 2010-11-10 by trac user tpikonen, assigned to unknown.

In [331]: scipy.stats.distributions.chi2.pdf(0.0, 2)

Out[331]: nan

The correct value is 0.5.

Attached is a patch which fixes this.
Issue 1:
I would like to automate mobile native apps through Playwright. It would be really nice if you add this feature so we dont have to use different framework.

Issue 2:
Is there any way to connect to a device, start a browser (e.g. chromium instance on Android) and run the tests?

If not, what is missing at this point to be able to use it on both Android and iOS?

Note from maintainers:

Please refer to the https://playwright.dev/docs/next/api/class-android for

instructions on how to use Playwright with Chrome for Android, Android

WebViews and Android itself
Issue 1:
I just follow DevTools extension document, and when I called below on my electron chrome console

require('remote').require('browser-window').addDevToolsExtension('/some-directory/react-devtools')
// return "React Developer Tools"

But I got a TypeError log on terminal:

[1438:0520/120118:ERROR:CONSOLE(74)] "Uncaught TypeError: Cannot read property 'getURL' of undefined", source: chrome-extension://extension-1/agents/ReactInspectorAgent.js (74)

I went through ReactInspectorAgent.js line 74:

// agents/ReactInspectorAgent.js
var runtimeURL = chrome.extension.getURL(fileName);

It looks like chrome.extension is undefined, how this could be happened?

Electron 0.25.1

react-devtools 0.13.1

Issue 2:
you have the documentation

https://github.com/atom/electron/blob/master/docs/tutorial/devtools-extension.md

It described that can use plug-ins from google chrome, made as described therein, and then get an error

Uncaught TypeError: Cannot read property 'getURL' of undefined", source: chrome-extension://extension-1//panes/assets/ember-inspector.js (1)

code, a request of this type

chrome.extension.getURL("/panes/ember_debug.js")

so that the error is not exactly in the plugin, as it is normal in the google chrome working
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

copy

ANSIBLE VERSION

ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.14+ (default, Dec 5 2017, 15:17:02) [GCC 7.2.0]

CONFIGURATION

default configuration

OS / ENVIRONMENT

Linux / Linux

SUMMARY

The copy module copies only directories, no files. The directories look fine and are created recursively, however no files are copied. If you run the playbook again then the files too are copied.

STEPS TO REPRODUCE

$ find . -ls
852461 4 drwxr-xr-x 3 user user 4096 Jan 15 14:00 .
852463 4 drwxr-xr-x 4 user user 4096 Jan 15 13:59 ./source
860161 4 drwxr-xr-x 2 user user 4096 Jan 15 13:59 ./source/one
846271 4 -rw-r--r-- 1 user user 4 Jan 15 13:59 ./source/one/afile
942425 4 drwxr-xr-x 2 user user 4096 Jan 15 13:59 ./source/two
846272 4 -rw-r--r-- 1 user user 121 Jan 15 14:00 ./test.yml
$ ansible-playbook test.yml
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

[WARNING]: No inventory was parsed, only implicit localhost is available

[WARNING]: Could not match supplied host pattern, ignoring: all

[WARNING]: provided hosts list is empty, only localhost is available

PLAY [localhost] *****************************************************************************************

TASK [copy] **********************************************************************************************
changed: [localhost]

PLAY RECAP ***********************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0

$ find . -ls
852461 4 drwxr-xr-x 4 user user 4096 Jan 15 14:01 .
852463 4 drwxr-xr-x 4 user user 4096 Jan 15 13:59 ./source
860161 4 drwxr-xr-x 2 user user 4096 Jan 15 13:59 ./source/one
846271 4 -rw-r--r-- 1 user user 4 Jan 15 13:59 ./source/one/afile
942425 4 drwxr-xr-x 2 user user 4096 Jan 15 13:59 ./source/two
942429 4 drwxr-xr-x 3 user user 4096 Jan 15 14:01 ./target
942430 4 drwxr-xr-x 4 user user 4096 Jan 15 14:01 ./target/source
942431 4 drwxr-xr-x 2 user user 4096 Jan 15 14:01 ./target/source/one
942432 4 drwxr-xr-x 2 user user 4096 Jan 15 14:01 ./target/source/two
846272 4 -rw-r--r-- 1 user user 121 Jan 15 14:00 ./test.yml

test.yml:

- hosts: localhost
gather_facts: no
become: no
tasks:
- copy:
src: source/
dest: target

EXPECTED RESULTS

The whole directory tree is copied.

ACTUAL RESULTS

No files are copied, only directories are created.

Issue 2:
This line

https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/basic.py#L1365

os.chmod(dest, 0666 ^ umask)

should be

os.chmod(dest, 0666 & ~umask)

For a umask of 027 the current method gives 0641.

The correct value would be 640

It may not have been noticed before because for the most common umask (022) the two give the same value.
Issue 1:
I want to contribute to the Electron project. I read the build instructions and was able to build with no issues. Now I want to start making code changes, but as Electron is built with Ninja and not XCode, I'm a little confused where to begin.

What IDE should I be using?

Can I use XCode?

What is the recommended development/debugging workflow?

Issue 2:
Electron version: N/A

Operating system: Mac OSX

The documentation on debugging the electron framework in windows (http://electron.atom.io/docs/development/debug-instructions-windows/) is really useful. It'd be nice to have something like that for OSX and Linux.