WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Summary of the new feature/enhancement

A visual indication of how wide/tall a zone is would be very useful in creating accurate layouts. This could be done with a pixel count on the axis or a simple % of resolution.

For example, I use a 5120x1440 monitor with a centered 16:9 zone and two half size zones on the sides. If I could make sure that the center zone is exactly 2560 wide, it would ease my OCD greatly.

Just a minor idea!

Issue 2:
Summary of the new feature/enhancement

I have two keyboards connected to my Windows 10 machine, one for gaming, and one for programming. The one I use for programming is a wired Mac keyboard, so I remap the Windows and Alt keys on this keyboard to be switched around, to match the layout on my gaming keyboard.

I'd love to have the option to have Keyboard Manager key remapping to apply to a specific keyboard only, rather than all keyboards.

Proposed technical implementation details (optional)

Have the option to choose which keyboard a Keyboard Manager key remapping applies to, in cases where more than one keyboard can be/is connected to the PC.
Issue 1:
Dear Scipy team,

I am the maintainer of a pyFAI and got a bug report that a feature in my code stopped working:

silx-kit/pyFAI#1421

On my side the bug comes down to the call to scipy.optimize.fmin_slsqp here:

https://github.com/silx-kit/pyFAI/blob/master/pyFAI/geometryRefinement.py#L361

The regression was introduced in scipy v1.5 an now I got a warning with:

WARNING:py.warnings:/opt/VirtualEnv/py38/lib/python3.8/site-packages/scipy/optimize/_numdiff.py:519: RuntimeWarning: invalid value encountered in true_divide
J_transposed[i] = df / dx

and of course the optimization did not work.

Until now my code was offering to the use to "fix" some parameter during the optimization, which helps the optimizer to converge faster to the solution. To "fix" the parameter, I was enforcing both bounds to be equal to the fixed value but since the approx_jacobian in slsqp.py changed to call approx_derivative no more optimization occures.

Reproducing code example:

If I already know the first parameter should be close to 1 and I want to fix it:

>>> f = lambda x:(x[0]-1)**2*(x[1]-3)**2 # solution expected to be (1,3)
>>> scipy.optimize.fmin_slsqp(f, [1,1], bounds=[(1,1), (None, None)])
/opt/VirtualEnv/py38/lib/python3.8/site-packages/scipy/optimize/_numdiff.py:519: RuntimeWarning: invalid value encountered in true_divide
J_transposed[i] = df / dx
Inequality constraints incompatible (Exit mode 4)
Current function value: 0.0
Iterations: 1
Function evaluations: 3
Gradient evaluations: 1
Out[8]: array([1., 1.])

Error message:

There was not exception

Scipy/Numpy/Python version information:

Python: 3.8.0

Numpy: 1.18.4

Scipy: 1.5.0 - 1.5.3

You may consider I have been misusing this feature ... but the I need to implement a work around on my side.

Issue 2:
Hello,

It seems that in _numdiff.py module the _dense_difference function does not take into account situation of an optimisation with equal bounds constraints and where initial solution respect this constraint for some .

In that case line 519 in _numdiff.py module dx and df are equal to zero and trigger nan in the jacobian.

It then triggers an exit n° 4 "Inequality constraints incompatible"

Scipy/Numpy/Python version information:

1.5.1 1.16.5 sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)

my script does not raise error with following setup

1.3.1 1.16.5 sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)
Issue 1:
go version devel +7be32d0 Wed Mar 4 18:24:53 2015 +0000 linux/amd64

The following program crashes compiler with "internal compiler error: out of fixed registers" on amd64 and arm but not on 386.

package main
func main() {
type X struct {
f int
}
var x X
var xx []X
var s0 []int
var s1 []func()
var s2 [][][]int
var s3 [][]int
var s4 [][]int16
s1[xx[int(s4[0][s0[s3[s0[s2[s3[s0[s0[s0[x.f]]-1]+1][0]-1][0][0]]-1][0]]+1])].f-1]()
}

Issue 2:
1. What is a short input program that triggers the error?

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

Also a reduced example:

package main

