WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Duplicate some addEventListener signature in XMLHttpRequest interface. onxxx props are not, but addEventListener methods are duplicate. At least, this is inconsistent coding.

actual:

// lib.d.ts
interface XMLHttpRequestEventTarget {
onabort: (ev: Event) => any;
onerror: (ev: Event) => any;
onload: (ev: Event) => any;
onloadend: (ev: ProgressEvent) => any;
onloadstart: (ev: Event) => any;
onprogress: (ev: ProgressEvent) => any;
ontimeout: (ev: ProgressEvent) => any;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}

interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
...
onreadystatechange: (ev: ProgressEvent) => any;
...
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}

expected:

// lib.d.ts
interface XMLHttpRequestEventTarget {
...
}

interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
...
onreadystatechange: (ev: ProgressEvent) => any;
...
addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}

Issue 2:
class Test {
num: number;

constructor(num: number) {
this.num = num;
}
}

var t = new Test(1);
var u = new t.constructor(2);

This code throws a compile error, but appears to produce valid code when entered into http://www.typescriptlang.org/Playground.

EDIT:

This code correctly compiles after changing the last line to:

var u = new (<{ new(...args: Array<any>): Test }>t.constructor)(2);
Issue 1:
Memory keeps growing at every iteration. My pytorch version 0.4.0a0+4d405a4.

import torch
from torch.autograd import grad, Variable
from torchvision import models

model = models.resnet50().cuda()
for k in range(20):
x = Variable(torch.rand(8, 3, 224, 224).cuda(), requires_grad=True)
dx, = grad(model(x).sum(), x, create_graph=True)
y = model(x + dx).sum()
y.backward()

This code is from Double backward memory leak. It work well and no memory leak. But use

y = dx.mean()
y.backward()

the memory leak is happen.

Issue 2:
Originally reported by @dmarnerides in #3743:

I can reproduce the memory leak with this:

import gc
import resource
import torch
from torch import nn, autograd
from torch.autograd import Variable

class Network(nn.Module):
def __init__(self):
super(Network, self).__init__()
self.main = nn.Sequential(
nn.Conv2d(1, 1, 1, 1),
nn.Conv2d(1, 1, 1, 1),
)
def forward(self, v_x):
return self.main(v_x).view(v_x.size(0), 1)

net = Network()

i = 0
while True:
v_in = Variable(torch.Tensor(2,1,1,1), requires_grad=True)
grad_out = Variable(torch.ones(2,1,1,1))

gradient = autograd.grad(outputs=net(v_in), inputs=v_in,
grad_outputs=grad_out,
create_graph=True, retain_graph=True,
only_inputs=True)[0]
gradient.mean().backward()

i += 1
if i % 512 == 0:
gc.collect()
max_mem_used = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
print("{:.2f} MB".format(max_mem_used / 1024))

However the leak disappears when only one convolution is used:

class Network(nn.Module):
def __init__(self):
super(Network, self).__init__()
self.main = nn.Sequential(
nn.Conv2d(1, 1, 1, 1),
)
def forward(self, v_x):
return self.main(v_x).view(v_x.size(0), 1)

Also, if nn.Linear is used, there is no leak.

Torch version: 0.4.0a0+8ebf18b
Issue 1:
Challenge create-visual-balance-using-the-textalign-property has an issue.

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0.

This is my HTML Code. I followed the instruction in the challenge, but it keeps saying Keep trying.

<style>
h4 {
text-align:center;
}
p {
text-align:justify;
}
.links {
margin-right: 20px;
text-align:left;
}
.fullCard {
border: 1px solid #ccc;
border-radius: 5px;
margin: 10px 5px;
padding: 4px;
}
.cardContent {
padding: 10px;
}
</style>
<div class="fullCard">
<div class="cardContent">
<div class="cardText">
<h4>Google</h4>
<p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
</div>
<div class="cardLinks">
<a href="https://en.wikipedia.org/wiki/Larry_Page" class="links">Larry Page</a>
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" class="links">Sergey Brin</a>
</div>
</div>
</div>

