WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
In [21]: a = np.empty(shape=(0,0))

In [22]: np.lib.apply_along_axis(sum, 1, a)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-22-2fcce4e707fd> in <module>()
----> 1 np.lib.apply_along_axis(sum, 1, a)

myvirtualenv/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/lib/shape_base.pyc in apply_along_axis(func1d, axis, arr, *args, **kwargs)
89 outshape = asarray(arr.shape).take(indlist)
90 i.put(indlist, ind)
---> 91 res = func1d(arr[tuple(i.tolist())], *args, **kwargs)
92 # if res is a number, then we have a smaller output array
93 if isscalar(res):

IndexError: index 0 is out of bounds for axis 0 with size 0

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1261 on 2009-10-13 by trac user dpeterson, assigned to @rgommers.

Sent to me via e-mail by Burkhard Neinhues:

I've been trying to compile numpy and scipy on HP-UX. I succeeded in the end, but some patches were required. I've also attached the results for numpy.test() to this email. Please find below the steps required to compile them, if you require the patches as separate files, please let me know.

NUMPY:

# to have native support for lapack and blas
export NUMPY_FCONFIG="config_fc --fcompiler=hpux"
export LAPACK=/opt/mlib/lib/pa20_64/liblapack.sl
export BLAS=/opt/mlib/lib/pa20_64/libveclib.sl

# I had to add several missing information to this file. Is there any option to configure for 32 or 64 bits support?
# I've now hard-wired 64 bits

The file parisc-numpy.patch contains the patches. There are also some notes (as comments) in the file about why the various patches were done. Note that some of the changes support builds on additional platforms such as Solaris and AIX.

The file parisc-test.out is the test output Burkhard referred too.
Issue 1:
Issue with current documentation:

In the "Examples" section of https://numpy.org/doc/stable/reference/generated/numpy.ndindex.html#numpy.ndindex, the lines of code are not formatted correctly. It seems like they are not enclosed in a codeblock.

Idea or request for content:

No response

Issue 2:
Issue with current documentation:

In https://numpy.org/doc/stable/reference/generated/numpy.ndindex.html#numpy.ndindex, Examples has incorrect format:

# dimensions as individual arguments >>> for index in np.ndindex(3, 2, 1): … print(index) (0, 0, 0) (0, 1, 0) (1, 0, 0) (1, 1, 0) (2, 0, 0) (2, 1, 0)

# same dimensions - but in a tuple (3, 2, 1) >>> for index in np.ndindex((3, 2, 1)): … print(index) (0, 0, 0) (0, 1, 0) (1, 0, 0) (1, 1, 0) (2, 0, 0) (2, 1, 0)

Idea or request for content:

No response
Issue 1:
The line reslist[ resindex -1 ] gives the following error (because of the -1):

ERROR: MethodError: `typed_hcat` has no method matching typed_hcat(::Array{MIToS.PDB.PDBResidue,1}, ::Int64, ::Int64)
Closest candidates are:
typed_hcat(::Type{T}, ::Number...)
typed_hcat(::Type{T}, ::Any...)

Issue 2:
This gives the following error:

julia> A = zeros(5)
for i in 1:3
A[2*i -1] = 10
end
ERROR: syntax: invalid spacing in left side of indexed assignment
in eval at ./boot.jl:267

Removing the space in front of -1 makes it work.
Issue 1:
Would be nice to have a simple way of editing the options in the Context Menu (right click menu). Mine tends to get very cluttered. Current methods of editing the menu that I have found require third party software or editing the register which can be a pain.

Issue 2:
Easily manage the right click actions to edit, open at. Right now this is all over the place, different applications add right-click extensions and it is a mess. You can somehow change the default open application. But it would be great to be able to manage other actions to for example edit e.g Tiff file, HTML file, compile, etc.
Issue 1:
In the current toolchain roadmap page, I find the information regarding Python versions confusing as the last versions of SciPy are not listed and also there is no information about the max Python version for a given version of SciPy.

