WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When editing a *.scss file (Sass/Compass), after typing a semicolon, the auto-complete list is automatically shown with HTML tags and attributes.

Typing semicolon + Enter (line break) actually results in an unexpected behavior...

Issue 2:
When editing SCSS files, after typing in a property and entering a semicolon, IntelliSense pops up with arbitrary suggestions. When editing CSS, the popup doesn't appear until you enter a space after the semicolon.

Ideally this should happen on enter or space but after you start typing, not before?
Issue 1:
As of 0.15, roc_auc_score no longer accepts a Pandas Series for y_true, although it does accept it for y_score: you can replicate it as follows:

import numpy as np

from sklearn.ensemble import RandomForestClassifier

import pandas as pd

from sklearn.metrics import roc_auc_score

DF=pd.DataFrame({"A":[1,2,3,4,5,6,7,8,9,10],"B":[1,1,1,1,0,0,0,0,0,0],"C":[1,1,1,0,0,0,0,0,0,0]})

RF=RandomForestClassifier()

RF.fit(DF[['A','B']],DF["C"])

DF['predict_proba']=RF.predict_proba(DF[['A','B']])[:,1]

roc_auc_score(DF["C"],DF["predict_proba"])

This will return the error "Expected array-like (array or non-string sequence), got 0 1"

roc_auc_score(np.array(DF["C"]),DF["predict_proba"]) works correctly.

Issue 2:
As indicated by the title, the roc_auc_score metric is no longer accepting a Pandas Series as an argument for y_true as of .15, although it will accept it at y_score: you can replicate this bug as follows:

import numpy as np

from sklearn.ensemble import RandomForestClassifier

from sklearn.metrics import roc_auc_score

import pandas as pd

DF=pd.DataFrame({"A":[1,2,3,4,5,6,7,8,9,10],"B":[1,1,1,1,0,0,0,0,0,0],"C":[1,1,1,0,0,0,0,0,0,0]})

RF=RandomForestClassifier()

RF.fit(DF[['A','B']],DF["C"])

DF['predict_proba']=RF.predict_proba(DF[['A','B']])[:,1]

roc_auc_score(DF["C"],DF["predict_proba"])

This will return "ValueError: Expected array-like (array or non-string sequence), got 0 1"

However, roc_auc_score(np.array(DF["C"]),DF["predict_proba"]) will work fine.
Issue 1:
Environment

Windows build number: 18636.418

Any other software?

Steps to reproduce

I'm trying to have both x86 and x64 version of PowerShell 5.1 appear in the Windows Terminal. I have following JSON in my settings.

{
"acrylicOpacity" : 0.5,
"background" : "#012456",
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name" : "PowerShell (x64)",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
},
{
"acrylicOpacity" : 0.5,
"background" : "#012456",
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "%SystemRoot%\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name" : "PowerShell (x86)",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
},

Only x86 PowerShell 5.1 shows up in GUI.

Am I hitting a known limitation, a bug?

I really wish I'd been able to have both x64 and x86 PowerShell 5.1. I need to use both architectures from time to time.

Expected behavior

I'd expect both x64 and x86 PowerShell 5.1 to appear in GUI.

Actual behavior

Only x86 PowerShell 5.1 shows up in GUI.

Issue 2:
Your Windows build number: (Type ver at a Windows Command Prompt)

10.0.18362.86

What you're doing and what's happening:

Using ALT+numpad to input some characters by their code. For example I'm typing ALT+97 to enter a

in cmd in terminal: 9 and 7 appear when hitted, and a appears when releasing ALT

in powershell in terminal: digit-argument is triggered, so a is duplicated 97 times when releasing ALT

What's wrong / what should be happening instead:

should have same behavior as outside the terminal

Perhap it is similar to #637
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/1883 on 2013-03-29 by trac user Sytse, assigned to @rgommers.

The non-central t-distribution in scipy.stats.distributions accepts a non-centrality parameter with positive values only.