```

Issue 2:
I have a potential issue with the Symmetric Difference Bonfire. I do not believe symmetric difference should be order dependent, but the current tests rely upon a deep equality implementation that seems to care about order. For instance with the code below I get the following error: "expected [ 3, 4, 5 ] to deeply equal [ 3, 5, 4 ]"

function sym() {
var count = Object.create(null); // hash object
var sets = Array.prototype.slice.apply(arguments); // array of sets
sets.forEach(function(set) {
// filter not unique elements
set.reduce(function(prev,curr) {
if (prev.indexOf(curr) === -1) {
prev.push(curr);
}
return prev;
},[]).forEach(function(el) {
count[el] = !count[el];
});
});
return Object.keys(count).filter(function(el) {
return count[el];
}).map(function(el) {
return +el;
});
}
sym([1, 2, 3], [5, 2, 1, 4]);
Issue 1:
got an error after pressing ^C:

npm ERR! cb() never called!

Full Error:

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/okleodai/.npm/_logs/2020-01-07T02_31_32_703Z-debug.log

Complete Log:

0 info it worked if it ends with ok

1 verbose cli [

1 verbose cli '/usr/local/Cellar/node/12.10.0/bin/node',

1 verbose cli '/usr/local/bin/npm',

1 verbose cli 'start'

1 verbose cli ]

2 info using npm@6.12.0

3 info using node@v12.10.0

4 verbose run-script [ 'prestart', 'start', 'poststart' ]

5 info lifecycle picss@0.1.0prestart: picss@0.1.0

6 info lifecycle picss@0.1.0start: picss@0.1.0

7 verbose lifecycle picss@0.1.0start: unsafe-perm in lifecycle true

8 verbose lifecycle picss@0.1.0start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/okleodai/Desktop/Tech/webdev2/prod/picss/node_modules/.bin:/Users/okleodai/.rbenv/shims:/anaconda3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/okleodai/.rbenv/shims:/anaconda3/bin

9 verbose lifecycle picss@0.1.0start: CWD: /Users/okleodai/Desktop/Tech/webdev2/prod/picss

10 silly lifecycle picss@0.1.0start: Args: [ '-c', 'react-scripts start' ]

11 silly lifecycle picss@0.1.0~start: Returned: code: null signal: SIGINT

12 timing npm Completed in 8166154ms

13 error cb() never called!

14 error This is an error with npm itself. Please report this error at:

15 error https://npm.community

Issue 2:
What / Why

As a developer you would like to leave comments in the same context as you write code to note down todo's, leave hints for other devs or other reasons. Most of my code allows for this except for package.json, at least, there is no standard. After reading this blog I think this should be a standard, in a way that more people use the same notation and my IDE or VSC highlights comments as a comment.

When

at code-time

Where

package.json

How

The proposed standard (for now) is that above a specific property in an array, you note down the same property prefixed with @comment<space>.

Current Behavior

@comment is not a common standard

if this is done and agreed in this context, I can follow through and talk to IDE's repos

n/a

Expected Behavior

@comment is not a common standard

n/a

Who

n/a

References

this blog

n/a
Issue 1:
Hello,

Atom is great. I am working with a cloud server and don't have the fastest internet connection. I have the server mounted via win-sshfs. When I save, it sometimes takes 5-10 seconds for the file to get transferred and saved, and Atom is completely frozen during that time. It would be great if Atom had the option to do asynchronous saves so that I could keep editing while the file is being uploaded to the server.

Issue 2:
Issue 1:
Hello,

I just found out a bug. When you've created a navbar with dropdown links, when you select a link in the dropdown (form Mobile version), it doesn't select the link, but closes the collapsible dropdown.

Visual example:

| Link #1

| Link #2

| Dropdown

|_ Dropdown Link #1

|_ Dropdown Link #2

So, if you select the "Dropdown Links", it's closes the collapsible Dropdown, but not redirecting to the "Dropdown Links".

Issue 2:
I had a project using more or less the same menu and it worked. Found out it was using Bootstrap version 2.3.1. Compared version 2.3.2 and 2.3.1 and found that in version 2.3.2 there's this snippet of CSS that reads:

.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 990;
}

and the rule: position: fixed; seems to cause all the problems.

I still don't undertand the point of the markup that is added by the bootstrap dropdown plugin:

<div class="dropdown-backdrop"></div>

So I've temporarily fixed the bug on my end by adding a style to override the style causing the problem:

.dropdown-backdrop {
position: static;
}

To me this looks like a bug introduced from version 2.3.1 to 2.3.2. Maybe I'm wrong. If someone could explain the purpose of the empty div, it would be helpful.
Issue 1:
Bug report

Bug summary

When trying to show a figure under the TkAgg backend, my system crashes when calling plt.show() (some quick googling led me to a seemingly similar issue #10833).

Code for reproduction

I use the following script:

import sys
print("Python", sys.version)

import matplotlib
matplotlib.use("TkAgg") # use interactive Agg backend
print("Matplotlib", matplotlib.__version__, "(backend: " + matplotlib.get_backend() + ')')
import matplotlib.pyplot as plt

plt.plot([0], [0])

plt.show()

Actual outcome

When running this, my system crashes and immediately prompts the log-in screen. When logging back in, all the programs that were running restart, as if the system completely restarted.

Expected outcome

When leaving out the line specifying to use the TkAgg backend, the code shows the empty plot as expected, as well as the output:

Python 3.7.3 (default, Mar 27 2019, 16:54:48)
[Clang 4.0.1 (tags/RELEASE_401/final)]
Matplotlib 3.1.0 (backend: MacOSX)

Alternatively, leaving out the plt.show() command means the code does not cause any trouble, either.

Matplotlib version

Operating system: Mac OSX 10.14.6

Matplotlib version: 3.1.0

Matplotlib backend: MacOSX/TkAgg

Python version: 3.7.4

I installed the latest version of the conda distribution and run this in the base environment.

Issue 2:
Summary

I am looking for a one-call way to plot multiple stacked bars in one chart by giving it a 2D-Matrix for the y-axis.

This feature request is similar to #11048, where the bars are placed next to each other.

The documentation for matplotlib.pyplot.bar just allows scalar or array-like inputs.

The data used contains 2 x 8760 timesteps (hours). ATM I work with stackplot to generate the following graphs. Just the third graph is relevant to this issue.

My workaround would be to use stackplot for a lineplot:

`ax1.stackplot(x,y, labels=labels)

