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

Thank you for your awesome work which I regularly use!

Unfortunately after a Kruskal-Wallis H-test for independent samples I need to perform a Dunn test which is not already present and does not exist at all in Python (I only managed to found an R implementation cf this link).

Issue 2:
When using scipy.interpolate.interp1d and specifying the same x-value multiple times the result is undefined, i.e., it depends on the interpolation method used (kind), but not in a very predictable way. The result ranges from np.nan, through any of the y-values that correspond to the duplicate x-values, to exceptions in the case of quadric and cubic splines.

I guess this is a weird edge case, so maybe it is okay to be inconsistent and not support it at all. This would make a lot of sense to me. In this case, I would like to suggest updating the documentation to something like x-values must be unique, potentially paired with an exception if non-unique values are encountered.

Alternatively, one could sanitize the input by merging duplicates, e.g., by computing their mean. That said, I didn't spend a lot of time thinking this option through so it might be unexpected for some interpolation methods.

>>> from scipy.interpolate import interp1d
>>> kinds = ['linear', 'nearest', 'nearest-up', 'zero', 'slinear', 'previous', 'next']
>>> for kind in kinds:
... print(f"Output for Kind: {kind} \n {interp1d([0, 0, 1], [0, 0.5, 1], kind=kind)(0)}\n----")
...
Output for Kind: linear
nan # also creates warnings when called outside of f-string
----
Output for Kind: nearest
0.0
----
Output for Kind: nearest-up
0.5
----
Output for Kind: zero
0.5
----
Output for Kind: slinear
0.5
----
Output for Kind: previous
0.5 # should this not be 0.0 since the previous value should be 0
----
Output for Kind: next
0.0 # should this not be 0.5 since the next value is 0.5
----
>>> interp1d([0, 0, 1], [0, 0.5, 1], kind="quadric")(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sebastian/.local/lib/python3.8/site-packages/scipy/interpolate/interpolate.py", line 443, in __init__
raise NotImplementedError("%s is unsupported: Use fitpack "
NotImplementedError: quadric is unsupported: Use fitpack routines for other types.
>>> interp1d([0, 0, 1], [0, 0.5, 1], kind="cubic")(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sebastian/.local/lib/python3.8/site-packages/scipy/interpolate/interpolate.py", line 546, in __init__
self._spline = make_interp_spline(xx, yy, k=order,
File "/home/sebastian/.local/lib/python3.8/site-packages/scipy/interpolate/_bsplines.py", line 788, in make_interp_spline
raise ValueError("Expect x to not have duplicates")
ValueError: Expect x to not have duplicates
Issue 1:
Is there currently a way to run a locally built npm executable script using deno run. I'm thinking of something like this:

deno run --allow-env --allow-read npm:<local-path>

The scenario is running node code that we don't to publish to a public repository.

I discovered the createRequire method, e.g.

import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
require("./script.js");

However, the script has some behavior that isn't handled well including a dynamic import() of an mjs module as well as Mathjax which might also do some non-standard importing? I'm guessing that deno run for npm scripts might setup some additional facilities to make more scenarios work properly than createRequire does?

Anyway, if there is a way to do this for local npm executable scripts it would be fabulous!

Issue 2:
Is there any way to use a local (modified) copy of an NPM package instead of a published one in this command? Thanks!

deno run -A --unstable npm:vite
Issue 1:
Hi!

Thanks for a great & amazing library - been a very smooth ride so far building https://github.com/iverberk/nomad-ui with react and material-ui

I'm done with the first run on the layout, and currently testing it out on mobile.

I can't seem to find any documentation on Tabs and how they work with scroll / overflow on mobile devices.

Is it something that is currently supported in @stable - or is there any work-arounds for it - it looks quite smashed together on an iPhone6S with just 6 tabs in use :)

Thanks again and love what you are doing!

Issue 2:
The polymer paper-elements library contains a tab bar that is scrollable (see example E. https://elements.polymer-project.org/elements/paper-tabs?view=demo:demo/index.html).

Is it possible to support this scrollable property for the tab bar in material-ui?
Issue 1:
function fn() {}
`blah${fn()}blah`
// actual:
`blah${fn() }blah`
// expected:
`blah${fn()}blah`

Issue 2:
This is what I get after Ctrl+K+D in VS:

throw Error(`${JSON.stringify(this.value) } cannot be found in ${JSON.stringify(y) }`);

As you see, a space was inserted after JSON.stringify(...). The bug doesn't appear if a plain variable is used: ${x}.
Issue 1:
Is this an inside joke? It made me twitch when I read it.

Issue 2:
The language specification has a code example which says 9 is prime:

// list of prime numbers
primes := []int{2, 3, 5, 7, 9, 11, 13, 17, 19, 991}

I'd just fix it, but I have to request approval from work first.
Issue 1:
Steps to reproduce and a minimal demo of the problem

Create sibling components in the "component tree" (have a parent component that has multiple components within its template) and give each one of them at least one CSS class in the styles or styleUrls component metadata property.

Set one of those sibling components encapsulation component metadata property to ViewEncapsulation.Native

Make sure the other sibling components are not set to ViewEncapsulation.Native mode.

Run the code in Chrome since it has Shadow DOM support.

Inspect the DOM in the browser, expand the #shadow-root for the component that is set to ViewEncapsulation.Native mode.

Notice that the styles from the other sibling components are ending up inside of the shadow dom for the component that is set to ViewEncapsulation.Native:

Also notice that the styles from the other sibling components are still ending up in the head tag as expected:

Here is an example on Plunker

Current behavior

Looks like the CSS shim that is getting created into a <style> tag is getting inserted into sibling components in the component tree that are in ViewEncapsulation.Native mode. It also looks like they are put in there in the same order that the custom elements are found within the parent component template markup. So if two non-native mode sibling components are processed in the DOM tree before the native mode one, their <style> tags will come before the native one and the native one's markup in the shadow DOM:

Expected/desired behavior

I believe that this is not the desired behavior and that those other sibling component styles should not be ending up in the Shadow DOM of the native mode component.

Issue 2:
When there are sibling components, one with ViewEncapsulation.Native and the other with ViewEncapsulation.None, the styles that any component stylings are being appended to the shadow root of the one component set to Native.

Plunker: http://plnkr.co/edit/huN8xe0S7xH5CUw4B2P6?p=preview

Updated Stackblitz: https://stackblitz.com/edit/angular-issue-5059?file=src/app/app.component.html

A component set to Native should not adopt the rest of the CSS rules from non-Native components. In the screenshot of the rendered DOM, the last three style elements are appended to the end of the shadow root, but they are actually declared in the other two components which are set to None and Emulated modes.

If all three components are set to Native, then the rules are applied only to the local component, but when they are mixed the rules bleed over into Native (but don't bleed out of Native).
Issue 1:
Environment

Windows build number: 10.0.18362.388
Windows Terminal version (if applicable): 0.5.2762.0

Powershell version:
PSVersion 5.1.18362.145
PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Steps to reproduce

Open Powershell tab

Press Ctrl-Alt-? (Ctrl-Alt-Shift-/)

Expected behavior

it should display Powershell existing key binding

Basic editing functions

=======================
Enter AcceptLine Accept the input or move to the next line if input is missing a closing token.
Shift+Enter AddLine Move the cursor to the next line without attempting to execute the input
Backspace BackwardDeleteChar Delete the character before the cursor
Ctrl+h BackwardDeleteChar Delete the character before the cursor
Ctrl+Home BackwardDeleteLine Delete text from the cursor to the start of the line
Ctrl+Backspace BackwardKillWord Move the text from the start of the current or previous word to the cursor to th...
Ctrl+C Copy Copy selected region to the system clipboard. If no region is selected, copy th...
Ctrl+c CopyOrCancelLine Either copy selected text to the clipboard, or if no text is selected, cancel ed...
Ctrl+x Cut Delete selected region placing deleted text in the system clipboard

Actual behavior

it displays weird characters:

^_

Issue 2:
Windows 10.0.18309 x64

There is popular font Terminus. That font does not recognize by windows console, but ttf fork works ok. Any others software recognize this font as monospaced font and supports it. ConEmu supports it too.

So, maybe it's time to remove this shitty fonts limitations at all and rewrite like in ConEmu?

Windows console does not support terminus font:

ConEmu supports all fonts, monospaced highlighted.

#295
Issue 1:
by hongruiqi:

What steps will reproduce the problem?
http.Handle("/test///a", Handler)
And visit http://localhost/test/%2f/a

What is the expected output?
Handler should be called.

What do you see instead?
The browser is redirected to /test/a, and a 404 error

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
linux

Which version are you using? (run 'go version')
go version devel +0d9fd828f099 Wed Jan 30 17:26:22 2013 +1100 linux/amd64.

Please provide any additional information below.

if p := cleanPath(path); p != path {
_, pattern = mux.handler(r.Host, p)
return RedirectHandler(p, StatusMovedPermanently), pattern
}

If path is a raw path before unescape，/test/%2f/a can be handled correctly without
redirect. mux.match can use r.URL.Path as before.

Issue 2:
Here is a test program

http://play.golang.org/p/lROOy0Hekp

The value 2^120 is exactly represented as a float64. A different, incorrect answer is
returned by 8g (0.4779...). The right answer is returned by gccgo on an 64-bit x86
(-0.9258...). The wrong answer is returned by gccgo on 32-bit x86 where the cos
function doesn't seem to compute anything and behaves like the identity function.
Issue 1:
GET /{index}/_aliases/{name} is supposed to filter aliases by index and/or by name.

But if you want to filter only by alias name, it gives you back all indices:

curl -XDELETE localhost:9200/foo,bar?pretty
curl -XPUT localhost:9200/foo?pretty
curl -XPUT localhost:9200/bar?pretty
curl -XPOST localhost:9200/_aliases?pretty -d '{
"actions" : [
{ "add" : { "index" : "foo", "alias" : "myalias" } }
]
}'

# Correct
curl -XGET localhost:9200/_aliases?pretty
# {
# "bar" : {
# "aliases" : { }
# },
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }

# Correct
curl -XGET localhost:9200/foo/_aliases?pretty
# {
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }

# Incorrect
curl -XGET localhost:9200/_aliases/myalias?pretty
# {
# "bar" : {
# "aliases" : { }
# },
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }

# Correct
curl -XGET localhost:9200/_alias?pretty
# {
# "bar" : {
# "aliases" : { }
# },
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }

# Correct
curl -XGET localhost:9200/foo/_alias?pretty
# {
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }

# Correct
curl -XGET localhost:9200/_alias/myalias?pretty
# {
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }

We don't document GET _aliases anymore so may be we should remove its support as we can do the same thing with GET _alias API.

Might be related to #4743

Related to elastic/elasticsearch-js#331

Issue 2:
While working on removing ImmutableMap and ImmutableSet I've seen a ton of different fun ways to read immutable maps, sets, and lists. If we're willing to use Java 8's function pointer things we could remove lots of duplicated code by creating readMap, readSet, and readList in StreamInput. We could probably also do something similar for writing these but I haven't thought as much about it.
Issue 1:
Code Sample, a copy-pastable example if possible

In [2]: keys = ['c', 'a', 'b', 'c']

In [3]: tm = pd.DataFrame(index=pd.MultiIndex.from_tuples([('b', 1), ('b', 2), ('a', 1), ('c', 1)]),
...: columns=range(3))

In [4]: tm.loc[keys] # bad
Out[4]:
0 1 2
b 1 NaN NaN NaN
2 NaN NaN NaN
a 1 NaN NaN NaN
c 1 NaN NaN NaN

In [5]: tm.transpose().loc[:, keys].transpose() # bad
Out[5]:
0 1 2
b 1 NaN NaN NaN
2 NaN NaN NaN
a 1 NaN NaN NaN
c 1 NaN NaN NaN