From Wikipedia (http://en.wikipedia.org/wiki/Noncentral_t-distribution):

"If Z is a normally distributed random variable with unit variance and zero mean, and V is a Chi-squared distributed random variable with ν degrees of freedom that is statistically independent of Z, then T=(Z+μ)/sqrt(V/ν) is a noncentral t-distributed random variable with ν degrees of freedom and noncentrality parameter μ. Note that the noncentrality parameter may be negative."

Adding a function:[[BR]]

def _argcheck(self, df, nc):[[BR]]

return (df > 0)[[BR]]

to the class class nct_gen would completely solve the problem.

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1864 on 2013-03-11 by @josef-pkt, assigned to @rgommers.

I guess a bug, because _argcheck is not properly defined

>>> stats.nct.cdf(-0.5, 10, -0.5)
nan
>>> stats.nct._cdf(-0.5, 10, -0.5)
0.50490799249967822

same value as in R

(needed for power of t-test)
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1266 on 2009-10-19 by trac user koehler, assigned to unknown.

Although the documenttation of numpy.fft.fft states that:

"This is most efficient for n a power of two. This also stores a cache of working memory for different sizes of fft's, so you could theoretically run into memory problems if you call this too many times with too many different n's." ,I think that it may be important to report this oddity in the fft runtime.

Dependent on the array length, the fft runtime varies really extreme:

[ipython shell, from numpy import *]
In [1]: %time fft.fft(zeros(119516))
CPU times: user 22.83 s, sys: 0.39 s, total: 23.23 s
Wall time: 23.53 s

In [3]: %time fft.fft(zeros(119517))
CPU times: user 36.33 s, sys: 0.08 s, total: 36.40 s
Wall time: 36.51 s

In [5]: %time fft.fft(zeros(119518))
CPU times: user 4.88 s, sys: 0.08 s, total: 4.96 s
Wall time: 5.02 s

In [7]: %time fft.fft(zeros(119519))
CPU times: user 0.45 s, sys: 0.00 s, total: 0.45 s
Wall time: 0.45 s

In [9]: %time fft.fft(zeros(119515))
CPU times: user 0.07 s, sys: 0.00 s, total: 0.08 s
Wall time: 0.08 s

In [11]: %time fft.fft(zeros(119514))
CPU times: user 15.84 s, sys: 0.06 s, total: 15.90 s
Wall time: 15.95 s

In [13]: %time fft.fft(zeros(119513))
CPU times: user 272.75 s, sys: 1.03 s, total: 273.78 s
Wall time: 275.63 s

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/579 on 2007-09-14 by @cournape, assigned to unknown.

See #1104 and http://en.wikipedia.org/wiki/Bluestein's_FFT_algorithm
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I'm not entirely sure on the intended behaviour, but I expect all loaded JS to be cached. On my own site, as well as on at least https://nextjs.org/learn, the /_next/static/commons/main-{hash}.js file gets a public, max-age=0 header.

Current Behavior

I'd expect all JS to get some sort of cache header that does not set the max-age to 0, as this seem to require my browser to download the file on every page load.

Steps to Reproduce (for bugs)

Open https://nextjs.org/learn with devtools

Look at the cache header on the /_next/static/commons/main-{hash}.js request

Context

The result of not caching the /_next/static/commons/main-{hash}.js request results in waterfall requests. Even though etags can be applied, it seems that another round trip has to happen before code can be initialised.

After looking through the code, it seems that no static assets are being sent with cache headers by default - is this intended? I've checked a version of my own project running Next 5.1 and the main bundle (which is handled differently in that version) appear to be cached properly.

Your Environment

Tech
Version

next
6.0.0

node
10

OS
N/A

browser
Chrome

etc

Issue 2:
I think it would be great to have parameter in URL functionality (for example /users/:id) while still keeping the simplicity of next itself.

My proposition is to do this for structure:

pages/
index.js
users/
_id.js

id.js will be seen as a parameter path and will receive id as prop. You could also go further and make it like this to map /users/:id/friends/:friendid:

pages/
index.js
users/
_id/
index.js
friends/
_friendid.js

If the id is not specified (eg. /users/) then we'll first check if there is an index.js and otherwise use _id.js.

I created this issue to see if others are interested in this and to see what everyones thoughts/feedback is on this. I'm willing to build this if this is a wanted feature! 😄
Issue 1:
Feature request

What is the expected behavior?

When building esm modules, where is no way to build them fully natively. Webpack generate code with static imports of dependencies, but also wrap them and source in its own modules which use webpack_require instead of real imports.

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

I wanted to build node application. I used tsc but I need to have some transformations with ts code (I am going to write loader for them). I use nodejs 16 and esm modules and want to see esm imports in output. So, I had them with tsc and partially have them with Webpack. Also I need this for my web app where I want to build sources (from ts with assets) to esm output.

Additional problem is that I can't build code without bundling, that I want to do for esm.

How should this be implemented in your opinion?

I wanted to options for:

disable bundling (for esm only or not): I want to see dist folder like after tsc but with assets and loader transformations.

disable wrapping in webpack_require for esm modules

Both of this points are because this manipulation are not needed for esm modules at all and brake all import/export idea.

Are you willing to work on this yourself?

no, sorry.

Issue 2:
Bug report

What is the current behavior?

Lets consider the following screenshot:

Even after the control reaches the let assignment statement, the previous imports are undefined. Could anyone explain why is that so?

Also the following shows that the bundled internal variables are defined though:

Why does this behavior exist in javascript? Is this expected or something different.

Its in mozilla firefox browser (95.0.1)

Its undefined even for npm libraries as well, which is in node_modules folder. Why does this happen, which seems slightly not so logical. Is there any issue with the bundler?

If the current behavior is a bug, please provide the steps to reproduce.

Create a react app. Introduce redux in it.

Import that store and provide it in the index.js while rendering the root component.

What is the expected behavior?

Just pls explain why is this happening in the browser (firefox 95.0.1) ? Because of this none of the variables imported have any valid values. How to use them in the file post that lines' execution?

Pl give your answer in a more descriptive manner instead of just saying that this behavior is expected. What is exactly this behavior. If this exists how can anyone use any of the imports in the file below? Whats the purpose of importing something you need above, if it will never get imported even after that line is executed?

As far as I know as javascript is a synchronous language except the specific functionalities like promises, async/await, I guess everything else must be synchronous by its design, which is why this unpredictability in its behavior is confusing.

Other relevant information:

webpack version: 5.66.0

Node.js version: 16.13.2

Operating System: Linux

Additional tools:

Dummy code repo created : I also created a dummy repo if anyone looks into it at 12sam12/dummy_app
Issue 1:
I think it would be useful to have some syntax for returning a subset of a NamedTuple as another NamedTuple, analogous to the same ability with regular Tuples.

julia> tup = (1, 2, 3)
(1, 2, 3)

julia> tup[1]
1

julia> tup[[1,2]]
(1, 2)

julia> tup[[1]]
(1,)

julia> nt = (a=1, b=2, c=3)
(a = 1, b = 2, c = 3)

julia> nt[:a]
1

julia> nt[[:a, :b]]
ERROR: MethodError: no method matching getindex(::NamedTuple{(:a, :b, :c), Tuple{Int64, Int64, Int64}}, ::Vector{Symbol})

The following works, though I don't know if it's the most efficient:

julia> get(n::NamedTuple, ntkeys) = (; (s=>n[s] for s in ntkeys)...)
get (generic function with 2 methods)

julia> get(nt, [:a,:b])
(a = 1, b = 2)

julia> get(nt, [:a])
(a = 1,)

I'm not advocating it actually be called get - I think something that worked with getindex would be ideal. NamedTupleTools.jl has a method called select that does this, but it seems like this functionality would be great to have in Base.

One counter argument is that this doesn't work with Dicts

julia> dict = Dict(pairs(nt)...)
Dict{Symbol, Int64} with 3 entries:
:a => 1
:b => 2
:c => 3

julia> dict[[:a, :b]]
ERROR: KeyError: key [:a, :b] not found

But it is technically possible to have an array as a key in a Dict, but not for a NamedTuple.

I'm happy to make a PR if this idea is acceptable, and if there aren't any implications that are escaping me.

Issue 2:
Couldn't find an existing issue that quite addressed this, apologize if dup (or naïve).

julia> versioninfo()
Julia Version 0.7.0-DEV.5008
Commit 2cab814429 (2018-05-05 14:43 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin17.5.0)
CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
Environment:
JULIA_REVISE = manual

julia> x = (1, 2); y = (a = 1, b = 2);

julia> x[1:2]
(1, 2)

julia> y[1]
1

julia> y[2]
2

julia> y[1:2]
ERROR: MethodError: no method matching getindex(::NamedTuple{(:a, :b),Tuple{Int64,Int64}}, ::UnitRange{Int64})
Closest candidates are:
getindex(::NamedTuple, ::Int64) at namedtuple.jl:100
getindex(::NamedTuple, ::Symbol) at namedtuple.jl:101

julia> y[[:a, :b]]
ERROR: MethodError: no method matching getindex(::NamedTuple{(:a, :b),Tuple{Int64,Int64}}, ::Array{Symbol,1})
Closest candidates are:
getindex(::NamedTuple, ::Int64) at namedtuple.jl:100
getindex(::NamedTuple, ::Symbol) at namedtuple.jl:101

It just might be nice to have these indexing methods at some point down the road.

Thoughts?
Issue 1:
Hey all.

MS volunteered to help us set up Azure pipelines for CI. I'm not sure if @ogrisel or anyone else has looked into them yet. One of the benefits would be potentially arbitrary many builds in parallel if we ask nicely.

@njsmith had mentioned on twitter it's slower than travis but that might be fixed by now?

I'm swamped with other stuff so I have no cycles for this. I'll point Mickey Gousset who volunteered to help to this issue to discuss.

Issue 2:
Is this documentation for sklearn.multiclass.OneVsRestClassifier correct?

Also known as one-vs-all, this strategy consists in fitting one classifier per class. For each classifier, the class is fitted against all the other classes. ... In the multilabel learning literature, OvR is also known as the binary relevance method.

There is similar documentation in the user guide:

This strategy, also known as one-vs-all, is implemented in OneVsRestClassifier. The strategy consists in fitting one classifier per class. For each classifier, the class is fitted against all the other classes.

The prior section in the user guide talks about an example problem of multilabel classification as follows.

An array such as np.array([[1, 0, 0], [0, 1, 1], [0, 0, 0]]) represents label 0 in the first sample, labels 1 and 2 in the second sample, and no labels in the third sample.

All of these together do not make sense to me. The wording "For each classifier, the class is fitted against all the other classes" seems to imply a multi class problem, not a multi label problem. It seems like in the implementation it is actually fitting each label with its binary indicator independent of the other labels. I am further confused because the documentation says one vs. rest is the same as binary relevance, but the wikipedia article on multi-label classification seems to say otherwise:

This method of dividing the task into multiple binary tasks has something in common with the one-vs.-all (OvA, or one-vs.-rest, OvR) method for multiclass classification. Note though that it is not the same method: in binary relevance we train one classifier for each label, not one classifier for each possible value for the label.

For what it's worth, it seems like sklearn.multiclass.OneVsRestClassifier implements what that wikipedia article would call binary relevance, not one vs. rest.
Issue 1:
I wanted to aggregate my percolation results with a nested aggregation. However, it appears that code path isn't implemented. Martijn (@martijnvg) you appeared to know the issue.

PercolateContext.java

@Override
public MapperService.SmartNameObjectMapper smartNameObjectMapper(String name) {
throw new UnsupportedOperationException();
}

Is there support for this coming soon? It would be nice utility that would help avoid duplicating percolators.

Here is the script to reproduce the problem

PUT /classify
{
"mappings":{
".percolator":{
"properties": {
"query" : {
"type" : "object",
"enabled" : false
},
"isa":{
"type": "nested",
"properties":{
"feature":{
"type": "string"
},
"id": {
"type": "string"
}
}
}
}
},
"thing":{
"properties":{
"name":{
"type":"string"
}
}
}
}
}

POST classify/.percolator/1234
{
"query": {
"match": {
"name": "arts"
}
},
"type": "thing",
"isa":[{
"feature": "Category",
"id": "theatre"
},
{
"feature": "Ambience",
"id": "classy"
}
]
}

GET /classify/thing/_percolate
{
"doc": {
"name": "Academy of Arts"
},
"aggs":{
"isa":{
"nested": {
"path": "isa"
},
"aggs": {
"features": {
"terms": {
"field": "isa.feature"
},
"aggs": {
"kinds": {
"terms": {
"field": "isa.id"
}
}
}
}
}
}
}
}

Issue 2:
Elasticsearch version:2.3.5

Plugins installed: [head,ik]

JVM version:1.8.0_92

OS version:Red Hat 4.8.3

Description of the problem including expected versus actual behavior:

Steps to reproduce:

1.Highlighting does not work with a boosting query.

2.When I get rid of boosting it will works as expected.

Provide logs (if relevant):

Describe the feature:

I found that Issue #1314 from september 2011 raises the same issue, has it perhaps reappeared?
Issue 1:
I can't get my app to work after switching to 6.0.0-canary.4. It is complaining that it can't import App or Container in my _app.js file.

The error I get says:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
in Container (at _app.js:18)
in App
{ TypeError: Cannot read property 'toLowerCase' of undefined

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

Expected Behavior

I'm trying to override _app.js to create a persisting layout. Although, even without a _app.js file in my pages directory, I still get a similar error.

Current Behavior

I get the error mentioned above follow by a sequence of TypeError: Cannot read property 'toLowerCase' of undefined errors, which I believe is a result of the first error related to importing something wrong.

Steps to Reproduce (for bugs)

Upgrade from next 5.1.0

Run the app - yarn dev or yarn build and yarn start

Get the error

I get the same error even if I don't try to override _app.js, but my _app.js file is currently just boilerplate from the example

import React from 'react'
import App, {Container} from 'next/app'

class MyApp extends App {
static async getInitialProps ({ Component, router, ctx }) {
let pageProps = {}

if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx)
}

return {pageProps}
}

render () {
const {Component, pageProps} = this.props
return (
<Container>
<Component {...pageProps} />
</Container>
);
}
}

