WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Describe the issue:

xref: numba/numba#8478

For a long time, the .types attribute on ufuncs has contained char typecode descriptions of the implemented loops. For example:

In [1]: import numpy as np

In [2]: np.sin.types
Out[2]:
['e->e',
'f->f',
'd->d',
'f->f',
'd->d',
'g->g',
'F->F',
'D->D',
'G->G',
'O->O']

Since (I think) NumPy 1.23, ISA specific dispatch loops have been added to some ufuncs, these also appear in .types as additional registrations ahead of the "original" registered loops. Example:

In [3]: np.fmax.types
Out[3]:
['ff->f',
'dd->d',
'gg->g',
'??->?',
'bb->b',
'BB->B',
'hh->h',
'HH->H',
'ii->i',
'II->I',
'll->l',
'LL->L',
'qq->q',
'QQ->Q',
'ee->e',
'ff->f',
'dd->d',
'gg->g',
'FF->F',
'DD->D',
'GG->G',
'mm->m',
'MM->M',
'OO->O']

Note how the ff->f, dd->d and gg->g types occur a) first and are b) replicated later on.

I'm not sure that this is actually an issue that would matter in practice except that...

In Numba, the .types is used as part of the matching logic for type specific code generation, this is now broken by the above due to the following. In NumPy 1.23 a call in Numba to np.fmax(int64, int64) resolves via ff->f as it is the first "match" (can cast to the type), whereas prior to this it would first match on ll->l (as none of the types prior to this would be a safe cast).

The .types description/char codes are not capturing that some of the loops registered are ISA specific, it looks like a potential mistake/bug in the output.

Essentially this ticket is to seek clarification over the intent so that I can patch Numba against it!

Many thanks in advance for your help.

Reproduce the code example:

import numpy as np
print(np.fmax.types)

Error message:

N/A

NumPy/Python version information:

NumPy version 1.23.1

Context for the issue:

Impacts Numba. xref: numba/numba#8478

Issue 2:
Apologies if this is a duplicate as it seems such an obvious bug but I could not find another issue about it. Legacy printing mode omits the plus signs for complex arrays.

>>> import numpy as np
>>> np.ones(5, dtype=np.complex128)
array([1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j])
>>> np.set_printoptions(legacy="1.13")
>>> np.ones(5, dtype=np.complex128)
array([ 1. 0.j, 1. 0.j, 1. 0.j, 1. 0.j, 1. 0.j])

The output on numpy 1.13.3 is

>>> np.ones(5, dtype=np.complex128)
array([ 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j])
Issue 1:
when i press alt the F in the File menu is underlined yet when i press ALT+F i get editor:move-to-end-of-word?

and when i press ALT+H to supposedly access the help menu i get editor:delete-to-beginning-of-word?

the rest of the menu keyboard shortcuts work

conflict only happens when an editor window has focus i guess

it works fine when for example all files are closed or no editor has focus

i am on windows

Issue 2:
I don’t really stick to one computer to program, and some computers don’t have editors. Currently I use Sublime Text portable, but it would be great if there was a portable version of Atom.
Issue 1:
We are using the Java client, and we have some custom code to inflate Java objects from the returned doucments. The get and search APIs seem to return completely different interfaces and object trees, even though they both contain the same underlying information. This is a problem for us because our inflation code is then duplicated which introduces possible bugs. Can the get and search APIs on the Java client be refactored so they use the same data structures for each hit returned?

Issue 2:
This typically happens if the query contains eg. two inner hits definitions on the same nested path and does not define explicit names for inner hits.
Issue 1:
http://stackoverflow.com/questions/32553207/values-missing-when-loaded-from-pandas-hdf5-file/32587108?noredirect=1#comment53034458_32587108

e.g.

if I

df.to_hdf('foo.h5','df',encoding='utf-8')

then

pd.read_hdf('foo.h5','df')