In [6]: tm.loc[[(k, 1) for k in keys]] # complete indexing: good
Out[6]:
0 1 2
c 1 NaN NaN NaN
a 1 NaN NaN NaN
b 1 NaN NaN NaN
c 1 NaN NaN NaN

In [7]: tf = pd.DataFrame(index=['b', 'a', 'c'],
...: columns=range(3))

In [8]: tf.loc[keys] # flat index: good
Out[8]:
0 1 2
c NaN NaN NaN
a NaN NaN NaN
b NaN NaN NaN
c NaN NaN NaN

Problem description

Partial indexing of a MultiIndex with a list discards order/repetitions.

Expected Output

In [9]: pd.concat([tm.loc[[k]] for k in keys])
Out[9]:
0 1 2
c 1 NaN NaN NaN
a 1 NaN NaN NaN
b 1 NaN NaN NaN
2 NaN NaN NaN
c 1 NaN NaN NaN

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.5.3.final.0

python-bits: 64

OS: Linux

OS-release: 4.9.0-3-amd64

machine: x86_64

processor:

byteorder: little

LC_ALL: None

LANG: it_IT.UTF-8

LOCALE: it_IT.UTF-8

pandas: 0.22.0.dev0+135.g9c799e2c4

pytest: 3.2.3

pip: 9.0.1