and duplicate the data in 'y' - shift the duplication just a second before the next timestep (hour) and merge those sets.

Expected outcome

I found a function that fits my problem but is not scalable for bigger arrays. (creation time is long and editing the view takes forever) But the bars in this case have a gap between the bars. I am looking for a way to adjust the width, so the gaps can be closed.

I think the value and x-axis labels are responsible for the long calculation, but I am not sure.

Matplotlib version

Operating system: Windows 10

Matplotlib version: 3.03

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

Python version: 3.6.7
Issue 1:
Problem

cli.py:shell_command (flask shell) creates a context and passes it to code.interact

This leaves tab completion broken:

>>> stuff = 5
>>> stuTABTABTABTAB <- no match

Suggestion

This can be remedied by supplying a completer to readline:

>>> import readline
>>> import rlcompleter
>>> readline.set_completer(rlcompleter.Completer(globals()).complete)
>>> stuTAB <- stuff! yay!

Or perhaps flask/__main__.py could be used as the context:

file: flask/cli.py

...
def shell_command():
...
import __main__
ctx = __main__.__dict__
...

Issue 2:
When I running a flask app with debug=True in virtualenv, the cpu usage increase to 20%. But if I set debug=False, the cpu usage is only 1%.

If I running without virtualenv, all is ok.
Issue 1:
In the The Local Weather App example (http://codepen.io/AdventureBear/pen/yNBJRj), the weather information (temperature, current weather, and wind speed) is no longer showing up. The reason appears to be that the Open Weather Map API where the app is pulling the data from now requires you to sign up for an API key. I tested this out on my own version and once I added the key, the page worked again.

Issue 2:
Our Weather Zipline example is now broken. Aparently the API @AdventureBear used on her Zipline no longer works. https://www.evernote.com/l/AlwSsfX2kblJYoOSp9uAq-BKFosOSCg8-aAB/image.png

We need to find an API that works and doesn't require adding an API key, or we need to make an API endpoint on Free Code Camp that campers can use (we don't want people exposing API keys on CodePen).

Thanks to @martoncsikos for spotting this issue.
Issue 1:
For current documentation, the font on the left panel is quite shallow and a bit hard to read. It might be nice to make it darker to improve the readability.

