WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When using a touch device (such as a Surface Pro 4) in tablet mode, I expect the touch keyboard to be presented when you tap on the input area of the terminal, however it does not. it is the same behavior with PS, cmd, wsl. the cursor appears and waits for input but no keyboard.

Issue 2:
Environment

bd5cae1

Steps to reproduce

Run program of this kind:

int main()
{
cout << "\x1B[41m";
cout << "X Red ";
cout << "\x1B[42m";
cout << "Green\n";
cout << "\x1B[43m";
cout << "Yellow ";
cout << "\x1B[44m";
cout << "Blue";
cout << "\x1B[0m";
return 0;
}

Expected behavior

Actual behavior
Issue 1:
Code compiles and runs just fine but with enough stuff in a array Atom thinks that everything is String or comments.

tl;dr If an array has more than 23 string inside it Atom will freak out.

http://gyazo.com/3e4dc7df7bbf131c1a5b76566e72d4bf

Issue 2:
I opened a Python file with the following line (#963):

PrintAndLog(u"SSID: " + RememberedNetwork["SSIDString"].decode("utf-8") + u" - BSSID: " + RememberedNetwork["CachedScanRecord"]["BSSID"] + u" - RSSI: " + str(RememberedNetwork["CachedScanRecord"]["RSSI"]) + u" - Last connected: " + str(RememberedNetwork["LastConnected"]) + u" - Security type: " + RememberedNetwork["SecurityType"] + u" - Geolocation: " + Geolocation, "INFO")

Which led to the following bug:

You can find this as the main file in osxauditor.py.
Issue 1:
If a bound value can be of more than one type, then HTML Number input fields are being bound as Strings. My expectation is that they should be bound to the same type as the input field. In my case, we change the type of the input field based on value of other fields on the form. This becomes a problem downstream when REST service is expecting numbers but gets strings. Obviously, there are a lot of downstream work arounds for this involving parsing the numbers and changing the types (both the Angular app, and the REST service), but none the less, it feels like a bug. Below is a very contrived example to demonstrate the problem.

Current behavior

Typescript snippet:

export class Demo {
value: number | String;
inputType:String;

constructor() {
this.inputType = 'text';
}

makeNumber() {
this.inputType = 'number';
}

log() {
console.log(JSON.stringify(this.value));
}
};

HTML:

<div>
<input [(ngModel)]=.value" [type]="inputType">
</div>
<span class="button" (click)="makeNumber()">Make Number</>
<span class="button" (click)="log()">Log This</>

Expected/desired behavior

User clicks the "Make Number" button, enters 42 in the what is now a number input field, and then clicks "Log This". The console should log:

42

Other information

User clicks the "Make Number" button, enters 42 in the what is now a number input field, and then clicks "Log This". The console actually logs:

"42"

Issue 2:
When setting the field of:

num bZip;

From:

<div class="form-group">
<label for="billing_zip">Zip</label>
<input type="number" id="billing_zip" [(ng-model)]="dto.bZip" class="form-control" [required]="true"/>
</div>

EXCEPTION: Error during evaluation of "ngModel"

ORIGINAL EXCEPTION: type 'String' is not a subtype of type 'num' of 'value'.

ORIGINAL STACKTRACE:

Using Angular Dart alpha 35

Fix: if i set the field to String bZip on the DTO object

name: 'tickets'
version: 0.0.1
description: A ticket commerce application
author: Jack Murphy jack@rightisleft.com
homepage: https://www.rightisleft.com
environment:
sdk: '>=1.0.0 <2.0.0'
dependencies:
#Server Dependencies
json_object: "1.0.19"
mongo_dart: "0.1.46"
connection_pool: "0.1.0+2"
dartson: "0.2.4"
guinness: "0.1.17"
shelf: '>=0.6.2 <0.7.0'
shelf_static: "0.2.2"
shelf_route: "0.14.0"
#Client Dependencies
bootjack: "0.6.5"
browser: ">=0.10.0+2 <0.11.0"
sass: "0.4.2"
angular2: "2.0.0-alpha.35"
transformers:
- dartson
- sass
- angular2:
entry_points:
- web/main.dart
reflection_entry_points:
- web/main.dart
- $dart2js:
minify: true
commandLineOptions:
- --dump-info
- --show-package-warnings
- --trust-type-annotations
- --trust-primitives
Issue 1:
Bug report

Bug summary

Using version 3.1.0, ax.invert_yaxis() does not work as expected when called on a 3D scatter plot. There seems to be no effect when it is called after populating the plot, while calling it before the plot inverts the data points correctly but moves all ticks to one point.

Code for reproduction

# Version 1: calling invert_yaxis() after populating the plot.
# Version 2 (omitted): calling invert_yaxis() after ax = fig.add_subplot(111, projection='3d')
# Using the official 3D scatter plot example.

from mpl_toolkits.mplot3d import Axes3D

import matplotlib.pyplot as plt
import numpy as np

np.random.seed(19680801)

def randrange(n, vmin, vmax):
'''
Helper function to make an array of random numbers having shape (n, )
with each number distributed Uniform(vmin, vmax).
'''
return (vmax - vmin)*np.random.rand(n) + vmin

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

n = 100

# For each set of style and range settings, plot n random points in the box
# defined by x in [23, 32], y in [0, 100], z in [zlow, zhigh].
for m, zlow, zhigh in [('o', -50, -25), ('^', -30, -5)]:
xs = randrange(n, 23, 32)
ys = randrange(n, 0, 100)
zs = randrange(n, zlow, zhigh)
ax.scatter(xs, ys, zs, marker=m)

ax.invert_yaxis()
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z Label')

plt.show()

Actual outcome when inverting axis after populating plot:

Actual outcome when inverting axis before populating plot:

Expected outcome

Using ax.set_ylim(105,-5):

Matplotlib version

Operating system: Ubuntu 18.04.2

Matplotlib version: 3.1.0

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

Python version: 3.6.8

Jupyter version (if applicable):

Other libraries: Numpy 1.16.1

Matplotlib and Python were installed with pip.

Also posted on SO, https://stackoverflow.com/questions/56666916/inverting-axis-of-matplotlib-3d-plot-ruins-ticks

Issue 2:
Bug summary

The ax.invertxaxis() and ax.invert_yaxis() function both produce the same output, a scatterplot with a flipped X axis.

Code for reproduction

from mpl_toolkits import mplot3d
import matplotlib.pyplot as plt

ax = plt.axes(projection='3d')
plt.title("Invert Z")
ax.scatter3D(1,1,1)
# ax.invert_xaxis()
ax.invert_yaxis()
# ax.invert_zaxis()

Actual outcome

No inversions:

X Inversion:

Y Inversion:

Z Inversion behaves as expected:

Expected outcome

I would expect the y axis to be inverted

Operating system

No response

Matplotlib Version

3.2.2

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Other libraries

mpl_toolkits.mplot3d

Installation

No response

Conda channel

No response
Issue 1:
Environment

Windows build number: 10.0.19013.0
Windows Terminal version (if applicable):0.6.2951.0

Any other software? PSReadLine 2.0.0

Steps to reproduce

Copy a PowerShell function at least twice the height of the terminal window to the clipboard. Right-mouse click paste the code in to terminal.

Expected behavior

The pasted function works as expected.

Actual behavior

The terminal window content area "flashes". Somewhere along the way an error appears--usually, but not always, after a closing brace (}). The error is, reported in red text, "Oops, something went wrong...Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new". The issues happens on PS 5.1 and PS 6.