setuptools: 36.7.0

Cython: 0.25.2

numpy: 1.12.1

scipy: 0.19.0

pyarrow: None

xarray: None

IPython: 6.2.1

sphinx: 1.5.6

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: 1.2.0dev

tables: 3.3.0

numexpr: 2.6.1

feather: 0.3.1

matplotlib: 2.0.0

openpyxl: None

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.6

lxml: None

bs4: 4.5.3

html5lib: 0.999999999

sqlalchemy: 1.0.15

pymysql: None

psycopg2: None

jinja2: 2.10

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: 0.2.1

Issue 2:
In [40]: cols = pd.MultiIndex.from_product([['A', 'B', 'C'],[1,2]])

In [41]: df = pd.DataFrame(np.random.randn(5,6), columns=cols)

In [42]: df.loc[:, ['B', 'A']]
Out[42]:
A B
1 2 1 2
0 -0.990868 1.577803 1.023247 -0.423165
1 -1.180170 1.236143 -1.484085 0.044929
2 1.665502 -0.711081 0.227827 0.651859
3 -0.659154 0.154327 -1.548650 -0.070550
4 -0.232819 0.100959 -0.102296 0.260816
Issue 1:
The function divides by the entire number of elements and not just batch sample size.

For example, using

loss_f1 = nn.MSELoss()
loss_f2 = nn.MSELoss(size_average=False)

x = autograd.Variable(torch.FloatTensor([ [1,2,3], [1,2,3] ]))

y = autograd.Variable(torch.FloatTensor([ [2,4,6], [3,4,7] ]))

# sample size of current batch = 2
# dimension of features = 3

shows the problem.

# loss no averaging/no division...just plain summing up
loss_2 = loss_f2(x, y) # = 38

# averaged loss over batch sample size
loss_1 = loss_f1(x, y) # = 6.3333

# Apparently division by 6 was done in the second averaging case.

The documentation describes the implemented MSE loss as