should pick up the encoding for each table (unless the user overrides by passing in encoding=...

Issue 2:
Code Sample, a copy-pastable example if possible

>>> ser = pd.Series(pd.Categorical([np.nan]))
>>> ser.nunique()
ValueError: buffer source array is read-only

Problem description

The above code gave 0 in v20.3 and is expected to give 0 also in v0.21. The problem is independent of if I set some categories.

EDIT: Actually this doesn't give error if I set categories. so this only happens if no categories are set. The use case for no categories in my case is programmatically reading in data, where some columns are empty and of dtype categorical.

Expected Output

0 (zero)

Output of pd.show_versions()

INSTALLED VERSIONS

commit: 8137209

python: 3.5.4.final.0

python-bits: 32

OS: Windows

OS-release: 10

machine: AMD64

processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.21.0

pytest: 3.2.3

pip: 9.0.1

setuptools: 36.5.0.post20170922

Cython: None

numpy: 1.13.3

scipy: None

pyarrow: None

xarray: None

IPython: 6.1.0

sphinx: None

patsy: None

dateutil: 2.6.1

pytz: 2017.3

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: None

openpyxl: 2.4.8

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None
Issue 1:
I cooked up a minimal example (a modified example from the julia docs) in order to show my problem:

func_dict = Dict{Int,Function}()

function mycustomsort{T}(a::T, b::T)
return func_dict[1](a,b)
end

# Last chance to define mycompare here(!!)

const mycustomsort_c = cfunction(mycustomsort, Cint, (Ref{Cdouble}, Ref{Cdouble}) )

# Too late; the world has changed!
function mycompare{T}(a::T, b::T)
return convert(Cint, a<b ? -1 : a>b ? +1 : 0)::Cint
end

func_dict[1] = mycompare

A = [1.0,5,2,3]

ccall(:qsort, Void, (Ptr{Cdouble}, Csize_t, Csize_t, Ptr{Void}),
A, length(A), sizeof(eltype(A)), mycustomsort_c)
println(A)

One gets the output:

ERROR: LoadError: MethodError: no method matching mycompare(::Float64, ::Float64)

The applicable method may be too new: running in world age 20393, while current world is 20394.

Yes in the (constructed) example above, one can use the workaround to define mycompare before mycustomsort_c. But in real world examples this is not always possible.

Real world example: I'm the author of the ODEInterface package (available for Julia v0.4, v0.5, and trunk before 23.12.2016). There the idea is, that the user can write julia functions (e.g. the right-hand side of an ODE) and give this julia-functions to the ODEInterface. Inside the ODEInterface Fortran codes are called. These Fortran-Codes call Callback-functions that (in my case) are cfunctions of the ODEInterface that in turn try to call the user-given Julia function. Since Pull #17057 this is not possible anymore, because the ODEInterface (and hence the cfunctions) are typically loaded/compiled before the user defines the problems he/she wants to solve.

Any idea how I can solve this problem?

Julia Version 0.6.0-dev.1704
Commit 0a0c41c* (2016-12-27 16:34 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, haswell)

Issue 2:
It seems much harder to pass a proper closure as a callback function in Julia 0.6 than in previous versions due to #17057. In particular, the method described in the manual and in this blog post no longer works: passing the Function via a "thunk" void* that is called from a cfunction fails because the Function sees an "old world age".

See JuliaPy/PyCall.jl#343 and JuliaMath/Cubature.jl#22 and the mailing list, for example, but this will affect any package wrapping a C library that expects callback functions.

In PyCall, @yuyichao suggested using eval, but this is clunky and seems likely to impose a large performance penalty. Is there a better solution?
Issue 1:
Hello,

I am new to 6to5 and I am trying to convert some of my ES6 files into ES5. I have had some success with this but wasn't entirely sure my approach was right. This is what I am doing:

Using grunt-6to5 to transpile my code

Using grunt-browserify to concatenate my files into a bundle

using the following grunfile:

module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);

grunt.initConfig({
'6to5': {
dist: {
files: [{
expand: true,
cwd: 'public/js/',
src: ['**/*.js'],
dest: 'public/dist/'
}]
}
},
browserify: {
dist: {
files: {
'public/dist/bundle.js' : 'public/dist/app.js'
}
}
}
});