Pasting the same code in to a non-terminal PS 5.1 works as expected with the same version of PSReadLine.

Issue 2:
Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): Version: 0.4.2382.0

Any other software?
Office C2R
SSMS 18.2
VSCode

# Steps to reproduce

- Right-Click app from start menu
- Fill in appropriate credentials

# Expected behavior

Expecting a copy of Windows Terminal to load.

# Actual behavior

Nothing after entering credentials. Looking in task manager, WindowsTerminal.exe does not seem to load.

This was not built, this was the preview through the store.
Issue 1:
Hi,

I have a requirement that model should search for relevant documents before answering the query. I found RAG from Facebook AI which perfectly aligns with my requirement . Also saw this blog from HF and came to know that HF implemented RAG which is awesome!

My doubt is whether I could extend HF's implementation of RAG so that the model should retrieve documents from local directory rather than HF's wikipedia corpus.

Are there any notebooks to refer..?

Issue 2:
🚀 Feature request

Good Second Issue - A more advanced issue for contributors who want to dive more into Longformer's attention mechanism.

Longformer currently only outputs global attentions, which is suboptimal because users might be interested in the local attentions as well. I propose to change the "output_attention" logic as follows in longformer:

attentions should correspond to the "local" attentions and then we'll add a new output type global_attention that contains the global_attentions. This is consistent with the naming of attention_mask and global_attention_mask IMO and the cleanest way to implement the feature.

