WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hi,

I would like to use the kubelet API from pkg/kubelet/server.go. However, I could not find any documentation around it. Could someone pls. point me to the right place? Thanks :)

Issue 2:
I've noticed at least 10 separate test flake issues open in which at least one failure looks like this:

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:128
Jul 20 11:12:15.579: Couldn't delete ns "e2e-tests-kubectl-2k86f": namespace e2e-tests-kubectl-2k86f was not deleted within limit: timed out waiting for the condition, pods remaining: []

Current list: https://github.com/kubernetes/kubernetes/issues?utf8=✓&q=is%3Aissue%20label%3Akind%2Fflake%20is%3Aopen%20%22was%20not%20deleted%20within%20limit%22

The 10 current issues (note that some are 'broken test run' issues and might have multiple failure causes):

#28827

#28722

#28656

#28514

#28440

#28413

#28383

#27524

#27503

#26982

cc @derekwaynecarr @wojtek-t
Issue 1:
System information (version)

OpenCV => 4.2 python

Operating System / Platform => 20.04.1-Ubuntu x86_64

Compiler => binary provided by apt package

Detailed description

It seems that cv2.cornerSubPix function does only accept the corners output from cv2.findChessboardCorners directly.

Reversing this list in python leads to an error:

corners = corners[::-1,:,:]

TypeError: Expected Ptrcv::UMat for argument 'corners'

Storing the inverted corners inplace does work:

corners[:] = corners[::-1,:,:]

Steps to reproduce

import cv2
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
img = cv2.imread("test.png")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

ret, corners = cv2.findChessboardCorners(gray, (4,6), None)
if ret == True:
print(corners.__class__) # <class 'numpy.ndarray'>
corners2 = cv2.cornerSubPix(gray, corners, (11,11), (-1,-1), criteria) # works

corners[:] = corners[::-1,:,:] # reverse inplace
print(corners.__class__) # <class 'numpy.ndarray'>
corners2 = cv2.cornerSubPix(gray, corners, (11,11), (-1,-1), criteria) # also works

corners = corners[::-1,:,:] # reverse into new object
print(corners.__class__) # <class 'numpy.ndarray'>
corners2 = cv2.cornerSubPix(gray, corners, (11,11), (-1,-1), criteria) # Error: TypeError: Expected Ptr<cv::UMat> for argument 'corners'

test.png.tar.gz

Issue submission checklist

I report the issue, it's not a question

I checked the problem with documentation, FAQ, open issues,

forum.opencv.org, Stack Overflow, etc and have not found solution

I updated to latest OpenCV version and the issue is still there

There is reproducer code and related data files: videos, images, onnx, etc

Issue 2:
System information (version)

OpenCV => opencv-contrib-python-headless==4.1.1.26

Operating System / Platform => OS X

Detailed description

I create three 3-channel images and draw a circle into them. In the second case I use the step trick A[:, :, ::-1] to flip the R and B channels in the image, emulating cv.cvtColor with COLOR_BGR2RGB. I then try to draw into that array. The result, as seen in the screenshot, is that nothing gets drawn. In the third case I explicitly make a copy of the channel-flipped array (which is actually a view) before drawing, and it works.

Expected is that cv.circle works in all three cases.

Steps to reproduce

import cv2 as cv

image1 = np.zeros((100, 100, 3), dtype='uint8')
cv.circle(image1, (50, 50), 10, (255, 255, 255), -1)

image2 = np.zeros((100, 100, 3), dtype='uint8')
image2 = image2[:, :, ::-1]
cv.circle(image2, (50, 50), 10, (255, 255, 255), -1)

image3 = np.zeros((100, 100, 3), dtype='uint8')
image3 = np.array(image3[:, :, ::-1])
cv.circle(image3, (50, 50), 10, (255, 255, 255), -1)

imshow(image1, image2, image3)
Issue 1:
Perhaps it's duplicated, if it's the case, please redirect me, but how can I make a test that verifies that some piece of invalid code gets rejected by type checker?

Authors: @andy-ms

Issue 2:
Latest changes by @jacobwgillespie @RyanCavanaugh may have caused this issue. "@ types/react": "^16.3.11" causes this error because it loads 16.3.12 which breaks. Removing ^ from the version like "16.3.11" fixes the problem.

The TS starter kit of Microsoft fails too. https://github.com/Microsoft/TypeScript-React-Starter
Issue 1:
Challenge http://www.freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Images:

Single quotes do not work, but double quotes work. From my understanding it should not matter which quotes are used.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life has an issue.

The second condition for this challenge:

You should have used the the selector given in the description to select each slot and assign it the value of slotOne, slotTwo and slotThree respectively

