WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Issue originally made by @sorgloomer

Bug information

Babel version: 6.5.1

Options

{
plugins: ['transform-es2015-modules-amd']
}

Input code

require("foo").bar;

Description

Trying to compile the above code with:

var babel = require('babel-core');
console.log(babel.transform(
'require("foo").bar;',
{ plugins: ['transform-es2015-modules-amd'] }
).code);

results in this error:

TypeError: unknown: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null
at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\definitions\index.js:101:13)
at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\index.js:269:9)
at NodePath._replaceWith (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\replacement.js:201:7)
at NodePath._remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:55:10)
at NodePath.remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:27:8)
at PluginPass.CallExpression (C:\_temp\babel6-test\node_modules\babel-plugin-transform-es2015-modules-amd\lib\index.js:51:12)
at NodePath._call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:74:18)
at NodePath.call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:46:17)
at NodePath.visit (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:104:12)
at TraversalContext.visitQueue (C:\_temp\babel6-test\node_modules\babel-traverse\lib\context.js:156:16)

Maybe we could have an option to completely turn off treating require calls in es6 modules as imports

Issue 2:
Issue originally made by @greypants

Bug information

Babel version: 6.5.2

Node version: 4.2.4

npm version: 2.14.12

Options

react

Input code

<div label="foo" label="label is duplicated" />

Description

<div label="foo" label="label is duplicated" />

Will transpile to

React.createElement('div', { label: '...', name: '...', label: '...' })

The duplicate definition of label on the object literal will will cause the following error in IE 10+