Implementing this feature would mean to that Longformer will require its own ModelOutput class =>

BaseModelOutput, => LongformerBaseModelOutput or BaseModelOutputWithGlobalAttention (prefer the first name though)

BaseModelOutputWithPooling, => ...

Also some tests will have to be adapted.

This is a slightly more difficult issue, so I'm happy to help on it. One should understand the difference between local and global attention and how Longformer's attention is different to e.g. Bert's attention in general.

For more detail check out discussion here: #5646
Issue 1:
Summary of the new feature/enhancement

Having multiple languages installed on my machine, I start typing in the wrong language in the Run search box. I click the correct keys for what I am looking for, but of course the outcome is something completely different.

For example, searching for "terminal" would turn out as "אקרצןמשך" (just to make it clear - this is not a translation. This is gibberish, and the outcome of clicking on the same keys as "terminal" while the current language is Hebrew)

A very simple mapping of keyboard keys across different languages can easily realize I might have meant to write "terminal" and show suggestions based on both strings (the original gibberish one, and the guess in English).

Of course, this can happen the other way around, and also with more than two languages installed.

A very similar idea is already implemented in Google Search - searching for "אקרצןמשך" will show results for "terminal" (example)

Proposed technical implementation details (optional)

I've been thinking of implementing this feature for a while now, and I have not found a programmatic way to get a keypress value from the keyboard, and translate it into different keyboard layouts/languages. It might be necessary to start out with some hard-coded map of keyboards in different layouts. But if there is any way to do it automatically using some low-level windows API that would make matters so much easier.

After mapping the input text to different language keyboard layouts, it's should be a matter of adding more terms to the QueryBuilder, and interleaving the results. On almost all cases, only a single term will return any results, as most other terms will be gibberish anyway.

I think the end result may be completely transparent to the end-user. The search box will contain some gibberish, and the results will "magically" contain the results they are expecting.

Issue 2:
Summary of the new feature/enhancement

Proposed technical implementation details (optional)
Issue 1:
Describe what you were doing when the bug occurred:

Monitoring page load with ReactDevTool Profiler

Stopped the recording

Selected a render phase in the FlameGraph

Please do not remove the text below this line

DevTools version: 4.10.0-11a2ae3a0d

Call stack: at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19650:17)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19583:26)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19576:32)

Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34133:50)

at div

at div

at div

at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28195:3)

at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:35761:50)

at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29208:5)

at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29325:32)

at div

at div

at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32923:3)

at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24311:3)

at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24800:3)

at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29393:3)

at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:36196:3)

Issue 2:
Do you want to request a feature or report a bug?

bug

What is the current behavior?

error message:

/node_modules/@types/react-router/node_modules/@types/react/index.d.ts(2314,14): TS2300: Duplicate identifier 'LibraryManagedAttributes'.