I propose to change the table with the following columns:

SciPy version
Python versions
NumPy versions

1.7
>3.7, <=3.10
>=1.16.5, >= 1.20.x

Right now, I am not sure for most items about the max Python version. This should also answer: should we drop Python 3.7 for 1.8? Same goes for NumPy 1.16.5.

Issue 2:
Is your feature request related to a problem? Please describe.

The problem is to have an estimator of location (i.e. the mean) in 1 dimension that is not disrupted by outliers data and that is efficient in heavy-tailed setting. This is partly solved by the median but there are estimators that are much more efficient than the median when, for example, we want to estimate the mean of a corrupted Gaussian distribution.

Describe the solution you'd like

I'd like to implement Huber's estimator of location. This is an M-estimator, it is already included in R library "MASS" for instance. This is similar but different from statsmodel implementation in part because statsmodel implementation is more complex than what I propose and it suffers a low breakdown point (number of outliers tolerated by the estimator).

Huber estimator is very famous in robust statistics and has been used for quite some time now. In particular, one can look at the seminal article [1] but also at the books [2], [3] and any google scholar search will tell you that it is widely used.

There are several ways to compute this estimator but one of the simplest is the iterative reweighting algorithm found in [2].

Describe alternatives you've considered

None

Additional context (e.g. screenshots)

None

[1] Robust Estimation of a Location Parameter, Peter J. Huber, Ann. Math. Statist (1964)

[2] Robust Statistics, Peter J. Huber and Elvezio M. Ronchetti , Wiley Series in Probability and Statistics (2009)

[3] Robust Statistics: The Approach Based on Influence Functions, Frank R. Hampel, Elvezio M. Ronchetti, Peter J. Rousseeuw, Werner A. Stahel, Wiley (2011)
Issue 1:
Note that the number of samples the test observed is small small (18 samples) compared to the test execution time (0.49s). The expected CPU sampling rate is 100Hz.

http://build.golang.org/log/790f12ebfd076cb47d01055b7ee138b6d40be2b1

go_android_exec: adb shell mkdir -p /data/local/tmp/pprof.test-23878

go_android_exec: adb push /tmp/go-build624543768/runtime/pprof/_test/pprof.test /data/local/tmp/pprof.test-23878/pprof.test-23878-tmp

217 KB/s (3129500 bytes in 14.033s)

go_android_exec: adb shell cp '/data/local/tmp/pprof.test-23878/pprof.test-23878-tmp' '/data/local/tmp/pprof.test-23878/pprof.test-23878'

go_android_exec: adb shell rm '/data/local/tmp/pprof.test-23878/pprof.test-23878-tmp'

go_android_exec: adb shell export TMPDIR="/data/local/tmp/pprof.test-23878"; export GOROOT="/data/local/tmp/goroot"; export GOPATH="/data/local/tmp/gopath"; cd "/data/local/tmp/goroot/src/runtime/pprof"; '/data/local/tmp/pprof.test-23878/pprof.test-23878' -test.short=true -test.timeout=4m0s; echo -n exitcode=$?

--- FAIL: TestCPUProfileMultithreaded (0.49s)

pprof_test.go:161: total 18 CPU profile samples collected

pprof_test.go:170: runtime/pprof_test.cpuHog1: 0

pprof_test.go:170: runtime/pprof_test.cpuHog2: 18

pprof_test.go:184: runtime/pprof_test.cpuHog1 has 0 samples out of 18, want at least 1, ideally 9

FAIL

exitcode=1go_android_exec: adb shell rm -rf /data/local/tmp/pprof.test-23878

Issue 2:
TestCPUProfileMultithreaded occasionally fails for GOOS=android and GOARCH=arm.

834 KB/s (2368016 bytes in 2.770s)

go_android_exec: adb shell cp '/data/local/tmp/goroot/pprof.test-3947-tmp' '/data/local/tmp/goroot/pprof.test-3947'

go_android_exec: adb shell rm '/data/local/tmp/goroot/pprof.test-3947-tmp'