type T struct {
F int
}

func f() {
var (
A = [][1]int{}
B = []int{3: 1, 4: 1}
X [2]byte
Y [2]int
Z []float64
n int

S []T
Funcs = [0]func() uintptr{}
)

var Var813 = Funcs[int(B[Y[S[A[X[int(Z[n])]-1][n]+1].F+1]])]()

_ = Var813
}

2. What is the full compiler output?

0 0
1 0
2 0
3 40cee6
4 0
5 40a25c
6 0
7 0
8 40a25c
9 412470
10 40a25c
11 40a25c
12 40a25c
13 40999d
14 40ab97
15 40a2f5
bug1.go:20: internal compiler error: out of fixed registers

3. What version of the compiler are you using? (Run it with the -V flag.)

go version devel +0a0e0c40901d Tue Jul 08 14:47:52 2014 -0400 linux/amd64
Issue 1:
Baerrach bonDierne opened SPR-3039 and commented

Release spring-core-1.2.7-sources.jar seems to be the last version that bundled source jars when deployed to ibiblio.

Is it possible to get source builds deployed as well?

If you need help with this let me know.

Affects: 2.0.2

Issue Links:

#7392 Create and upload Maven Source and Javadoc Bundles for Spring 2.0 ("duplicates")

Issue 2:
Aleksander Blomskøld opened SPR-1484 and commented

Maven 2 POMs with dependencies is missing for Spring. It's a lot of extra job for maven 2 users to find out which dependencies Spring needs, and to have to include them manually.

Attachments:

buildsources.sh (590 bytes)

spring-maven.tgz (10.81 kB)

spring-poms-1.2.8.zip (22.40 kB)

Issue Links:

#6209 maven pom hosed on repo1.maven.org ("is duplicated by")

#6533 Missing m2 POMs at ibiblio.net ("is duplicated by")

121 votes, 60 watchers
Issue 1:
Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.17738.1000]

What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

The bottom lines of my screen get foozled, typically after a context switch in which they are redrawn. Here's a typical example in which the tmux status line somehow got duplicated, and an additional blank line was added. This is in full screen mode, no resizing has occurred, and nothing was being written to the screen - the problem just popped up after switching from another app back to the console:

This is in a multi-monitor setup, but I've seen exactly the same problem on a single-monitor setup.

When I look at the screen, sometimes I see a cursor down at the bottom - seems like it is in a funny position and just ready to cause trouble:

What's wrong / what should be happening instead:

Bottom line should not be corrupted!

I've seen a few other console corruption issues listed here, but none of them seem to match up exactly with this.

Note that I don't have exact steps to reproduce this, but it happens constantly. If needed we can probably create a recipe to reproduce it.

-Mark

Issue 2:
Description of the new feature/enhancement

Add the ability to save the scroll buffer to a file so it can be easily searched and large regions can be copied and pasted.

Proposed technical implementation details (optional)

You have the buffer... adding a context menu to the tab to save the history shouldn't be to hard.
Issue 1:
Describe the use case

The current relationship dynamic lazy loader returns a query object.

This new lazy loader would instead present a 2.0 interface, so it would offer the methods select(), insert(), etc

Regarding the name, mike suggested statement_only, but that's still wip

Databases / Backends / Drivers targeted

All

Example Use

loaded = session.scalars(User.address.select()).all()

Additional context

No response

Issue 2:
Migrated issue, originally created by Andrey Zholos (@zholos)

When updating a table with a specified schema name, some parts of the generated statement refer to the table with an alias and some parts don't.

A subquery uses an alias that was not introduced (it could be introduced in an mssql "from" clause):