grunt.registerTask('default', ['6to5', 'browserify']);
}

My question is, is this the right approach or is there anyway I can combine both these steps into one?

Also, upon transpiling a class, the output doesn't look as pretty as advertised. It adds the following block to every transpiled file (and it is understandable)

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};

My class goes from

class myclass {
greet() {
console.log('Hello world');
}
}

to:

"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};

var myclass = (function () {
function myclass() {}

_prototypeProperties(myclass, null, {
greet: {
value: function greet() {
console.log("Hello world");
},
writable: true,
enumerable: true,
configurable: true
}
});

return myclass;
})();

Which is fine but upon bundling them using broswerify, every class that got transpiled has the _prototypeProperties duplicated. Is there a trick to avoid this?

Issue 2:
Bug Report

Current Behavior

Given the current code block:

test(function() {
var a = 1;
// one
}
// two
);

The first line of comment is incorrectly attributed to the trailingComments of the anonymous function:

{
"type": "File",
"program": {
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"arguments": [
{
"type": "FunctionExpression",
"body": {
"type": "BlockStatement",
},
"trailingComments": [
{
"type": "CommentLine",
"value": " two",
"start": 34,
"end": 40,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 8
}
}
},
{
"type": "CommentLine",
"value": " three",
"start": 46,
"end": 54,
"loc": {
"start": {
"line": 6,
"column": 1
},
"end": {
"line": 6,
"column": 9
}
}
}
]

Expected behavior/code

trailingComments for the anonymous function should only contain the second comment line.
Issue 1:
The problem

Although they are not commonly used, SecurityBundle provides some useful functions called logout_path() and logout_url() (see reference).

In regular Symfony applications I don't use them because I always know exactly the URL or the route name associated with the logout action. However, when developing some code that can be integrated in any Symfony application I can no longer know the logout URL and I must use logout_*() functions.

The problem is that these functions, obviously, require the name of the user provider to generate the URL. But again, I cannot know the name of the user provider for the Symfony application which is going to use this software.

The solution

The current solution seems verbose and a bit weird to me:

<a href="{{ logout_path(app.security.token.providerKey) }}">Close session</a>

What do you think about making this argument optional? If you set it, the URL is generated for that provider. If you don't set the argument, the function automatically selects the right provider for the current user:

<a href="{{ logout_path() }}">Close session</a>

Issue 2:
Hi,

I am trying to use the new auto wiring feature to automatically load the entity manager to my service:

my_test_service.test:
class: MyTestBundle\Service\TestService
autowire: true

use Doctrine\ORM\EntityManager;
class TestService
{
public function __construct(EntityManager $em)
{
}
}

Result is:

RuntimeException in AutowirePass.php line 231: Unable to autowire argument
of type "Doctrine\ORM\EntityManager" for the service "my_test_service.test".

Any idea?

Thanks

Seb
Issue 1:
Describe your issue.

404 not found

Reproducing Code Example

Here: https://docs.scipy.org/doc/scipy/reference/tutorial/index.html#user-guide
when click `Getting started`
404: https://docs.scipy.org/doc/scipy/reference/getting_started.html

Error message

Not Found
The requested URL /doc/scipy/reference/getting_started.html was not found on this server.

Apache/2.4.39 (Ubuntu) Server at docs.scipy.org Port 443

SciPy/NumPy/Python version information

NULL

Issue 2:
After Big Sur update I'm not able to install scipy in any of my virtualenvs.

pip install scipy

generate this error

numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. Note: Accelerate is no longer supported.
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/ernestoarbitrio/.virtualenvs/histolab/bin/python /Users/ernestoarbitrio/.virtualenvs/histolab/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/3j/s7l7gl410xx64sk3zg9_ngh40000gn/T/tmppxmdgj6o Check the logs for full command output.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Orientation in StepButton's props should be optional as document described.

Current Behavior

Orientation is a required prop, cause type missmatch.

Steps to Reproduce (for bugs)

<StepButton />

ERROR in /xxx/xx.tsx

[tsl] ERROR in /xxx/xx.tsx(240,29)

TS2322: Type '{ children: string[]; }' is not assignable to type 'IntrinsicAttributes & StepButtonProps & { children?: ReactNode; }'.

Type '{ children: string[]; }' is not assignable to type 'StepButtonProps'.

Property 'orientation' is missing in type '{ children: string[]; }'.

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.27

TypeScript
2.6.2

Issue 2:
Problem description

React release 15.2.0 will cause some of the components generating

Unknown prop tooltipPosition on tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop

Referring https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b

Versions

Material-UI: 0.15.1

React: 15.2.0

Browser: Chrome
Issue 1:
When working on the Multiview PR #16316 I'm facing a problem with the shader generation: If you are going to use multiview you need to add an specific directive on the shader: layout(num_views = 2) in;. This will require a FBO with a TextureArray2D attached with two views.

Typically if we require a multiview session is because we are going to use an ArrayCamera with multiple views (as a CAD software) or we want to render both eyes in VR so we will get a huge improvement. But if we render just 1 view it will add a penalty because we will sill be using a two-dimensional FBO.

Ideally we could have a "simple" way to compile the same program for different "app's presets" so we could switch between the programs as the presets change.

For example we could compile the with or without multiview and use these shaders depending if we are in VR presenting or just painting in 2D to the canvas.

Is there any ideas or any similar work already done in this area?

Issue 2:
It would be necessary to have multiple multiple webglprogram on a single material to solve #11400.

This would require several steps to be taken to get this done:

Figuring out what parameters are necessary to generate a webglprogram and use a single parameter source to create it. (#18279)

Build single parameter source from 4 parameter sources: material, object, renderer, scene.

Material parameter: gets regenerated when needsUpdate is true

Renderer parameter: gets regenerated every render

Scene parameter: gets regenerated every render

object parameter: gets regenerated every ??

Create keys based of the 4 parameter sources to figure out if something changed.

Use single parameter source as key to figure out if program needs to be created.

Use single parameter source as key to figure out which program to use.

We would also need to track which program gets used by which material to make sure that the programs get deleted when the material gets disposed of.
Issue 1:
pytorch1.6

ubuntu20.0

code:

for i, (inp, labels) in enumerate(tqdm(train_loader)):

inp = inp.to(device)

with torch.cuda.amp.autocast():
preds = model(inp)
batch_size = inp.size(0)
text, length = converter.encode(labels)
preds_size = torch.IntTensor([preds.size(0)] * batch_size)
loss = criterion(preds, text, preds_size, length)
optimizer.zero_grad()
scaler.scale(loss).backward()
scaler.step(optimizer)
scaler.update()

erro:

CUDNN_STATUS_BAD_PARAM,

but i use normal mode is ok

cc @mcarilli

Issue 2:
🐛 Bug

get cuDNN error: CUDNN_STATUS_BAD_PARAM in cnn-lstm network forward method

To Reproduce

import torch
from torch import nn, optim
from torch.cuda.amp import GradScaler, autocast

class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv1d(1, 10, 2)
self.lstm = nn.LSTM(input_size=10, hidden_size=10,
batch_first=True,bidirectional=True)

def forward(self, x):
x = self.conv1(x)
x = x.permute(0, 2, 1)
x, _ = self.lstm(x)
return x

net = Net().cuda()
net.train()
optimizer = optim.SGD(net.parameters(), lr=1e-3)

scaler = GradScaler()

optimizer.zero_grad()

with autocast():
output = net(torch.rand(10,1,10).cuda())

Environment

torch==1.6.0 nightly (2020-04-10)

@mcarilli

cc @csarofeen @ptrblck
Issue 1:
Describe the bug

My TSLint gives an error (see screenshot) after upgrading from 0.21.4 to 0.23.0 axios.

To Reproduce

If in AxiosPromise you pass any value other than unknown, then TSLint throws an error. For example, if I receive a {name: string} object in response, then I cannot use the interface to specify this in AxiosPromise.

Expected behavior

I would like to pass the response interface if I know exactly what to expect.

Environment

Axios Version 0.23.0

Node.js Version 16.9.0

Additional context/Screenshots

Issue 2:
Describe the bug

CVE-2021-3749 describing a severity 7.5 Regex DoS vulnerability

All our builds failing as a result of HIGH rating during security scan.

To Reproduce

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3749

Expected behavior

Expect there to not be a security hole (sorry - bot forces me to say something)

Environment

Axios Version 0.21.1

Additional context/Screenshots

N/A see CVE
Issue 1:
Currently loss functions does not allow weighting each instance differently. For example, in machine translation, we don't want to calculate losses for PAD labels. This can be done with cross entropy by specifying label weights, but can't be done with MSELoss (which is used to train critic/baseline model if we apply RL to MT). Manually writing a new loss function is possible, but having this feature is very convenient. The weights are better be per-instance rather than per-label.

Issue 2:
It would be useful to have losses that return a batch of losses, rather than summing/mean-ing them. This is useful e.g. for adding weights on the loss that vary for each batch element, and for masking losses on the outputs of variable-length RNNs.

Most common losses can be emulated using element-wise arithmetic (or in the case of the categorical NLL, a Gather operation), and that was my standard solution in lua torch. However, having them built-in is arguably cleaner and leads to more consistent code for the end user.
Issue 1:
I'm in a LAN, with last windows build from http://atom.someguy123.com/#sthash.eU1lJdcA.dpbs

System is a Windows7 x64.

If I open a local file (desktop for example) loads correctly the file.

If I open a remote file (on the private network \172.28.26.*) treeview sees all the files and folders, when I click on a file it opens a tab but doesn't load any text (blank)

If I map the remote folder ad a network drive (on I:/) and I open the same directory, files load correctly.

Issue 2:
OS: Windows 7

Atom Version: 0.95.0-3f0640f

Hosting files on a network drive (i.e. \network\private\myfiles) and opening files in atom does not show anything. Files list on left pane and a tab opens up in editor, but tab is empty and shows nothing.

Additional Note: I tested using a mapped drive and it worked. It appears there's an issue running atom in Windows and trying to open files on a network path.
Issue 1:
Jon Chase opened SPR-3954 and commented

Here's the forum thread that covers the bug: http://forum.springframework.org/showthread.php?t=44442

Basically, when using the Spring MVC JSP forms taglib in FreeMarker templates, binding errors are not output by the <form:errors /> tag. Other tags seem to work fine, however.

I'll attach an example project that shows the issue.

I've tried stepping through things in the debugger to see what's happening. The error message is there, and it's being written to a buffer inside one of hte Spring custom tags (although I was kind of lost at that point:)), but it doesn't seem to make its way into the output.

Interestingly, if I use the form:errorssome message</form:errors> variation, the "some message" is printed out (although it's not possible to get the real errors, so this doesn't help much, just shows that the error is certainly "there"). Also, I can use the FreeMarker macors that come with Spring MVC (bind and showErrors) to display the error message.

Affects: 2.0.6, 2.1 M4

Attachments:

springjsp.zip (6.27 MB)

Issue Links:

#8110 form:errors and form:option JSP tags don't render in FreeMarker templates ("duplicates")

Issue 2:
Dave Syer opened SPR-8683 and commented

AntPathMatcher.AntPatternComparator algorithm wrong for hierarchical matches, Consider an incoming request

GET /hotels/foo/rooms

and two patterns that match

1: /hotels/{hotel}/**

2: /**

Intuitively 1 is more specific than 2, so the comparator should return negative with compare(1,2) (i.e. 1<2). Unfortunately this is not the case because the comparator thinks that 2 is more specific because it has fewer matching points (wildcards + brackets).

Affects: 3.0.6

Issue Links:

#15181 Assign lowest priority to "/" in AntPathMatcher (_"duplicates"**_)

#13002 AntPatternComparator prefers a less specific match when brackets occur

#11407 RequestMapping with 3 PathVariable doesn't work

#12245 Determination of the best pattern match to map a handler to an URL

Referenced from: commits spring-attic/spring-framework-issues@876f756, spring-attic/spring-framework-issues@4332c1b

6 votes, 10 watchers