What is the expected behavior?

正常编译

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

package.json:

"react": "^16.8.6",

"@types/react": "^16.8.6",

yarn.lock file:

"@types/react@^16.8.6": version "16.9.17" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.17.tgz#58f0cc0e9ec2425d1441dd7b623421a867aa253e" integrity sha512-UP27In4fp4sWF5JgyV6pwVPAQM83Fj76JOcg02X5BZcpSu5Wx+fP9RMqc2v0ssBoQIFvD5JdKY41gjJJKmw6Bg== dependencies: "@types/prop-types" "*" csstype "^2.2.0"
Issue 1:
stats.mode seems surprisingly slow, especially since it's very much the same as find_repeats. Despite only needing to return the first value and being pretty much the same function, stats.mode is much slower than find_repeats (which appears to be a very thin wrapper around a fortran function), here's some benchmarking:

import numpy as np
import scipy.stats as stats
arr1 = np.random.randint(-1000, 1000, 10000)
%timeit stats.mode(arr1)
%timeit stats.find_repeats(arr1)

which yields

10 loops, best of 3: 142 ms per loop
1000 loops, best of 3: 832 µs per loop

The problem is that the implementation is very slow when the number of unique labels is much greater than the number of unique values, because it iterates over every count:

arr1 = np.random.randint(-100, 100, 10000)
ser = pd.Series(arr1)
%timeit stats.mode(arr1)
%timeit stats.find_repeats(arr1)

yields

100 loops, best of 3: 15.2 ms per loop
1000 loops, best of 3: 681 µs per loop

And is still twice as slow with 20 uniques vs. 10000 entries:

arr1 = np.random.randint(-10, 10, 10000)
%timeit stats.mode(arr1)
%timeit stats.find_repeats(arr1)

yielding

1000 loops, best of 3: 1.89 ms per loop
1000 loops, best of 3: 508 µs per loop

And still not great with 2 dimensions:

arr1 = np.random.randint(-100, 100, (500, 100))
%timeit stats.mode(arr1)
%timeit stats.find_repeats(arr1)
# approximate finding repeats on each axis:
%timeit [stats.find_repeats(arr1[i]) for i in range(len(arr1))]

which yields:

10 loops, best of 3: 50.6 ms per loop
100 loops, best of 3: 3.6 ms per loop
100 loops, best of 3: 4.61 ms per loop

At least for 1D, a better implementation would be to take advantage of find_repeats (or reuse its internals) rather than iterating over uniques, e.g. something like this for 1D:

def faster_mode1D(a):
arr = np.asarray(a) # would be _chk_array
v, c = stats.find_repeats(arr)
if len(c) == 0:
arr.sort() # mimic first value behavior
return arr[0], 1.
else:
pos = c.argmax()
return v[pos], c[pos]

Not sure whether this makes as much sense for multiple dimensions, but maybe it would be worth special-casing 1D ndarrays? The performance difference is pretty big.

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/905 on 2009-03-31 by trac user parejkoj, assigned to unknown.

I'm trying to run scipy.stats.mode (in scipy.stats.stats) on a 2-d ndarray, but it takes an extremely long time. The data is an image (astronomical data), with:

data.shape = (227,3104)

data.dtype = ('float32')

A quick-and-dirty mode function like this:

def mode(data):
counts = {}
for x in data.flatten():
counts[x] = counts.get(x,0) + 1
maxcount = max(counts.values())
modelist = []
for x in counts:
if counts[x] == maxcount:
modelist.append(x)
return modelist,maxcount
#...

takes only a second or so to run, while stats.mode(data) or stats.mode(data.flatten()) takes ~20 minutes, no matter how I set the axis parameter. Am I missing something, or shouldn't it be significantly faster?

I'm using scipy 0.6.0 from Fink on Mac OS X Leopard with python2.5, but there appear to be no changes to the mode function between 0.6.0 and the current svn.
Issue 1:
Current Behavior:

I've got a pre-workspaces monorepo setup like this:

.
├── app1
│ └── package.json
├── app2
│ └── package.json
└── packages
├── pkg1
│ └── package.json
└── pkg2
└── package.json

In app1 and app2 we consume the shared packages like this:

{
"dependencies": {
"@us/pkg1": "file:./../packages/pkg1"
}
}

pkg1 has a set of external dependencies specified in its package.json, e.g.

{
"dependencies": {
"lodash": "4.17.21"
}
}

When I run npm i from within one of the app folders, the package itself gets installed, however starting with npm 7 (all versions I could test until now), the transient dependencies of the packages (lodash when following the example above) won't get installed, thus making the applications fail with import errors. When I manually install the transient dependencies by running npm i from within the package directory, it works as expected.

The repo does not have a top level package.json and it does not configure workspaces anywhere.

Expected Behavior:

I would expect npm to not only install the linked local package, but also its dependencies. This happens with npm 6 but not with npm 7.

Using npm link or installing does not make a difference.

Environment:

OS: Ubuntu 20.04

Node: 12.6.1

npm: 7.8.0

This might not be a bug?

I am aware that npm 7 brought the workspaces feature and this behavior might not be a bug but expected behavior as I am supposed to use workspaces for such a monorepo setup, however this would mean we'd need to migrate the entire team from npm 6 to 7 at the same point in time.

I created a reproducible example over here https://github.com/m90/npm-monorepo-issue

Issue 2:
Current Behavior:

npm v7 does not install linked local packages dependencies.

Expected Behavior:

In npm v6 the dependencies of a local linked package are installed. This means that if app has my-local-pkg as a dependency, running npm install generates app/node_modules folder and also my-local-pkg/node_modules (with its dependencies).

In npm v7, however, only app/node_modules is generated.

Steps To Reproduce:

I created the following repository to illustrate it. The README.md has the instructions on how to reproduce it.

Simplified, the steps are:

Add the following folder structure: ./app and ./my-local-pkg, each with their own package.json

Include this in the ./app/package.json:

{
"name": "app",
"dependencies": {
"my-local-pkg": "file:../my-local-pkg",
"prettier": "^2.2.1"
}
}

Include this in the ./my-local-pkg/package.json:

{
"name": "my-local-pkg",
"dependencies": {
"typescript": "^4.1.3"
}
}

Go to ./app and run npm install.

npm version 6 produces:

node_modules
.bin
my-local-pkg
node_modules
typescript
prettier

while npm version 7 produces:

node_modules
.bin
my-local-pkg
prettier

Compare the two outputs, npm v7 does not install my-local-pkg dependencies, there is no ./my-local-pkg/node_modules folder generated.

Environment:

npm v7.1.2
Issue 1:
when I render form.jade from columns.json , I try to pass propsData(multi props) to component , but It seems unsupported. Is there a better way to do this?

json

[
{"title": "A", "name":"a", "component": "ui-dropdown" , "propsData": {"options": [], "on":"hover" }},
{"title": "B", "name":"b", "component": "ui-dropdown" , "propsData": {"options": [] , "on":"click"}},
]

template :

.ui.segment.form.bottom.attached
.field(v-for="column in columns")
label {{column.title}}
component(:is="column.component",
:propsData="column.propsData",
:value.sync="editor[column.name]")

Of course , there is a way to pass props one by one , but it seems not so good.

.ui.segment.form.bottom.attached
.field(v-for="column in columns")
label {{column.title}}
component(:is="column.component",
:options="column.propsData.options",
:on="column.propsData.on",
:value.sync="editor[column.name]")

Issue 2:
It would be great if we could use v-bind with an object of attributes to pass props to a component.

<component is="component" v-bind="data"></component>

Currently we need to explicitly state the props we are passing to the component.

<component is="component" :prop-a="propA" :prop-b="propB"></component>

http://jsbin.com/yudivokovi/edit?html,js,output