The selector in the description:

$($(".slot")[0]).html(slotOne);

The condition passes when you use double quotes in the selector per the description:

$($(".slot")[0]).html(slotOne);
$($(".slot")[1]).html(slotTwo);
$($(".slot")[2]).html(slotThree);

It fails with single quotes:

$($('.slot')[0]).html(slotOne);
$($('.slot')[1]).html(slotTwo);
$($('.slot')[2]).html(slotThree);

Maybe we are trying to conform to the jQuery JavaScript Style Guide? Still, both seem to be valid JavaScript. Indeed, the challenge immediately following this one uses single quotes for the selector in the description and passes with either single or double quotes.

Waypoint: Give your JavaScript Slot Machine some stylish images

$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
Issue 1:
The picture in tf.gather is wrong. It is P_5 in the params that should point to P_5 in indices.

Issue 2:
System information

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

Python version: 2.7

Bazel version (if compiling from source): 0.22.0

GCC/Compiler version (if compiling from source): gcc version 8.2.0 (Debian 8.2.0-20)

CUDA/cuDNN version: No

GPU model and memory: No

== cat /etc/issue ===============================================

Linux rockpro64 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

VERSION="18.04.1 LTS (Bionic Beaver)"

VERSION_ID="18.04"

VERSION_CODENAME=bionic

== are we in docker =============================================

No

== compiler =====================================================