go_android_exec: adb shell export TMPDIR="/data/local/tmp"; export GOROOT="/data/local/tmp/goroot"; cd "$GOROOT/src/runtime/pprof"; '/data/local/tmp/goroot/pprof.test-3947' -test.short=true -test.timeout=360s; echo -n exitcode=$?

--- FAIL: TestCPUProfileMultithreaded (3.60s)

pprof_test.go:165: runtime/pprof_test.cpuHog1: 0

pprof_test.go:165: runtime/pprof_test.cpuHog2: 61

pprof_test.go:179: runtime/pprof_test.cpuHog1 has 0 samples out of 61, want at least 1, ideally 30

FAIL
Issue 1:
static pub MANTISSA_DIGITS: uint = 53u;

I guess that should be 24. Or is there some reasoning behind it that I don't see?

As well as std::f32::DIGITS which should probably be 6 instead of 15.

Issue 2:
Dependency information from compilers is useful to build incrementally. Without that, build process will be incorrect and/or slow.

GCC and Clang can emit such information in (a subset of) Makefile syntax. AFAIK that can be used from make (of cource) and ninja. It might be nice if rustc provides similar feature, I think.
Issue 1:
The following export statement is not properly transformed:

export {A, B} from './foo'

It produces:

exports.A = _interopRequire(require("./foo"));
exports.B = _interopRequire(require("./foo"));

Instead of:

var _ref = require("./foo");
exports.A = _ref.A;
exports.B = _ref.B;

Tested using 6to5@2.6.2

Issue 2:
Bug report / Feature Request

With TypeScript 2.9.2 and styled-components 3.3.3, it is possible to declare a typed template literal the following way:

const Item = styled.div<{
selected?: boolean;
}>`
color: ${p => p.selected ? 'red' : 'black' };
`;

This is parsed and linted by TypeScript well (e.g. writing something like p => p.xyz causes a TS error).

When the same code is parsed with babel 7 & babel-preset-typescript@7.0.0-beta.51, the following syntax error shows up:

SyntaxError: /path/to/file.tsx: Unexpected token, expected "," (42:10)
const Item = styled.div<{
selected?: boolean;
^
}>`

This situation has created a pretty hard-to-investigate situation for me in a Next.js project. VSCode and yarn lint did not report any any problems, but the app was not building.

```ts
interface ItemProps {
selected?: boolean;
};
const Item = styled.div<ItemProps>`
color: ${p => p.selected ? 'red' : 'black' };
`;
```

↑ this transpiles, but resulting code is wrong. Something like:

```js
var Item = __WEBPACK_IMPORTED_MODULE_3_styled_components___default.div.div < ItemProps > "...".concat(function (p) {...
```

Because `ItemProps` was not supposed to be there at all, we get ` ReferenceError: ItemProps is not defined` 😱

---
It'd be great if syntax parsing by babel could be improved when it comes to typed template literals.
Issue 1:
Any draggable annotation is displayed in the wrong position after dragging (i.e. nowhere near the mouse cursor) if either of the initial XY coordinates is negative. Minimal example:

import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rcdefaults()
mpl.rcParams['toolbar'] = 'none'

plt.figure(figsize=(5, 2))
plt.plot(range(-10, 10))
an1 = plt.annotate(s='good', xy=(15, 5), bbox={'alpha': 0.5})
an1.draggable()
an2 = plt.annotate(s='bad', xy=(5, -5), bbox={'alpha': 0.5})
an2.draggable()
plt.show()

It is caused by the reference coordinates being set apparently incorrectly here: https://github.com/matplotlib/matplotlib/blob/8a270fcc64197ee00c818ec8f9ccc9f0e884828a/lib/matplotlib/text.py#L1597-1605

Using matplotlib 1.4.3 with various OSes/backends.

Issue 2:
I am finding that annotations placed outside of axes get placed incorrectly in v1.4.3. Here is an example:

import matplotlib.pyplot as plt
import matplotlib as mpl

fig, ax = plt.subplots()

ax.annotate('+ pts',
xytext = [40, 20], textcoords = 'axes points', \
xy = [40, 20], xycoords = 'axes points', fontsize = 32)
ax.annotate('- pts',
xytext = [40, -20], textcoords = 'axes points', \
xy = [40, -20], xycoords = 'axes points', fontsize = 32)
ax.annotate('+ frac',
xytext = [0.5, 0.1], textcoords = 'axes fraction', \
xy = [0.5, 0.1], xycoords = 'axes fraction', fontsize = 32)
ax.annotate('- frac',
xytext = [0.5, -0.1], textcoords = 'axes fraction', \
xy = [0.5, -0.1], xycoords = 'axes fraction', fontsize = 32)
plt.savefig('test' + mpl.__version__ + '.png')

In matplotlib v1.4.2 the plot looks like this:

In matplotlib v1.4.3 the plot looks like this:

Apparently v1.4.3 takes a negative axes fraction (or points) and wraps it around to the top of the axes.
Issue 1:
I use an external monitor with my MacbookPro (OSX 10.9.4 Mavericks). I use this monitor as an extension of my desktop on the laptop. During the day I make Atom fill the entire screen (I snap the window, a feature I have enabled using BetterTouchTool). When I disconnect the external monitor and attempt to use Atom on the laptop's screen it is too large, as if extending off the screen. To find it again I have to click into Atom, go to the top bar, Window -> Zoom. Once I do this it properly fills (again, not fullscreen) the laptop's screen.

At first you might dismiss this as saying the 3rd party app (BetterTouchTool) is responsible. However, Atom is the only application that this happens to. I also keep Chrome and Outlook in the same - window filled via snap mode on the fullscreen. Both of these apps will extend too far, but the height will be correct and I can again "grab" the window by the window title bar.

Thus I am led to believe there is something going on with the window settings for Atom, but I don't know enough about this topic to dig any farther. I was able to replicate the issue on a co-workers Mac, but we have similar environments so I can't promise that this isn't being caused by something else.

The issue: Atom window title bar cannot be found after external disconnect

How to fix: Window -> Zoom

Fixed: Atom window title bar now properly showing

What should happen: Chrome after external disconnect (all other apps on external look like this also)

Resizing Chrome: easy because the title bar is showing - I just snap it to the top and it fills the screen

Chrome properly resized

Issue 2:
stick on the bar at the top - no window around.

fresh install from www.atom.io - version 0.122.0
Issue 1:
In the 0.x versions were 5 hooks:

('args', 'pre_request', 'pre_send', 'post_request', 'response')

In 1.x there's only one: response

I've seen quite a few packages that used these hooks to manipulate the requests objects before sending them, and now in v1.x there's not even a single hook that allows them to do so.

This functionality is very much needed, and without it quite a few packages simple cannot adapt to v1.x, and their alternative is to the sort-of-a-fork requests-transition

Issue 2:
I'm sending a POST request with multiple fields with the same name which normally works well when passed in a dict:

>>> from requests import post
>>> print post('http://httpbin.org/post', data={'field': ['a', 'b']}).content
{
"origin": "[...]",
"files": {},
"form": {
"field": [
"a",
"b"
]
},
"url": "http://httpbin.org/post",
"args": {},
"headers": {
"Content-Length": "15",
"Accept-Encoding": "identity, deflate, compress, gzip",
"Connection": "keep-alive",
"Accept": "*/*",
"User-Agent": "python-requests/0.13.1",
"Host": "httpbin.org",
"Content-Type": "application/x-www-form-urlencoded"
},
"json": null,
"data": ""
}

But fails with a TypeError when the request is a multipart/form-data one:

>>> print post('http://httpbin.org/post', data={'field': ['a', 'b']}, files={'file': open('/etc/hosts')}).content
Traceback (most recent call last):
File "<ipython-input-15-4008ff697f5a>", line 1, in <module>
print requests.post('http://httpbin.org/post', data={'field': ['a', 'b']}, files={'file': open('/etc/hosts')}).content
File "python2.7/site-packages/requests/api.py", line 87, in post
return request('post', url, data=data, **kwargs)
File "python2.7/site-packages/requests/safe_mode.py", line 37, in wrapped
return function(method, url, **kwargs)
File "python2.7/site-packages/requests/api.py", line 42, in request
return s.request(method=method, url=url, **kwargs)
File "python2.7/site-packages/requests/sessions.py", line 230, in request
r.send(prefetch=prefetch)
File "python2.7/site-packages/requests/models.py", line 507, in send
(body, content_type) = self._encode_files(self.files)
File "site-packages/requests/models.py", line 366, in _encode_files
(body, content_type) = encode_multipart_formdata(fields)
File "site-packages/requests/packages/urllib3/filepost.py", line 80, in encode_multipart_formdata
body.write(data)
TypeError: 'list' does not have the buffer interface

Passing a list of tuples doesn't raise an exception but only the last item is included in the request:

>>> print requests.post('http://httpbin.org/post', data=[('field', 'a'), ('field', 'b')], files={'file': open('/etc/hosts')}).content
{
"origin": "[...]",
"files": {
"file": "[...]"
},
"form": {
"field": "b"
},
"url": "http://httpbin.org/post",
"args": {},
"headers": {
"Content-Length": "862",
"Accept-Encoding": "identity, deflate, compress, gzip",
"Connection": "keep-alive",
"Accept": "*/*",
"User-Agent": "python-requests/0.13.1",
"Host": "httpbin.org",
"Content-Type": "multipart/form-data; boundary=127.0.0.1.501.73436.1343139319.461.6"
},
"json": null,
"data": ""
}
Issue 1:
Bug report

I wanted to create a new next app using npx create-next-app with typescript. I followed all the steps and renamed .js files to .tsx and ran yarn dev. According to this blogpost: https://nextjs.org/blog/next-9#built-in-zero-config-typescript-support it should detect that the project is using typescript and add what's necessary but it didn't.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

OS: Windows

Version of Next.js: 9.0.4

Issue 2:
When (implicitly) using multiple Head elements in _document.js, e.g.

return (
<html>
<Head>
<title>Test</title>
</Head>
<HeadStyle />
...

where HeadStyle is defined as

const HeadStyle => <Head><style>{`body { margin: 0; color: red; }`}</style></Head>;

... the second Head's content never gets injected into the document on the first page load of a fresh now deployment. The consequent reloads (including in a clean browser) are fine.

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

Expected Behavior

Multiple Head elements (implicit and explicit) work reliably (even in _document.js)

Current Behavior

Broken page on the first page load of a fresh now deployment

Steps to Reproduce (for bugs)

Clone https://github.com/agurtovoy/nextjs-head-bug

now

Open the deployed site, see this (note the black text and the absence of the custom <style> element in <head>):

Refresh the page, get the expected result (text is red, <style> element is there):

Context

This reproduces consistently, i.e. every time you push a new deployment, the very first page load will surface the issue. It also reproduces in dev env from time to time, but not consistently.

Your Environment

Tech
Version

next
4.1.4

node
now

OS
now, macOS

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

Expected Behavior

This is a change request.

In My opinion, it would be helpful if the color prop of Typography is set to inherit by default.

It would also match expectation that when I set a color on a parent component then all children inherit the color (unless overridden).

Additionally, it would be awesome if this could be done for Icons as well.

Current Behavior

When I am working on a customised design, I am finding myself writing color="inherit" on Many of the Typography elements across components.

Create a new Component (I am making a menu) which adds child items recursively (which are different components)

Change Background color and color (text color) of parent component

Child components should have Typography elements.

Now even though the color is explicitly defined in parent component, still typography needs to have a prop.

Context

Having to specify color prop many times.

Your Environment

Tech
Version

Material-UI

React

browser

etc

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

Expected Behavior

I have react and react-dom installed and present in my node_modules, and in my webpack.config.js, and I expected my application to compile at least, probably with some syntax errors.

Current Behavior

My code doesn't compile, I get the error: Uncaught Error: Cannot find module "react" in the browser console, and the error: Cannot resolve module 'react' in C:\Users<user>\node_modules\material-ui\Toggle, and this error is repeated for many other material-ui

Steps to Reproduce (for bugs)

Here is a link to my codesandbox project : https://qzpxwlpkpw.codesandbox.io/

install material-ui v1.0.0-beta.21

edit some example code from the Material Ui website

npm start

ERROR in C:/Users//~/material-ui/Toggle/Toggle.js

Module not found: Error: Cannot resolve module 'react' in C:\Users<user>\node_modules\material-ui\Toggle and this error is repeated for many other material-ui components

Context

I'm trying to get a material-ui table to compile so I can have a play and figure out how I'm going to use it for a project I'm working on. I've installed react and react-dom, and I've checked they appear in node_modules, and have package.json files. I'm really baffled as to what's going on. Since it's working in code sandbox is it something to do with my node modules? If so, how can I figure out what it is that needs fixing?

Your Environment

Tech
Version

Material-UI
v1.0.0-beta.21

React
v15.6.2

react-dom
v15.6.2

browser
Chrome v61.0.3163.100 (Official Build) (64-bit)
Issue 1:
VSCode latest alpha

OS Version: OX 10.11.4

Issue 2:
I tried to install an extension. As I'm currently behind a corp firewall I wasn't successful after a first try with ext install. After configuring "http.proxy": "http://xxx.yyy.zzz:1234/" within my global settings.json I was successful in loading the list of extensions. But installing one fails with the error connect ECONNREFUSED 191.238.172.191:443. Yes, I also configured https.proxy correspondingly, but it seems that this value doesn't get honored.
Issue 1:
Summary of the new feature/enhancement

Allow command line arguments for Power Toys Run commands

Proposed technical implementation details (optional)

notepad <arg1> "<arg .. 2>" <arg3>

Power Toys Run to find program (notepad in this example) from PATH. Then pass arguments to the matching command.

Issue 2:
Summary of the new feature/enhancement

Support running commands, utilities with parameters.

The older run box supports commands and parameters to be used in cases like this:

cmd /k [your command here]

ssh username@server.local

runas.exe .......

wt (Launch Windows Terminal)

ping [server_address_here]

and more!

Could you please allow commands to be used with their optional parameters? Like the old run box did ?
Issue 1:
Hello -

I have been using the bootstrap customization tool (getbootstrap.com/customize/) a lot over the past week and it has been an invaluable timesaver.

It would be great if the tool saved the customization ID in the comments at the top of the generated CSS file. This way I could load up my build weeks or months later and quickly make any needed tweaks. Just a thought :)

Thanks for the great development tools!

Issue 2:
The new site has the awesome customization screen, but unless you manage your bookmarks like a champ, there's no clear mapping between which custom builds on your system correspond to which URLs on the site. It would rock socks if the URL of the custom build was in the header comment in the generated source files.

For example, In bootstrap.css, you could have something like:

/*!
* Bootstrap v3.0.0
* Custom build generated by http://getbootstrap.com/customize/?id=6277349
*
Issue 1:
When a user closes a modal, nothing gets focus. This breaks keyboard/tabbed usability (possibly accessibility?). Consider a long form that a user tabs through elements, and launches modals for things like help text. Ideally the last button or element used to launch the modal would receive focus back and the user could continue from where they left off.

Test: simply tab through http://getbootstrap.com/javascript/ and use only the keyboard to launch the demo modal, escape it, then start tabbing again to see the behavior in action.

Issue 2:
Ticket for first pass at making bootstrap's modal element accessible.

Things that should be done:

limit tabable area to dialog

add aria-roles

If you know of other things please list them in this ticket and I will add them to the top up here. Thanks <3!