loss(x,y)=1/n (sum(||x-y||**2)

where n is the sample size of the current batch.

However, apparently the expression does not get divided by n (which would be 2 in our example), but by 2*3=6, i.e. the entire number of elements per training batch.

Is this intended? From a theoretical standpoint it should be 2, shouldn't it?

Issue 2:
Setting size_average=False behaves differently for mse_loss than for cross_entropy. For cross_entropy, it multiplies the result by the batch size. For mse_loss it multiplies the result by the overall size of the matrix.

I believe the cross_entropy behavior is correct and mse_loss should be changed to behave similarly. Alternatively, the documentation should be changed to clarify the difference.

Actually, mse_loss behaves similarly to kl_div, but at least the behavior is documented in kl_div. (But before reading the documentation, I expected also kl_div to behave similarly to cross_entropy.) I haven't checked how other loss functions behave.

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

def v(array):
return Variable(FloatTensor(array))

def kl(logit, target, size_average=True):
return F.kl_div(F.log_softmax(logit), target, size_average=size_average)

def xe(logit, target, size_average=True):
return F.cross_entropy(logit, target.max(1)[1], size_average=size_average)

def mse(logit, target, size_average=True):
return F.mse_loss(F.softmax(logit), target, size_average=size_average)

target = v(np.eye(5)[:3])
logit = v(np.zeros((3, 5)))

print("Torch version:", torch.__version__)
print()
print("How each loss function scales the result with size_average:")
for loss in [kl, mse, xe]:
with_size_average = loss(logit, target, size_average=True)
without_size_average = loss(logit, target, size_average=False)
factor = (without_size_average / with_size_average).data[0]
print("- {loss.__name__}: {factor}".format(**locals()))```

Torch version: 0.2.0+40ca356

How each loss function scales the result with size_average:
- kl: 15.0
- mse: 15.0
- xe: 3.0
Issue 1:
It looks like in version 3.x !important was added to .hide, the problem with this is that now when you use hide on an element and then try to use jquerys toggle functions the important is taking over and nothing happens. I've gotten around this by doing slideToggle().removeClass('hide'); but it's ugly and the first transition is not smooth at all. I'm not sure why hide has !important now but if possible it should be removed.

Issue 2:
I think this is lazy implementation and it breaks when using $(elem).show() or $(elem).hide() using jQuery since the hide class get more importance since the badly (IMO) use of !important.

I think BT should not declare this so generics classes with !important, it makes difficult to customize. I don't like the idea of having another class for doing display: none because BT uses !important.

In my opinion, having a rule like : .hide { btn&, ul li&, etc.. { display:none; }} isn't much work and won't break anything. also footprint shouldn't increase a lot since the .hide pattern will be greatly gzipped.

right now, having a <div id="someId" class="hide"></div> will break $('#someId').show() function of jQuery.
Issue 1:
Consider a simplified version of the .d.ts file for 'nouislider':

declare namespace myFramework {
interface Static {
create(blahArray: any[]): Instance;
}

interface Instance {
/**
* Returns 0, 1, or 2, depending on if the stars align.
*/
doFoo(): number
}
}

declare var myFramework: myFramework.Static;

doFoo currently returns one of 3 different values. number is a little more broad than one would prefer, so one might be tempted to say "I know, I'll use a const enum!":

declare namespace myFramework {
interface Static {
create(blahArray: any[]): Instance;
}

interface Instance {
/**
* Returns 0, 1, or 2, depending on if the stars align.
*/
doFoo(): number
}

const enum FooReturnValue {
StarsTotallyAlign,
StarsTotallyDontAlign,
EhCloseEnough
}
}

declare var myFramework: myFramework.Static;

Now that person has two problems:

Severity
Code
Description
File
Line

Error
TS2300
Duplicate identifier 'myFramework'.
myFramework.ts
1

Error
TS2300
Duplicate identifier 'myFramework'.
myFramework.ts
20

Apparently, the FooReturnValue causes the namespace to be instantiated.

Note:One might say that the solution is to just absorb Static into the myFramework namespace and just instantiate it there, which seems reasonable, but it is still an odd quirk that there is no way to control that a const enum can instantiate a module

Issue 2:
When using a tsconfig file with no files property all declaration files under node_modules are currently pulled in. This is especially problematic if typescript itself resides under node_modules since you wind up with duplicate identifiers from lib.core.d.ts and lib.core.es6.d.ts, etc. I realize this is partially taken care of with #3043 and #3188 but I'm wondering if there should be a special default case of excluding typescript declaration files. Plugins for JS toolchains like gulp-typescript and ts-loader pull in typescript locally so this becomes an issue there.

Edit: Repro steps for TS 1.5 beta

mkdir test

cd test

npm install typescript (install locally, not globally)

touch tsconfig.json

./node_modules/typescript/bin/tsc
Issue 1:
Right now you can only dispatch native events to the DOM nodes, but there's not any way to dispatch synthetic events on the Virtual DOM nodes.

I'd like to be able to dispatch synthetic events, in addition, I'd like a way to define custom event listeners.

Usecase

For example, I've a component decorator that adds a resize event on a DOM element when it get resized. I'd like to be able to dispatch the resize event to such element and be able to listen to it using onResize.

Example:

function DecoratedComponent(props) {
return <div onResize={evt => console.log('resized')}>foobar</div>;
}
resizeAware(DecoratedComponent);

For reference, this is the logic of my decorator that would dispatch the event.

https://gist.github.com/FezVrasta/0324991bbdf044fd2723eebbc344adff

As you see, right now I'm using findDOMNode(this.componentNode).dispatchEvent(new Event('resize')) which makes the resize event available only to the real DOM node.

This means that I must listen for the event in this way:

class DecoratedComponent extends React.Component {
componentDidMount() {
findDOMNode(this).addEventListener('resize', evt => console.log('resized'));
}
render() {
return <div>foobar</div>;
}
}
resizeAware(DecoratedComponent);

This is very inconvenient and not flexible. We'd need a way to dispatch synthetic events and be able to listen to them using the onSomething properties.

I think it would be a great addition to React.

Issue 2:
From Twitter: https://twitter.com/Vjeux/status/569985084524081153

When using PhantomJS for testing browser interaction, often times what seems to happen is that values get changed directly on the DOM elements and then the 'change' event is triggered on the element. Because of this, interacting with ReactJS elements through PhantomJS and through jQuery doesn't work for some interactive elements like <input> and <select>.

Of course, the easiest solution is to take the real elements that are mounted and attach event listeners to them like $(this.MyRef.getDOMNode()).on(EVENT, CALLBACK), but it isn't the most pleasant experience.

Is there any interest in mirroring events on the real nodes to the synthetic events, or is this situation normal? I'd like to be able to interact with my application through PhantomJS, but this seems to be quite the blocker when interacting with input and select elements.

JSBin example here: http://jsbin.com/xawogo/3/edit