SCRIPT1046: Multiple definitions of a property not allowed in strict mode`

It'd be great to at least throw a warning, if not break transpiling altogether.
Issue 1:
On AlpineLinux, which is a mil based Linux distributive, some of numpy's test fail. The log is attached.

log.txt

There are two types of issues - one for various missed overflow/underflow exceptions, the second one is for incorrect results from musl's trigonometric functions.

The first one can be fixed by including fenv.h header in musl builds, AFAIU this can be done in numpy/numpy/core/src/npymath/ieee754.c.src and numpy/core/include/numpy/ufuncobject.h by replacing __GLIBC__ with __GNUC__

The second group can be fixed by disabling the trigonometric functions in numpy/numpy/core/src/private/npy_config.h not only for glibc, but also for musl. An issue here is that musl doesn't provide any macro like the __GLIBC__ to detect it.

So the question, is numpy interested in such a patch? Could you please share your opinions what is best way to implement it?

Otherwise the patch can be implement in corresponding package for AlpineLinux

Issue 2:
I've ran into issue with linalg.solve on different systems: in RHEL and Ubuntu it will raise an LinAlgError exception, but on Alpine it will return nan.

Ubuntu:

$ docker run -it --rm ubuntu:18.04 /bin/sh
$ apt-get install python3-numpy
# python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 375, in solve
r = gufunc(a, b, signature=signature, extobj=extobj)
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix

Alpine:

$ docker run -it --rm alpine:3.8 /bin/sh
# apk --update add python3 py3-numpy
/ # python3
Python 3.6.6 (default, Aug 24 2018, 05:04:18)
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
array([[nan]])

I would expect to receive same exception on Alpine as well. Is this known issue?

I've tried to use either lapack or openblas on alpine, compile numpy from source — it's still would return nan.
Issue 1:
runFromBundle on FlutterView can be called only once. Some add-to-app use cases (such as letting RecyclerView manage the lifecycle of the FlutterView) requires us to be able to unload these bundles and load them up again. This also affects use cases where the app bundles are dynamically loaded from a URL. According to @sbaranov, this is one the roadmap so I am creating a tracker issue here. Please dedupe as needed.

Issue 2:
It might already be in the plans. But I notice the Shrine we show in flutter_gallery is the only pre-Material-theming shrine.

This is not at all urgent.

FYI @willlarche
Issue 1:
System info

Playwright Version: [v1.32]

Operating System: [Windows 11]

Browser: [WebKit]

Other info:

i set userAgent in browsercontext using launchPersistentContext as

Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1

but when checking in webkits console its showing as

Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/605.1.15 (KHTML, like Gecko)

Issue 2:
System info

Playwright Version: [v1.32.2]

Operating System: [macOS 13.3]

Browser: [WebKit]

Other info:

Source code

main.js file

const { webkit } = require('playwright');

const test = async () => {
const context = await webkit.launchPersistentContext('path_for_user_dir', {headless: false});
const page = await context.newPage();
await page.goto('https://www.abc.com');
}
test();

package.json

{
"name": "testcafe",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "node main.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"testcafe": "^2.0.0"
},
"devDependencies": {
"@playwright/test": "^1.32.2",
"playwright": "^1.32.2"
}
}

Steps

npm start

Expected

It should open webkit browser with latest version (saw in doc and npm package link that it supports 16.4).

Actual

When I use launchPersistentContext method it opens old webkit browser 13.x.x (checked in user agent of browesr and other online sites) and when I use launch method it opens up in new version of webkit which is 16.4.

I don't know if I'm missing something.
Issue 1:
pytorch 1.0

DOC err:torch.nn.CrossEntropyLoss

if weight=NONE

loss(x,class)=−x[class]+log(j∑​exp(x[j])) ,The result is correct.

if weight!=NONE

loss(x,class)=weight[class]*(−x[class]+log(j∑​exp(x[j]))) ,The result is wrong?

import torch

import torch.nn.functional as F

a=[[-5.,-6.],[3.,2.],[3.,2.]]

c=[1,0,1]

b=[3.,2.]

input=torch.tensor(a,requires_grad=True)

target = torch.tensor(c)

weight = torch.tensor(b)

output = F.cross_entropy(input,target,weight,reduce=True,size_average=True)

z=output.sum()

z.backward()

print(output,input.grad)

tensor(0.8847, grad_fn=) tensor([[ 0.2089, -0.2089],

[-0.1153, 0.1153],

[ 0.2089, -0.2089]])

Issue 2:
Hi,

there is something strange in the backward step (or maybe something I don't understand). If I define a Module that takes 3 inputs, the grad_input has to be of size 3, right ? But this is not the case here (from the backward_hook point of view):

from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F

def bh(m,go,gi):
print("Grad Input")
print(go)
print("Grad Output")
print(gi)

class M(nn.Module):
def __init__(self):
super(M,self).__init__()
self.register_backward_hook(bh)

def forward(self,x,y,z):
return (x+y+z)

x=Variable(torch.randn(1,5),requires_grad=True)
y=Variable(torch.randn(1,5),requires_grad=True)
z=Variable(torch.randn(1,5),requires_grad=True)

criterion=nn.MSELoss()
mod=M()
out=mod(x,y,z)
loss=criterion(out,Variable(torch.randn(1,5)))
loss.backward()```

In that case, when I print grad_input throught the hook function, it is just composed of two elements... Could you tell me where am I wrong ? But `x.grad, y.grad and z.grad` seem correctly computed

cc @ezyang @gchanan @zou3519 @SsnL @albanD @gqchen
Issue 1:
Description of the problem

The parameter linewidth from the LineBasicMaterial class is ignored. The expected outcome is to set the width of a line with this parameter.

Code:

container = document.createElement('div');
document.body.appendChild(container);
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.set(0, 0, 150);
scene = new THREE.Scene();
scene.add(camera);
renderer = new THREE.WebGLRenderer({
clearAlpha: 1
});
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setClearColor(0xcaffee, 1);
document.body.appendChild(renderer.domElement);

var material = new THREE.LineBasicMaterial( { color: 0xff0000, linewidth: 10000000 } );
var points = [];
points.push( new THREE.Vector3(-50, 0, 0 ) );
points.push( new THREE.Vector3( 50, 0, 0 ) );
var geometry = new THREE.BufferGeometry().setFromPoints( points );
var line = new THREE.Line( geometry, material );
scene.add( line );
renderer.render( scene, camera );