UPDATE [schema].sometable SET val=
(SELECT [#other].newval FROM [#other] WHERE sometable_1.sym = [#other].sym)

An alias is introduced but the "where" clause doesn't use it:

UPDATE [schema].sometable SET val=[#other].newval
FROM [schema].sometable AS sometable_1, [#other]
WHERE [schema].sometable.sym = [#other].sym

Both of these statements fail. Complete program attached.

Attachments: update.py | update_self.py
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When I use auto layout the grid items must not go outside of the grid.

It is expected that the container outside the grid defines max width possible. When Grid items have xs property with no value, all columns align automatically.

(This is what I get from the demo docs).

Current Behavior

I created an example here -

https://codesandbox.io/s/1ow4q5557l

The text is going out of bounds because the second Grid Item (column) is bigger that what it should be.

Context

Unable to align the items correctly.

Note what I have pasted in codesandbox is simplified code. In my actual grid item there are many more typography elements so I cannot fallback to using the "List" component.

If I am using this incorrectly then please let me know.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.29

React
16.2.0

browser
Chrome 63.0.3239.132

etc

Issue 2:
Because of the location of conditional in styling, the implementation of overlayStyle on RaisedButton does not allow a customizable implementation of backgroundColor

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

Expected Behavior

As far as I can tell, the implementation of overlayStyle in RaisedButton is intended to allow customization of the visual style of a button on hover and focus, such that if I'd like my RaisedButton to have an overlay that makes them 15% darker, I can implement that by overlayStyle={{backgroundColor: 'rgba(0,0,0,0.15)'}}.

Current Behavior

Currently, using the prop overlayStyle={{backgroundColor: 'rgba(0,0,0,0.15)'}} on a RaisedButton means that the button is always 15% darker than the theme color, rather than being 15% darker only on hover and keyboardFocus. This prevents custom focus and hover styling on the raised button, and eliminates any focus or hover styling if it's used.

Steps to Reproduce (for bugs)

See the effect in this sandbox

Context

This is an accessibility issue for raised buttons, specifically for users who rely on tabbing, especially because the TouchRipple effect on focus further lightens the button background, limiting the contrast/legibility of the text.

Your Environment

Tech
Version

Material-UI
0.19.4

React
16.1.1
Issue 1:
npm ERR! cb() never called!

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\abc\AppData\Roaming\npm-cache_logs\2020-11-03T13_58_52_163Z-de

Issue 2:
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\abc\AppData\Roaming\npm-cache_logs\2020-11-03T13_58_52_163Z-debug.log

please help me to get fix this
Issue 1:
Plotting a numpy matrix in matplotlib 1.3.1 breaks, with the exception:

>>> plot(matrix([[1,2,3]]))
File "/usr/local/lib/python2.7/dist-packages/matplotlib/units.py", line 148, in get_converter
converter = self.get_converter(xravel[0])
File "/usr/local/lib/python2.7/dist-packages/numpy/matrixlib/defmatrix.py", line 316, in __getitem__
out = N.ndarray.__getitem__(self, index)
RuntimeError: maximum recursion depth exceeded

On matplotlib 1.1.1 plots three lines, as expected. Reproduced on:

python 2.7.3, linux, numpy 1.8.0

python 2.7.5, windows, numpy 1.7.1

Issue 2:
Bug report

Bug summary

A figure created with plot_directive and preceeding label cannot be referenced with :ref: or :numref:.

Code for reproduction

.. _bar:

Testplot
--------

.. _foo:

.. plot::

import matplotlib.pyplot as plt
import numpy as np
plt.hist(np.random.randn(1000), 20)

reference to plot: :ref:`foo` / :numref:`foo`

reference to section: :ref:`bar` / :numref:`bar`

Actual outcome

rendered HTML

LaTeX code

\subsection{Testplot}
\label{\detokenize{M01/index:testplot}}\label{\detokenize{M01/index:bar}}\phantomsection\label{\detokenize{M01/index:foo}}
\begin{figure}[H]
\centering

\noindent\sphinxincludegraphics{{index-1}.pdf}
\end{figure}

reference to plot: \DUrole{xref,std,std-ref}{foo} / \sphinxcode{foo}

reference to section: {\hyperref[\detokenize{M01/index:bar}]{\sphinxcrossref{\DUrole{std,std-ref}{Testplot}}}} / \hyperref[\detokenize{M01/index:bar}]{Section \ref{\detokenize{M01/index:bar}}}

Expected outcome

The foo references should be links like the bar references.

Matplotlib version

Operating system: Linux 4.10.0-35-generic 39~16.04.1-Ubuntu 16.04.3 LTS SMP x86_64 GNU/Linux

Matplotlib version: 2.1.0 via pip

Python version: 3.5.2

Other libraries: Sphinx (sphinx-build) 1.6.4
Issue 1:
MacOSX10.9: AtomShell v0.20.4

code

document.body.innerHTML = '<webview src="https://github.com"></webview>'
var webview = document.querySelector('webiview');
console.log(webview.getUrl()); // it works.

setInterval(function(){
console.log(webview.getUrl()); // this causes crashing at display: none
}, 1000);
document.body.style.display = 'none';

Issue 2:
OS: Windows 8.1 x64

Atom-Shell: 0.19

Sorry for all the editing and deleting of my previous reports but the issue is morphing and I've narrowed it down. Apparently the webview is garbage collected when you set it's CSS display property to none. If you do this then you cannot use the webview again and if you try to set it's src it will crash Atom-Shell.

<!DOCTYPE html>
<html>
<head>
<title>webview crash test</title>
</head>
<body>
<webview id="web" style="width:100%;height:100%;position:absolute;"></webview>
<script>
window.onload = function() {
var web = document.getElementById("web");
web.src = "http://msn.com";
};
</script>
</body>
</html>

Reproduce the crash:

In your main.js make sure you have it open the dev tools once it creates a new browser window. Use the dev tools to set the CSS display property for the webview to none. Set the src of the webview using the console. Observe Atom-Shell crash.

Now a point of clarification: This sounds convoluted but I was using display:none to hide the webview, set the source and then show it in my app. I should have been using visibility:hidden instead. My UI is just set up to show the webview in the entire width/height of the window but underneath of it there is a list of links to choose from. This is the reasoning I found this issue. Using visibility:hidden makes the crashing go away.

Question, does calling display:none on the webview cause the webview to be garbage collected?
Issue 1:
Raised by this stackoverflow question. The following code , run on master...

x_actual = 49997
x3_actual = x_actual ** 3

for dtype in [np.int64, np.uint64, np.float64]:
x = {}
x['scalar'] = dtype(x_actual)
x[ '0d'] = np.array(x_actual, dtype=dtype)
x[ '1d'] = np.array([x_actual], dtype=dtype)
x[ '2d'] = np.array([[x_actual]], dtype=dtype)

x3 = {k: x**3 for k, x in x.items()}

assert all(v == x3_actual for v in x3.values()) #ok

print("input type of {}:".format(np.dtype(dtype)))
for k, v in x3.items():
print("{:>8s}: {}".format(k, v.dtype))
print()

Gives the alarming output of:

input of int64
scalar: int64
0d: int64
1d: int64
2d: int64

input of uint64
scalar: float64
0d: float64
1d: uint64 # What?
2d: uint64 # What?

input of float64
scalar: float64
0d: float64
1d: float64
2d: float64

The return dtype of power should not depend on the shape of the input array

Issue 2:
This is to gather and close some other issues. The NEP 50 proposal would close it. In many cases using int64 as the default Python integer for scalar operations (where we disable value-based logic) can be surprising

gh-2955 (bitwise_and)

gh-5746 (comparison) although uint64 and int64 comparisons of course have still more issues (covered by gh-12525)

gh-2524 (bit shift operators)

gh-8809 power is surprising for promotion (which is just the normal madness of scalar+value-based logic), again together with gh-12525

gh-13057 (division of uint by Python int)

This issue is just to gather and close the other ones as duplicates.
Issue 1:
These are slow and should be unnecessary. They are showing up in Servo profiles.

Issue 2:
c_char is i8, so trying to use string::raw::from_buf involves this:

let cstring: *c_char = .....;
let s = string::raw::from_buf(cstring as *const i8 as *const u8);

Either c_char should switch to u8, or string::raw::from_buf should take *const i8. Right now using this is quite tedious.
Issue 1:
We have a unique function that produces a new collection similar to its argument, but with each item only occurring once (in order of first appearance). There should be a corresponding unique! function that removes recurrences of items and returns this modified collection. Note that for performance, at least on dense arrays, resizing of the array should only occur at end when you know the final size to shrink the array to. Part of #20402.

Issue 2:
When looking into #6708, I noticed that the sprand function seems to generate sparse matrices with slightly the wrong density. For example:

julia> mean([nfilled(sprand(100,10,0.1)) for i=1:100])
99.81

julia> mean([nfilled(sprand(100,10,0.1)) for i=1:1000])
99.833

julia> mean([nfilled(sprand(100,10,0.1)) for i=1:10000])
99.7546

julia> mean([nfilled(sprand(100,10,0.1)) for i=1:100000])
99.72917

julia> mean([nfilled(sprand(100,10,0.1)) for i=1:1000000])
99.722943

does not seem to be converging to 100.
Issue 1:
-关于2.6.3release版本优雅停机问题，之前我在社区也发提出的issue中于开发交流过，发现依然存在问题。

框架的停机hook和spring的停机hook同时触发，导致服务的实现类中无法获取业务bean，导致服务无法正确完成。（因为spring context先于框架close了）

场景一：Springboot+innerTomcat

@SpringBootApplication

@ComponetScan

@ImportResource({"classpath:/META-INF/spring/dubbo*.xml"})

public class GatewayApplication {

public static void main(String[] args) {

SpringApplication.run(GatewayApplication.class, args);

System.in.read();

//模拟停机

System.exit(0);

}

}

场景二：

public static void main(String[] args) {

ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(classpath:/META-INF/spring/dubbo*.xml);

ctx.registerShutdownHook();

ctx.start();

}

我们分析了下2.6.3停机代码，针对spring容器需要关闭dubbo默认hook，通过spring的停机hook触发close事件listener来停机。初始化DubboApplicationListener目前只针对Main方法和Spring+web.xml方式。个人觉得DubboApplicationListener思路是对的，但是需要针对不同spring使用场景，不能总体覆盖。个人觉得DubboApplicationContextInitializer设计就有点别扭。

建议：针对Spring容器优雅停机，我们建议将spring close事件监听逻辑移到ApplicationConfig中，并在ApplicationConfig中注销默认停机hook，注册spring 停机hook。这样做的好处就是，如果框架是基于spring容器，可以一刀切的方式实现hook的管理，完全依赖spirng管理停机，使用者仅需要关系spring生命周期。核心修改如下：

ApplicationConfig implments ApplicationContextWare, ApplicationListener{

public void onApplicationEvent(ContextClosedEvent event){

DubboShutdownHook.getDubboShutDownHook().destroyAll();

}

public void setApplicationContext(ApplicationContext ctx){

//注销dubbohook，将removeShutdownHook从DubboBootstrap中迁移到DubboShutdownHook中

DubboShutdownHook.removeShutdownHook();

//注册spring hook

ctx.registerShutdownHook();

}

}

4.我们应用在实际使用过程中碰到很多停机问题，我们也针对性的对框架优雅停机尝试研究和优化，个人对dubbo代码理解有限，恳请指正。

Issue 2:
我们在测试及生产环境下总结目前Dubbo优雅停机问题存在几个问题：

[1]Spring可能先于框架关闭，导致业务服务无法正确执行完成；

[2]tomcat+spring场景，中间件停机可能会导致class被回收，导致log日志无法输出，甚至报class not found；

[3]如果存在多个hook，如spring本身有hook，无法保证hook执行顺序；

[4]zk在大数据量同步通知下延迟严重，导致注销后仍有请求（目前版本简单sleep了一下）；

[5]停机时间无法设置，官方关于“停机设置标志位”的描述有误。

综上所述，我们的优化作法是将框架的优雅停机委托给Spring管理，通过监听Spring的close事件触发停机，这样做有两个好处：(1)保证框架停机优于Spring关闭;(2)应用用起来简单，只需要维护Spring生命周期；(3)相对于hook方式，主动调用停机接口更让人放心。
Issue 1:
🐛 Bug

Unmatched behavior of numpy and pytorch on indexing with a list of bool value.

To Reproduce

import torch
x = torch.randn(3,4)
print(x[[True,False,True]])
print(x.numpy()[[True, False, True]])

With output

>>> import torch
>>> x = torch.randn(3,4)
>>> x[[True,False,True]]
tensor([[ 0.9176, 0.6378, 1.1367, -1.3373],
[ 0.4389, 0.2105, -0.7689, -0.5038],
[ 0.9176, 0.6378, 1.1367, -1.3373]])
>>> x.numpy()[[True, False, True]]
array([[ 0.43885437, 0.21049356, -0.76887 , -0.5038339 ],
[-0.7998242 , 0.7215161 , 0.5523575 , -1.6851963 ]],
dtype=float32)

Expected behavior

pytorch should behave the same as tensor.

In fact, indexing with byte tensor works:

x[torch.Tensor([True,False,True]).byte()] works

Environment

Collecting environment information...

PyTorch version: 1.0.0a0+7df6650

Is debug build: No

CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 16.04.3 LTS

GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609

CMake version: version 3.12.0

Python version: 3.6

Is CUDA available: Yes

CUDA runtime version: 9.0.176

GPU models and configuration:

GPU 0: Tesla K40c

GPU 1: Tesla K40c

Nvidia driver version: 390.25

cuDNN version: Probably one of the following:

/usr/lib/x86_64-linux-gnu/libcudnn.so.7.0.5

/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a

Versions of relevant libraries:

[pip] numpy (1.15.0)

[pip] numpydoc (0.7.0)

[pip] torch (1.0.0a0+7df6650)

[pip] torchtext (0.2.1)

[pip] torchvision (0.2.1)

[conda] magma-cuda90 2.3.0 1 pytorch

[conda] torch 0.5.0a0+6f6a1f2

[conda] torch 0.5.0a0+c425d03

[conda] torch 0.5.0a0+d2f98fc

[conda] torch 0.5.0a0+2f311be

[conda] torch 1.0.0a0+7df6650

[conda] torchtext 0.2.1

[conda] torchvision 0.2.1

Issue 2:
In numpy, indexing with a list of booleans is equivalent to indexing with a boolean array, which means it performs masking.

In PyTorch, the list of booleans is cast to a long tensor.

I believe this discrepancy should be fixed.

a = torch.rand(3, 3)
print(a)

0.1041 0.6888 0.7988
0.9398 0.9151 0.7642
0.5340 0.4715 0.8128
[torch.FloatTensor of size (3,3)]

print(a[[True, False, False]]

0.9398 0.9151 0.7642
0.1041 0.6888 0.7988
0.1041 0.6888 0.7988
[torch.FloatTensor of size (3,3)]

aa = a.numpy()
print(aa[[True, False, False]])
array([[0.10411686, 0.6887991 , 0.7988465 ]], dtype=float32)
Issue 1:
It has like 5.4k votes on uservoice, it's unfortunate that an issue of taste or style needs to be reviewed, it's like reviewing an issue about accessibility and debate whether it needs to be added to a modern program where the answer is definitely yes.

I think that the majority of developers either like it or just too used to it and some don't, that's fine too so why wouldn't you consider adding this as an option? many people that really likes the editor shy away from using it because an editor shouldn't force you into anything you don't like and the working files isn't working for many people.

Now, I can certainly use other editors instead of VSCode and I do but when I'm working with TypeScript/JavaScript I really like to use VSCode and it really bothers me that it doesn't have tabs.

I'm working with different languages and use many editors/IDEs in my work and all of them have tabs, it fits my workflow best because I've been using Visual Studio and IntelliJ to develop software for a very long time and it's just a thing for me and I guess for many others too.

What's interesting is that Visual Studio Code carries the title Visual Studio that not only has tabs but it's part of the experience in the IDE so a developer that uses VSCode should expect no less but to have tabs as part of the same editing experience.

Please, at least tell us what's going on with it, where it stands, etc...

Thanks.

Issue 2:
I really miss proper tabs for open files (like VS proper), and the ability to rip a tab out into its own window.