Issue 2:
While the new documentation style looks sleeker, I find its readability awful

I can barely read the text in the grey-on-grey left navbar and the text of the main content is much too thin to be read comfortably.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @brianjo @mruberry
Issue 1:
In [2]: np.arange(20, dtype='uint') << 64
Out[2]: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=uint64)

In [3]: np.arange(10, dtype='uint') << 64
Out[3]: array([0, 0, 0, 0, 0, 0, 0, 0, 8, 9], dtype=uint64)

In [4]: np.arange(5, dtype='uint') << 64
Out[4]: array([0, 1, 2, 3, 4], dtype=uint64)

My understanding is that while numpy.left_shift should execute a rotation (despite the docs not mentioning this word), the << operator should execute a shift (that is, drop overflowing bits). At least, things seem to work this way with values below 64:

In [5]: (np.arange(20, dtype='uint') << 63 == (np.arange(20, dtype='uint') % 2 * 2) ** 63).all()
Out[5]: True

In [6]: (np.arange(10, dtype='uint') << 63 == (np.arange(10, dtype='uint') % 2 * 2) ** 63).all()
Out[6]: True

In [7]: (np.arange(5, dtype='uint') << 63 == (np.arange(5, dtype='uint') % 2 * 2) ** 63).all()
Out[7]: True

Instead with 64 some cases (In [2]:) shift, some (In [4]:) rotate, and some (In [3]:) mix the two behaviors!

I'm using uint for simplicity, but the behavior is not limited to unsigned ints:

In [8]: np.arange(20) << 64
Out[8]: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])

In [9]: np.arange(5) << 64
Out[9]: array([0, 1, 2, 3, 4])

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1856 on 2011-06-02 by trac user klasj, assigned to unknown.

The bitshift operations, both right and left cycles when they are shifted more bits than

the length of the datatype. This happens for both int32 and int64 but not for int16,

unsigned integers works as expected. In the example below version 1.6.1 is used but

this is also present in at least 1.5.0.

In [1]: import numpy as np

In [2]: np.right_shift(np.int32(8),32)

Out[2]: 8

In [3]: np.right_shift(np.int64(8),64)

Out[3]: 8

In [4]: np.right_shift(np.int16(8),16)

Out[4]: 0

In [5]: np.left_shift(np.int32(8),32)

Out[5]: 8

In [6]: np.left_shift(np.int64(8),64)

Out[6]: 8

In [7]: np.left_shift(np.int16(8),16)

Out[7]: 524288

In [8]: np.version.full_version

Out[8]: '1.6.1.dev-08953ea'
Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

mysql_user

ANSIBLE VERSION

ansible 2.3.0.0
config file =
configured module search path = Default w/o overrides

CONFIGURATION

Default configuration

OS / ENVIRONMENT

N/A

SUMMARY

From the MySQL 5.7 what's new page:

The server now requires account rows in the mysql.user table to have a nonempty plugin column value and disables accounts with an empty value.

On a fresh installation of MySQL 5.7 the root user for host localhost is now configured with a plugin value of auth_socket. This prevents users other then root to connect as root using the mysqlclient utility:

user@server$ mysql -u root -pP4ssw0rd
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

While as root this works:

root@server# mysql

Currently, this cannot be done with Ansible.

References:

https://dev.mysql.com/doc/refman/5.7/en/socket-pluggable-authentication.html

https://www.slideshare.net/ottokekalainen/passwordless-login-with-unix-authsocket

STEPS TO REPRODUCE

It would be nice to introduce a new parameter to this module which accepts all possible plugin values (defaulting to mysql_native_password) , e.g.:

mysql_user: name=root password=abc123 plugin=mysql_native_password
mysql_user: name=root plugin=auth_socket

EXPECTED RESULTS

N/A

ACTUAL RESULTS

N/A

CHALLENGES

@oscherler noted that the syntax varies between MySQL and MariaDB: ansible/ansible-modules-core#3587 (comment)

@wouteroostervld added that you have to change the plugin and password in one action, to avoid exposure: ansible/ansible-modules-core#3003 (comment)

NOTES

Issue migrated from ansible/ansible-modules-core#3003

Releated PR: ansible/ansible-modules-core#3587

I changed a few details:

@verwilst mentioned that you can use either a password or auth_socket not both: ansible/ansible-modules-core#3003 (comment)

I updated the format to follow the latest one

I updated the ansible version output, even if not very usefull in this case

I also added some references and a challenges section

Issue 2:
For instance, in a role's vars/main.yml, I have the following:

luks_dev: "{{ luks_device | mandatory }}"

I then have a task that uses this variable in its name:

- name: initialize luks in "{{ luks_dev }}"

This produces the following output:

TASK: [luks | initialize luks in "{{ luks_device | mandatory }}"] *************
Issue 1:
Issue Type:

Bug Report

Ansible Version:

1.8.2

Environment:

Ubuntu 14.04

Summary:

When using delegate_to with an inventory variable that uses another variable that includes the 'group' variable, the delegate_to host isn't templated correctly.

If the variable is defined in the playbook, or if it's using the 'group' var directly, it works as expected.

Steps To Reproduce:

inv:

server1 ansible_connection=local
server2 ansible_connection=local

group_vars/all:

server_list: "{{ groups.all }}"
first_server: "{{ server_list | first }}"

playbook.yml:

---
- hosts: server1
tasks:
- debug: var=first_server # Variable is templated correctly here

- ping:
delegate_to: "{{ first_server }}"

Expected Results:

TASK: [debug var=first_server] ************************************************
ok: [server2] => {
"first_server": "server1"
}

TASK: [ping ] *****************************************************************
ok: [server2 -> server1]

Actual Results:

TASK: [debug var=first_server] ************************************************
ok: [server2] => {
"first_server": "server1"
}

TASK: [ping ] *****************************************************************
fatal: [server2 -> {] => SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

FATAL: all hosts have already failed -- aborting

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

ansible-inventory CLI, found at https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/inventory.py

ANSIBLE VERSION

2.4 or 2.5

CONFIGURATION

Any, functionality of output should be consistent with any valid Ansible configurations.

OS / ENVIRONMENT

N/A

SUMMARY

ansible-inventory will return all variables at the host level. This is consistent with behavior inside of playbooks, but can lead to very large outputs, because variables defined at the group level will be replicated with each host inside of it.

I previously made an attempt at this in bcoca#4, but that solution needed more work to respect the users existing configuration customizations.

STEPS TO REPRODUCE

Copy this folder to your local machine, cd into it.

https://github.com/AlanCoding/Ansible-inventory-file-examples/tree/master/issues/gvars

ansible-inventory -i inventory.ini --list

EXPECTED RESULTS

Perhaps by adding another flag, like --optimized, we could get output without the airport_code variable duplicated, like so:

{
"_meta": {
"hostvars": {
"host1": {},
"host2": {}
}
},
"all": {
"children": [
"raleigh",
"ungrouped"
]
},
"raleigh": {
"hosts": [
"host1",
"host2"
],
"vars": {
"airport_code": "RDU"
}
},
"ungrouped": {}
}

ACTUAL RESULTS

The only currently available way of using this command will put airport_code (a variable specific to the group raleigh) in hostvars.

{
"_meta": {
"hostvars": {
"host1": {
"airport_code": "RDU"
},
"host2": {
"airport_code": "RDU"
}
}
},
"all": {
"children": [
"raleigh",
"ungrouped"
]
},
"raleigh": {
"hosts": [
"host1",
"host2"
]
},
"ungrouped": {}
}

RESOLVED: Note that ansible_inventory_sources appears to be some other unrelated thing, and I may raise a separate issue about that.
Issue 1:
our Linux server running with 500mb memory can't start chrome 90+.

if i download chrome 50 or lower and update execute path, does our API support it?

thanks

Issue 2:
Context:

Playwright Version: Latest (today is 26/044/2021)

Operating System: Linux

Node.js version: tested on both node.js version

Browser: chromium

Describe the bug

I'm watching full-js apps (e.g react/angular websites). I initialize one instance, 1 browser and 1 page.

I keep the page in cache & retrieving content every 2 seconds.

After 1/2hours, the memory goes crazy. I tried to reload() the page every 30 minutes. It doesn't free the memory.

Only way to free the memory is closing the page and recreating a new one.

What could be the source of this memory leak? I suppose reload() frees the javascript-vm so it must be a leak internally to the page