export default MyApp

Context

I'm excited about the new features released in 6.0.0-canary.4. Especially the idea of persisting layout.

Your Environment

Tech
Version

next
6.0.0-canary.4

node
v8.1.3

OS
macOS 10.13.4

browser
chrome 65

etc

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

Expected Behavior

Dynamically importing a named export should work like this:

const DynamicFoo = dynamic(import('../components/Foo').then(m => m.Foo));

Additionally, default exports need also to be explicitly imported when following the spec – something that TypeScript needs you to do, otherwise you'll get an error.

// Accessing m.default explicitly is mandatory when using TypeScript
const DynamicFoo = dynamic(import('../components/Foo').then(m => m.default));

Current Behavior

When accessing a page with an import like above, I get the following error:

Path must be a string. Received undefined
TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at join (path.js:1239:7)
at loadChunks (/xyz/node_modules/next/dist/server/render.js:528:37)

(oddly, this doesn't happen when the named import is added to a hot-reloaded page)

Context

#2612 seems to be related to this issue

using m.__webpackChunkName looks suspicious because the chunk name turns out to be undefined triggering above error, e.g. https://github.com/zeit/next.js/blob/master/lib/dynamic.js#L69

next.js version: 3.2.2
Issue 1:
On 0.4, string(::Int) was type-stable. This is no longer the case on master:

julia> f(x) = string(x)
gf (generic function with 1 method)

julia> g(x) = dec(x)
g (generic function with 1 method)

julia> @code_warntype f(2)
Variables:
#self#::#f
x::Int64

Body:
begin # REPL[1], line 1:
return (Base.dec)(x::Int64)::Any
end::Any

julia> @code_warntype g(2)
Variables:
#self#::#g
x::Int64

Body:
begin # REPL[2], line 1:
return (Base.dec)((Base.box)(UInt64,(Base.box)(Int64,(Base.flipsign_int)(x::Int64,x::Int64))),1,(Base.slt_int)(x::Int64,0)::Bool)::ASCIIString
end::ASCIIString

And yet, we have:

string(x::Union{Int8,Int16,Int32,Int64,Int128}) = dec(x)

Issue 2:
if I define a function d2 before a function d1 which calls d2 then change d2, d1 uses the old definition for d2.

I assume this is because it is all precompiled, but maybe there should be a note warning of this? Or would it be possible to replace the old definition with a longjmp to the new one?

(Mostly important for the REPL, since I don't always do a full load)

julia> function d2()
a
end

julia> function d()
d2()
end

julia> d()
in d: a not defined

julia> function d2()
b=2
end

julia> d()
in d: a not defined

julia> d2
Methods for generic function d2
d2() at prompt:2

julia> function d()
d2()
end

julia> d()
2
Issue 1:
REPRO:

const code = `
onmessage = function(data) {
unexistingVariable = data;
}`
const worker = new Worker(`data:text/javascript;base64,${btoa(code)}`, {type: "module"});
worker.postMessage("boop");

Issue 2:
error: Uncaught (in worker "") Error
throw new Error();
^
at file:///home/abotella/test/worker.js:3:11
at fire (deno:extensions/timers/01_timers.js:477:7)
at handleTimerMacrotask (deno:extensions/timers/01_timers.js:338:7)
thread 'worker-0' panicked at 'coding error: either js is polling or the worker is terminated', runtime/web_worker.rs:498:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
at Worker.#pollControl (deno:runtime/js/11_workers.js:247:23)

test.js

new Worker(
new URL("./worker.js", import.meta.url).href,
{ type: "module" },
);

worker.js

setTimeout(() => {
throw new Error();
}, 1000);

This seems to have been introduced in #11076, and it seems to be related to some of the WPT test failures in #11338.