animate();
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}

Three.js version

r119

...

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS 10.14.6

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Issue 2:
Description of the problem

LineBasicMaterial no work in Chrome. Works great in Firefox. Worked in in Chrome 54 until we updated to latest release. We get the lines, they have no width. I know this has been reported a million times in regard to Windows but I'm on Mac OS 10.11.6.

Three.js version

r82

Browser

Chrome

Firefox

OS

Mac

Hardware Requirements (graphics card, VR Device, ...)

NVIDIA GeForce GT 750M
Issue 1:
Code Sample, a copy-pastable example if possible

pd.Series(range(10))

Problem description

There is a option display.show_dimensions which allow show the dimension of a DataFrame, while it would be useful if the length of a Series can be set to show when the index is not a range list.

Expected Output

0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
dtype: int64

[10 elements/items/or something else...]

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Darwin
OS-release: 16.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.19.2

nose: 1.3.7

pip: 9.0.1

setuptools: 34.3.3

Cython: 0.25.2

numpy: 1.12.1

scipy: 0.19.0

statsmodels: 0.8.0

xarray: 0.9.1

IPython: 5.3.0

sphinx: 1.5.3

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2016.10

blosc: None

bottleneck: 1.2.0

tables: None

numexpr: 2.6.2

matplotlib: 2.0.0

openpyxl: 2.4.5

xlrd: None

xlwt: None

xlsxwriter: 0.9.6

lxml: 3.7.3

bs4: 4.5.3

html5lib: 0.999999999

httplib2: None

apiclient: None

sqlalchemy: 1.1.7

pymysql: None

psycopg2: None

jinja2: 2.9.5

boto: None

pandas_datareader: 0.3.0.post

Issue 2:
rather than display.max_rows directly

for considency with the new 'truncate' option
Issue 1:
This is part of the Rust tutorial session. The whole purpose of the exercise was to find a mistake in the block expression.

See Exercise 2.1

http://pnkfelix.github.io/cyot/tutorial/exercises/ex_part_2

With rust compile this:

fn foo() -> i32 {
42
}

pub fn main() {

let the_sum :i32 = {
foo();
};

let the_other_sum = {
foo();
};

}

It outputs this error:

bug_block.rs:7:24: 9:6 error: mismatched types:
expected `i32`,
found `()`
(expected i32,
found ()) [E0308]
bug_block.rs:7 let the_sum :i32 = {
bug_block.rs:8 foo();
bug_block.rs:9 };
error: aborting due to previous error

It should also put a warning for line 12: "possibly missing return value". This would catch the bug.

Issue 2:
When if and else arms have incompatible types, like below, the compiler should point at both arms with the evaluated type and also suggest removal of trailing semicolon if relevant.

fn main() {
let a = if false { "x" } else { "y"; };
}

Current:

error[E0308]: if and else have incompatible types
--> src/main.rs:2:13
|
2 | let a = if false { "x" } else { "y"; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &str, found ()
|
= note: expected type `&str`
found type `()`

Suggested:

error[E0308]: if and else have incompatible types
--> src/main.rs:2:13
|
2 | let a = if false { "x" } else { "y"; };
| --- ^^^- help: remove this semicolon
| | |
| | expected &str, found ()
| this arm evaluates to &str
= note: expected type `&str`
found type `()`

Example taken from lessons learned in Converting a Python library to Rust article
Issue 1:
Say I keep my containers as light weight as possible, perhaps using alpine or some other light weight distro.

When something goes wrong in a pod, it can be difficult to exec in and debug sometimes because there are no debugging tools in the container.

It would be awesome if you could temporarily attach a new sidecar container to the specified pod for debugging purposes.

something like:

kubectl exec -it mypod -s mydebugcont /bin/bash

It could even perhaps take a -c flag and attach to the same pid namespace of the specified container so stuff like running strace -p would work.

Issue 2:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Kubernetes version (use kubectl version):

Environment:

Cloud provider or hardware configuration:

OS (e.g. from /etc/os-release):

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know:
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

So I am maintaining 4 very large projects in Angular.

There is no way for me to know, when I open each project, which code has been deprecated.

The only reported issue I see is when I run AOT, a message of <template> now needing to be <ng-template>

However, there are no mentions of any issues with things like Renderer now needing to ne Renderer2.

Expected behavior

I expect TypeScript and / or cli to report a summary of all deprecated API so we can fix'em before ng5 is out.

@angular/cli: 1.0.0
node: 6.9.5
os: win32 x64
@angular/animations: 4.0.0
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
@angular/language-service: 4.0.0
@ngtools/webpack: 1.3.0

Not sure if this issue should be opened against cli repo.

FYI, in WebStorm I will see cross outs on deprecated API, but again, I am dealing with thousands of files so I can't open each one and look for cross outs, see below:

Angular 2 Kitchen sink: http://ng2.javascriptninja.io

and source@ https://github.com/born2net/Angular-kitchen-sink

Regards,

Sean

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

A more general problem: we need somehow export/expose enums, static fields, classes, functions etc. into template without abusing class fields.

maybe component can add a imports key in metadata

@Component({
template: `<template [ngIf]="state == StateEnum.Idle"></template`,
imports: [{import: StateEnum, as: "StateEnum"}]
})

briefly as

@Component({
template: `<template [ngIf]="state == StateEnum.Idle"></template`,
imports: [StateEnum]
})

this feature used more like providers

#9029
Issue 1:
http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops

Currently asks the user, "Let's try getting a for loop to work by pushing values to an array."

Should be, "Let's try getting a while loop to work by pushing values to an array."

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops has an issue.

Text reads, "Let's try getting a for loop to work by pushing values to an array." It should instead read, "Let's try getting a while loop to work by pushing values to an array."
Issue 1:
julia> versioninfo()
Julia Version 1.3.0-rc4.1
Commit 8c4656b97a (2019-10-15 14:08 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_CMDSTAN_HOME = /home/tamas/src/cmdstan/

MWE condensed from discussion:

using Test

# wrapper is pretty much irrelevant for the problem, just to make an MWE
@inline wrapper(itrs) = sum(prod(first.(i)) for i in Iterators.product(itrs...))

zipped1(pairs) = wrapper(map(pair -> zip(pair...), pairs))

zipped2(pairs) = wrapper(map(pair -> zip(pair[1], pair[2]), pairs))

pairs = (1:5 => 1:5, 2:3 => 2:3)

@inferred zipped1(pairs) # ERROR: return type Int64 does not match inferred return type Any
@inferred zipped2(pairs) # inferred correctly

I found some similar-looking issues, but this did not look like a duplicate of any of them.

Issue 2:
In a few places, the performance of splatting a number has shown up: #29060, #28764 (comment) and working around this give signficiant speed-ups.

The code is well inferred but there is a call to _apply instead of the actual method. This dissapears if the number is wrapped in a tuple.

It would be nice to have this fixed so these type of workarounds are no longer needed.

Ref #27434 (comment)

cc @mbauman, @martinholters
Issue 1:
when exporting node's properties using neo4j-shell( start p=node(1) return p;), the data within {..} seems to comply with json protocol as json object, but if there is double quotes(") in property value, no escape for it("), this cause trouble when I try to parse the property data with json libs

Issue 2:
Neo4j 2.0, attempting to copy dumped subgrap into 2nd DB, using the Movies sample graph:

neo4j-shell -port 1338 -c 'dump match n return n limit 500;' |neo4j-shell -path aa -file -

Transaction started
ERROR (-v for expanded information):
SyntaxException: Invalid input 'B': expected whitespace, '.', node labels, '[', "=~", IN, IS, '*', '/', '%', '^', '+', '-', '<', '>', "<=", ">=", '=', "<>", "!=", AND, XOR, OR, ',' or ']' (line 708, column 47)
"create _11396-[:`ACTED_IN` {`roles`:["Brutus "Brutal" Howell"]}]->_11394"

Issue should be somewhere around org.neo4j.cypher.export.SubGraphExporter#formatProperties(org.neo4j.graphdb.PropertyContainer)
Issue 1:
A max number of failures or failure backoff policy for Jobs would be useful.

Imagine you have an ETL job in production that's failing due to some pathological input.

By the time you spot it, it's already been rescheduled thousands of times. As an example, I had 20 broken jobs that kept getting rescheduled; killing them took forever -- and crashed the Kubernetes dashboard in the process.

Today, "restartPolicy" is not respected by Jobs because the goal is to achieve successful completion. (Strangely, "restartPolicy: Never" is still valid YAML.) This means failed jobs keep getting rescheduled. When you go to delete them, you have to delete all the pods they've been scheduled on. Deletes are rate limited, and in v1.3+, the verbose "you're being throttled" messages are hidden from you when you run the kubectl command to delete a job. So it just looks like it's taking forever! This is not a pleasant UX if you have a runaway job in prod or if you're testing out a new job and it takes minutes to clean up after a broken test.

What are your thoughts on specifying a maximum number of failures/retries or adding a failure backoff restart policy?

(cc @thockin , who suggested I file this feature request)

Ninja edit: per this SO thread, the throttling issue is avoidable by using the OnFailure restart policy to keep rescheduling to the same pods, rather than to new pods -- i.e. this prevents the explosion of the number of pods. And deadlines can help weed out failures after a certain amount of time.

However, suppose my ETL job takes an hour to run properly but may fail within seconds if the input data is bad. I'd rather specify a maximum number of retries than a high deadline.

Issue 2:
Today kubectl exec sh depends on a shell being present in each container image. I think we can do better.

What if we had something like kubectl sh which would run a statically linked busybox (or something like that) that was provided by the host node and made that enter the cgroups and namespaces and chroot of the container? We already have a short list of features that only work if the host node has some piece of software installed, this would be the same.
Issue 1:
Hello guys, im facing a problem which im not sure if its a Bug on THREE.js or its really how Points works.. consider the following code:

var maxPoints = 10;
var group = new THREE.Group();

for (var i = 0; i < maxPoints; i++) {

var x = Math.random();
var y = Math.random();
var z = Math.random();

var geometry: new THREE.BufferGeometry(),
var vertices: new Float32Array(maxPoints * 3),

vertices[i * 3 + 0] = x;
vertices[i * 3 + 1] = y;
vertices[i * 3 + 2] = z;

var attribute = new THREE.BufferAttribute(vertices, 3).setDynamic(true);
geometry.addAttribute('position', attribute);

geometry.setDrawRange(i, 1);
// i only want to display one point if i dont set this i end up with 2 points,
// 1 at a random position and one at the center (0,0,0) for all objects in the group

group.add(new THREE.Points(geometry));

}

...
scene.add(group);

The Problem im facing is that by creating a Point using BufferGeometry i always end up with 2 points, one always at the center and another randomly positioned. so if i am to create 1000 points i end up with 2000, been 2000 centered at the coordinates (0,0,0). It`s not 2000 Instance of Points but 1000 instance with 2 dots each, which i dont know how to make it only draw one,

i temporarily fixed it by setting drawRange, but i surely think it`s not the right way, as i end up with a array with lots and lots of 0 values for the bufferposition for each point..

Issue 2:
Not sure if this is a bug, but the triangulation fails, although shape is simple. See the images, code and description of the problem:

http://stackoverflow.com/questions/16241854/holes-in-polygons-causes-triangulation-failure-in-three-js

Without holes works.

Every combination of orientation has no effect.

UPDATE: I checked the Three.js code and there is a link to http://www.sakri.net/blog/2009/06/12/an-approach-to-triangulating-polygons-with-holes/, which says that 90% of times it works.

If that method is used for triangulation in Three.js, 90% propability is not acceptable in production environments.