c++ (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0

Copyright (C) 2018 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

== uname -a ImportError: cannot import name cloud=====================================================

Linux rockpro64 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

== check pips ===================================================

numpy 1.16.1

protobuf 3.6.1

tensorflow 1.12.0

tensorflow-aarch64 1.2

tensorflow-estimator 1.13.0rc0

== check for virtualenv =========================================

False

== tensorflow import ============================================

Limited tf.compat.v2.summary API due to missing TensorBoard installation

tf.VERSION = 1.12.0

tf.GIT_VERSION = v1.12.0-8122-g7328add9da

tf.COMPILER_VERSION = v1.12.0-8122-g7328add9da

Sanity check: array([1], dtype=int32)

== env ==========================================================

LD_LIBRARY_PATH is unset

DYLD_LIBRARY_PATH is unset

== nvidia-smi ===================================================

./tf_env_collect.sh: line 105: nvidia-smi: command not found

== cuda libs ===================================================

rock64@rockpro64:~/Documents$ python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

('v1.12.0-8122-g7328add9da', '1.12.0')

following is the error. NO module name cloud.

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/lazy_loader.py", line 44, in _load

module = importlib.import_module(self.name)

File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module

import(name)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/init.py", line 31, in

from tensorflow.contrib import cloud

ImportError: cannot import name cloud
Issue 1:
Example:

class Class1 {
private privateMember;
}

class Class2 implements Class1 {
}

The compiler says:

Property 'privateMember' is missing in type 'Class2'

But obviusly a private member never will be part of an interface.

Issue 2:
Hi, we have a requirement to create mocks of real classes defined in code. The exact requirements are

A specific mock should define the public API of the real class.

If the public API of the real class changes in any way then the compiler should detect the corresponding breakage in the mock class.

A possible solution might be as follows:

declare var fileWriter: any;

// Real class
class Foo {

public writeToFile(){
fileWriter.writeToFile('');
}
}

// Mock
class MockFoo implements Foo {

public writeToFile(){
// do nothing
}
}

This appears to solve the problem because changing Foo.writeToFile will trigger a compilation error along the lines of "Class MockFoo declares interface Foo but does not implement it..."

The problem with this approach is that class Foo is not permitted to have any private methods or fields. If we were to add a private method foo() to class Foo then it's no longer possible for MockFoo to implement Foo because the compiler doesn't permit it.

I suggest that when a class implements another class the implementing class be allowed to ignore the private fields and methods (both static and instance) of the implementee.

(I am aware that there are workarounds, such as declaring an interface that both Foo and MockFoo implement, but that introduces an unnecessary maintenance overhead.)
Issue 1:
Hi,

There's a problem when i want to remove directories retrieved by finder instance. The problem is that the directory is successfully deleted but there was an exception generated after that:

RecursiveDirectoryIterator::__construct(/home/fattouch/NordnetProjects/diamant/app/../web/data/tmp/in/email/attachments): failed to open dir: No such file or directory

Issue 2:
When you access the \Symfony\Component\Serializer\Normalizer\AbstractNormalizer::getAllowedAttributes method with $attributesAsString = false, you run into the following issue:

Uncaught exception 'Symfony\Component\Debug\Exception\ContextErrorException' with message 'Catchable Fatal Error: Object of class Symfony\Component\Serializer\Mapping\AttributeMetadata could not be converted to string' in .../Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php:207

This is due to the fact that array_unique can only be used with arrays of scalars. As it includes instances of AttributeMetadataInterface, we get the exception.

Why there is no test case throwing this error is due to fact that this method never gets called with $attributesAsString = false. So I would propose to set the default value parameter for the parameter $attributesAsString to true or even remove the possibility to return AttributeMetadataInterface[]. (Because this error occurs, we know that nobody could have ever used this feature.)

I could fix this by myself by replacing the line of code with:

if ($attributesAsString) {
$allowedAttributes = array_unique($allowedAttributes);
}
return $allowedAttributes;

Kind regards,

Konstantin
Issue 1:
by bortzmeyer:

Which operating system are you using?

Debian "squeeze"

Which revision are you using? (hg identify)

9b116c4a5f91 tip

Please provide any additional information below.

The function isDomainName actually check that its argument is a valid HOST name, not
that it is a valid DOMAIN name. (URLs use host names, for instance, but not all
protocols do. See RFC 2181, section 11, for a discussion of the difference) Legitimate
domain names like _jabber._tcp.gmail.com yield false.

This is related to bug #1167 but it seems there is no way in the bug tracker to reopen a
closed bug.

Issue 2:
by capnm9:

uname -a
Linux rpi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux

A simple app with RPi specific OpenVG bindings:

GOTRACEBACK=3 ./bin/clock
fatal error: malloc/free - deadlock
[signal 0xb code=0x1 addr=0x2f0 pc=0x2d4dc]

goroutine 1 [syscall]:
[fp=0xb6899ee4] return()
/data4/go-bs/src/pkg/runtime/asm_arm.s:275
[fp=0xb6899f0c] runtime.cgocall(0xb861c, 0xb6899f1c)
/data4/go-bs/src/pkg/runtime/cgocall.c:162 +0xec
[fp=0xb6899f18] openvg._Cfunc_init(0x102001a8, 0x102001a0)
openvg/_obj/_cgo_defun.c:328 +0x30
[fp=0xb6899f2c] openvg.Init(0x0, 0x17fac)
openvg/_obj/_cgo_gotypes.go:296 +0x58
[fp=0xb6899fb8] main.main()
/home/pi/s/w/github/capnm/go_rpi/src/clock/clock.go:15 +0x28
[fp=0xb6899fd0] runtime.main()
/data4/go-bs/src/pkg/runtime/proc.c:182 +0x78
[fp=0xb6899fd4] runtime.goexit()
/data4/go-bs/src/pkg/runtime/proc.c:1214

goroutine 2 [syscall]:
runtime.goexit()
/data4/go-bs/src/pkg/runtime/proc.c:1214

goroutine 3 [syscall]:
runtime.entersyscallblock()
/data4/go-bs/src/pkg/runtime/proc.c:1324 +0xc0
runtime.MHeap_Scavenger()
/data4/go-bs/src/pkg/runtime/mheap.c:434 +0xfc
runtime.goexit()
/data4/go-bs/src/pkg/runtime/proc.c:1214
created by runtime.main
/data4/go-bs/src/pkg/runtime/proc.c:165

Unfortunately this commit additionally broke the arm build,
but with the fix applied it appears to be a the
first bad commit:

https://code.google.com/p/go/source/detail?name=95c3a7bdfb03&;r=97cbf15abc2c18b2616349d1f936cd6e7a584b76
cmd/ld: replace -hostobj with -linkmode
Still disabled. Need to fix TLS.

fix
https://code.google.com/p/go/source/detail?name=95c3a7bdfb03&;r=31ae6d73fdb0b39373980163598dbad85ba0afb7

strace, gdb, etc.:
https://github.com/capnm/golang/wiki/bisect-clock-app
Issue 1:
Seems like the HTML is appended twice to the phone viewer when a new challenge is loaded (see screen shot below). As soon as the exercise code is changed it is rendered correctly.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-line-up-form-elements-responsively-with-bootstrap has an issue.

I think the problem is happening on all Waypoint pages; the device right side of the screen where the CatPhotoApp page displays the information is being displayed duplicated;

Another point is that the HTML / CSS code is not completely displayed when the page is loaded, it is necessary to click or edit the code so that the code from the previous lesson is displayed correctly;
Issue 1:
When I click a menu (e.g. File), mouse over to a different menu (e.g. Edit) and click again, I expect the menu to be dismissed. Instead, it flickers and I need to click again to dismiss it. If I click the same menu I clicked the first time (File in the example above), the drop down is dismissed as expected.

I'm using Atom 1.2.4 on Windows 10. The bug is also present in Visual Studio Code.

Issue 2:
If I click File and then click File again, the menu closes (correctly).

If I click File and then click a different top-level menu item (Edit, View, Selection, etc.) the menu blinks closed and then reopens immediately (incorrectly).

Tested on Electron 0.29.2 and Atom 1.0.2, Windows 8.1.
Issue 1:
Panic on format:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli\fmt_errors.rs:211:45

It only panic's specifically on this specific line:

if (name === this.#DB[i].name) throw new Error(name);

I wanted to provide a log but idk how to run with RUST_BACKTRACE=1

deno info:

deno 1.7.1 (release, x86_64-pc-windows-msvc)

v8 8.9.255.3

typescript 4.1.3

Issue 2:
I'm experiencing a strange bug with Deno.

When a exception is thrown the main process panics. This is the trace:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli\fmt_errors.rs:86:8
stack backtrace:
0: 0x7ff7af88a45b - <unknown>
1: 0x7ff7af53cecc - <unknown>
2: 0x7ff7af889483 - <unknown>
3: 0x7ff7af888bb8 - <unknown>
4: 0x7ff7af887d2e - <unknown>
5: 0x7ff7af88efe5 - <unknown>
6: 0x7ff7af53a4b0 - <unknown>
7: 0x7ff7af53a2cc - <unknown>
8: 0x7ff7af36cbf2 - <unknown>
9: 0x7ff7af48ada8 - <unknown>
10: 0x7ff7af48b345 - <unknown>
11: 0x7ff7af53cecc - <unknown>
12: 0x7ff7af751885 - <unknown>
13: 0x7ff7af349c1d - <unknown>
14: 0x7ff7af4daf6f - <unknown>
15: 0x7ff7af8aa3f6 - <unknown>
16: 0x7ff7af4ea67e - <unknown>
17: 0x7ff7b048bf10 - CrashForExceptionInNonABICompliantCodeRange
18: 0x7ff8e9777bd4 - BaseThreadInitThunk
19: 0x7ff8ea16ce51 - RtlUserThreadStart

I don't know how to reproduce the bug but it happened in my project so I tried to isolate it in a separated branch:

https://github.com/AndreJesusBrito/WebAssembly-Language-Compiler/tree/rust-exception-bug-isolation

The bug happens in file src/SyntaxAnalysis/SyntaxRule.ts at line 25 when I throw an exception.

...
public getDerivation(terminal: string): RuleDerivation {
const derivation = this.derivations.get(terminal);
if (derivation) {
return {
derivationSymbols: [...derivation.derivationSymbols].reverse(),
actions: derivation.actions,
};
} else {
throw SyntaxError("Unexpected token '" + terminal + "' at rule " + this._name); // THIS IS LINE 25
}
}

public setDerivation(rule: SyntaxSymbol[], actions: ActionObj[], ...terminals: string[]): void {
for (const terminal of terminals) {
if (this.derivations.get(terminal) instanceof Array) {
console.warn("'" + terminal + "' repeated terminal for rule " + this._name);
...

Even though I'm using a SyntaxError (that is not a very good idea and will change later) it seems to happen for any error including the base Error class.

The most strange thing to me is that by changing the white space on this file it can work correctly.

For example, when I remove line 28 it works fine:

error: Uncaught SyntaxError: Unexpected token '' at rule none
public setDerivation(rule: SyntaxSymbol[], actions: ActionObj[], ...terminals: string[]): void {
^
at SyntaxRule.getDerivation (file:///C:/Users/Andr%C3%A9%20Brito/Documents/GitHub/WebAssembly-Language-Compiler/src/SyntaxAnalysis/SyntaxRule.ts:28:13)
at file:///C:/Users/Andr%C3%A9%20Brito/Documents/GitHub/WebAssembly-Language-Compiler/src/main.ts:4:1

I'm running using the command:

deno run src\main.ts

and my specs are:

deno 1.2.2
v8 8.5.216
typescript 3.9.2
OS: Windows_NT x64 10.0.18362

Hope this helps! :)
Issue 1:
Hello Vue Lovers! :D

Today I realized that there is something I really miss in VueJS that I liked in Angular2.

It's the ? operator. It's explained very good here:

https://angular.io/docs/ts/latest/guide/template-syntax.html#!#safe-navigation-operator

I give a quick example.

Everybody knows this problem.

If I get a hero async and I want to display a subproperty like this:

The null hero's name is {{ hero.address.street }}

.. and the hero is not yet loaded, I will get an error like this:

TypeError: Cannot read property 'address' of undefined.
or
TypeError: Cannot read property 'address' of street

Usually we have to make a

v-if="hero && hero.address"

or something like that.

That's why in Angular2 they have the so-called "? operator"

So you can do something like this:

The null hero's name is {{ hero?.address?.street }}

So it will do the if statements for us in a really convenient way.

Is it possible to integrate something like this in VueJS?

This would be amazing! :)

Issue 2:
Feature Request

Problem

While accessing the data from view in template expression, if a null object is used like below :

{{ book }}

View is rendered and displayed value is blank.

Suppose the template expression involves a property path, as in this next example where we’re displaying the name of a null book.

{{ book.name }}

This would throw a null reference error :

TypeError: Cannot read property 'name' of null.

Workaround

We can find a workaround for this using a conditional block like this:

<div v-if="book">
{{ book.name }}
</div>

But if we have a use case where we need a property path deep into the object some thing like this ?

a.b.c.d

Solution

We can use a safe navigation operator ( ?. ) or elvis operator similar to Angular 2. That can help in reducing a lot of conditional tags in a complex code.
Issue 1:
Migrated issue, originally created by Anonymous

This issue occurs under the following circumstances:

When a relationship has the cascade property set to "all, delete-orphan",

There is a UniqueConstraint set on the child model

Simultaneously deleting and creating new child objects, through the backref on the parent, that have common values in the unique fields

I believe this is a bug, and that it can be fixed by first deleting the removed children, followed by insertion of new children.

The following example recreates the issue on SQLAlchemy 0.8.1.

from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, Float, UniqueConstraint, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship, backref
from sqlalchemy.orm.dependency import OneToManyDP, attributes

Base = declarative_base()

class ParentEntity(Base):
__tablename__ = 'parent'

id = Column(Integer, primary_key=True)
name = Column(String)

class ChildEntity(Base):
__tablename__ = 'child'

__table_args__ = (UniqueConstraint('parent_id', 'z', name='child_uk'),)

id = Column(Integer, primary_key=True)
parent_id = Column(Integer, ForeignKey('parent.id'), nullable=False)
z = Column(Float)

parent = relationship("ParentEntity",
backref=backref("children",
cascade="all, delete-orphan"))

engine = create_engine('sqlite://', echo=True)
Session = sessionmaker(bind=engine)

sess = Session()
Base.metadata.create_all(engine)

p = ParentEntity(name='Datum')
p.children = [ChildEntity(z=3.5), ChildEntity(z=5.5)](ChildEntity(z=2.5),)
sess.add(p)
sess.commit()

# Remove all existing children and create new, one of which is identical to a previously existing child
p.children = [ChildEntity(z=5.5)](ChildEntity(z=4.0),)
sess.commit()

Running this example produces the following error:

sqlalchemy.exc.IntegrityError: (IntegrityError) columns parent_id, z are not unique u'INSERT INTO child (parent_id, z) VALUES (?, ?)' (1, 5.5)

Attachments: echo_out.txt

Issue 2:
When I try to compile a query with datetime parameters using literal_binds, e.g.:

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, DateTime
from sqlalchemy.orm import sessionmaker
from datetime import datetime

engine = create_engine('sqlite:///:memory:', echo=True)
Base = declarative_base()
class M(Base):
__tablename__ = 'M'
d = Column(DateTime, primary_key=True)

Session = sessionmaker()

print(Session().query(M).filter(
M.d < datetime.now()
).statement.compile(
compile_kwargs={'literal_binds': True}
))

the engine gives me the following error

NotImplementedError: Don't know how to literal-quote value datetime.datetime(2019, 12, 25, 14, 26, 42, 756674)

There probably should be a default representation for datetimes as an iso-formatted string in single quotes.
Issue 1:
I have a textfield that has keyboard type multiline and maxLines: null. The text will wrap on any device (including my real one) while I run the code in debug mode, but only continues on the same line when I run it on release mode.

new TextField( decoration: new InputDecoration.collapsed( hintText: 'Blah blah blah...'), maxLines: null, keyboardType: TextInputType.multiline, controller: _storyDescriptionController, ),

Issue 2:
From @mehmetf

Turns out the effect is dependent on the widgets in the column.

The following is consistent between --debug and --release:

Column(
children: [
new TextFormField(maxLines: null),
new TextFormField(maxLines: null),
],
),

Column(
children: [
new TextFormField(maxLines: null),
],
),

The following produces different behavior in --debug than --release mode.

Column(
children: [
new TextFormField(maxLines: null),
new TextFormField(maxLines: 1),
],
),