WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
From working on #7819 (comment), here's a case where having both bounds and constraints enabled leads to bizarre behavior that violates both. I don't know where the actual problem is. Yellow dots are the local minima found during each step. Blue is an (exclusion) constraint, and red is out of bounds:

Neither:

Bounds only (red):

Constraints only (blue):

Bounds (red) and constraints (blue):

It finds lots of incorrect minima, many of which violate the bounds or the constraints or both.

I think these are using different minimizers, though. The "both" case seems to be slsqp.

Reproducing code example:

Code for above: https://gist.github.com/endolith/6f89b1cb0baa98688a5bc49e590ce196

Scipy/Numpy/Python version information:

0.19.0 1.13.1 sys.version_info(major=3, minor=6, micro=1, releaselevel='final', serial=0)

Issue 2:
scipy.optimize.basinhopping fails when constraints are specified, returning a result that violates the constraints, even though the minimizer can easily find the solution that fits the constraints.

Reproducing code example:

import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize

def func(x):
return (x**2-8)**2+(x+2)**2

x0 = -4
x = np.linspace(-5, 5, 10000)
plt.plot(x, func(x))
plt.plot(x0, func(x0), 'x')

# Constrain to func value >= 50
limit = 50
cons = ({'type': 'ineq', 'fun': lambda x: func(x) - limit},)
plt.axhspan(limit, np.amax(func(x)), alpha=0.1)

# This returns an invalid result
result_bh = optimize.basinhopping(func, x0, disp=True,
minimizer_kwargs={'constraints': cons})

plt.plot(result_bh['x'], result_bh['fun'], 'ro')
print(result_bh)
print('---------------------------------')

# This finds the correct result easily
result_min = optimize.minimize(func, x0, constraints=cons)

plt.plot(result_min['x'], result_min['fun'], 'go')
print(result_min)

Results:

scipy.optimize.basinhopping (red dot at -3.816, 46.353306367220874):

fun: 46.353306367220874
lowest_optimization_result: fun: 46.353306367220874
jac: array([-103.789])
message: 'Positive directional derivative for linesearch'
nfev: 113
nit: 28
njev: 24
status: 8
success: False
x: array([-3.816])
message: ['requested number of basinhopping iterations completed successfully']
minimization_failures: 49
nfev: 7064
nit: 100
njev: 1444
x: array([-3.816])

scipy.optimize.minimize (green dot at -3.85, 49.99991873706809):

fun: 49.99991873706809
jac: array([-108.809])
message: 'Optimization terminated successfully.'
nfev: 28
nit: 10
njev: 6
status: 0
success: True
x: array([-3.85])

Scipy/Numpy/Python version information:

0.19.0 1.13.1 sys.version_info(major=3, minor=6, micro=1, releaselevel='final', serial=0)
Issue 1:
Brief Summary

Celery 5.x is going to support Python 3.x only, and it might be appropriate to drop billiard and use multiprocessing from python 3 directly, as billiard is fork of multiprocessing module. It would a lot less code to maintain.

Issue 2:
distex is a completely asynchronous process pool.

Given that Celery 5.0 will use the asyncio event loop as a core component an asynchronous process pool is crucial for us if the project were to succeed.
Issue 1:
The code in question

If here is no attr('data-target'), it tries to get selector from href. which caused warning in firefox 23:

Empty string can't be argument for getElementById();

because some elements that function is fired for have href="#" .

I think it should be correct to make the check like following:

selector=!/^[\.#:]$/.test(selector) && selector

also I wonder why it still uses attr('data-target') instead of data('target') ?

Issue 2:
I am Using Firefox 22.

Reproduce:

Open http://getbootstrap.com/components/

The error is visible in the console when clicking anywhere in the page but a dropdown menu.

I could track down the error to the clearMenus call, which in turn calls getParents where the error finally happens.

In getParents the selector variable is set to '#'. This character is stripped away inside jQuery.
Issue 1:
Hi,

When adding new functions to object prototype, this could be hard-typed in below scenario:

interface Array<T> {
first(): T;
}

Array.prototype.first = function() {
return this.length > 0 ? this[0] : undefined;
}

this is of type any, why it can't be of type Array ?

typescript: 1.8.30

Issue 2:
TypeScript Version:

1.8.9

Code

export class Configuration {
private storage: string;

constructor() {
this.storage = "InMemoryStorageProvider()";
}

public useLocalStorage(): void {
// This method will be injected via the prototype.
}
}

import { Configuration } from './classes/Configuration';

Configuration.prototype.useLocalStorage = function() {
this.storage = "NodeFileStorageProvider"
};

Expected behavior:

When walking the AST I use:

let identifier: ts.Identifier = <ts.Identifier>node;
let identifierSymbol: ts.Symbol = this.checker.getSymbolAtLocation( identifier );

to obtain the identifier and its possible associated symbol when the node is SyntaxKind.Identifier.

for the first 2 references to the private property storage, I obtain the identifier and the symbol (which correctly have the same Id). With the prototype function assigned to useLocalStorage the reference to storage the call to this.checker.getSymbolAtLocation( identifier ) does not return a symbol.

Actual behavior:

I am using the AST to identify identifiers which may be minified/shortened. The 1st and 2nd reference to storage gets shortened as it is a private property.

My expectation was that the reference to storage would have the same symbol ( not undefined ) as the other references to the storage property.
Issue 1:
Hi,

my task is: make the first run of X as fast as the second run.

It seems quite difficult to achieve.

The situation is, that I'm covering all code I want to execute (over runtests.jl), so in theory it should be straight forward to infer what to compile.

What I've tried:

Including runtests.jl into user image

SnoopCompile + user image

use SnoopCompile to generate snoop_precompiles.jl from runtests.jl
---- MyPackage.jl
module MyPackage
include("snoop_precompiles.jl")
end
---- userimg.jl
using MyPacke
----

BuildExecutable

Results:

I have had good results with this approach, but it doesn't work for arbitrary code. Would it be worth while to trim the included code to work? I had various failures, and as soon as OpenGL comes into the game, things were not working at all anymore

This sometimes generates a compilation speed up, sometimes not... Sometimes it changes type inference resulting in weird errors. Is this SnoopCompiles fault, or to be expected? Would fixing SnoopCompile be well invested time?

The compiled executable actually executes slower than julia executable_script.jl, suggesting that this just links the exe to the JIT, while not caching any binary. I guess I still need precompile statements and it doesn't recursively infer from main() what to compile?

My dream workflow is something like this:

# this could be executed by Pkg.build() ->
>julia --cache-binary --output-incremental=yes GLVisualize/test/runtests.jl --> v0.5/lib/cache_x.so
julia> using GLVisualize; <-- all functions already run in runtests will need no JIT
>generate_py_wrapper v0.5/lib/cache_x.so GLVisualize/src/GLVisualize.jl
--> generates py c interop thingies to call the lib... Hehehe

Btw, would generating a seperate .so + ccall solve the (quite annoying) problem, that we always need to interact with the sysimg?

I'd be quite willing to work on this in some way.

I just need to know where to start :)

Issue 2:
At this point it makes sense to separate julia into an interactive julia which runs scripts and starts the REPL and julia-compile which provides various bootstrapping and compilation features. The basic usage of julia-compile should be julia-compile program.jl which should produce an executable called program which, when run behaves the same way that julia program.jl would. In more advanced modes, it can behave like the current julia --compile=all, etc. Let's use this issue to discuss the desired API and how to split up the options.
Issue 1:
Challenge Change the Color of Text has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<h2>CatPhotoApp</h2>

<h2 style="color: red">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Issue 2:
Challenge Change the Color of Text has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<h2>CatPhotoApp</h2>
<h2 style="color: red">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Issue 1:
fn main() {
let foo: &mut [u8] = &mut [1,2,3];
foo as *mut [u8] as *mut u8;
}

error: internal compiler error: translating unsupported cast: *mut [u8] (cast_other) -> *mut u8 (cast_pointer)
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:175

Issue 2:
The following code ICEs:

fn main() {
let r : &[int] = &[1,2,3];
let _ = r as *const [int] as uint;
}

with the following error:

error: internal compiler error: translating unsupported cast: *const [int] (cast_other) -> uint (cast_integral)
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /tmp/tmp.AJuZnZc9G6/rust/src/libsyntax/ast_util.rs:776

stack backtrace:
1: 0x7fd831534e20 - rt::backtrace::imp::write::h05ad71e0d8d53545YFq
2: 0x7fd831537fe0 - failure::on_fail::h67318170e271381eq1q
3: 0x7fd831d0ef40 - unwind::begin_unwind_inner::hab98eb958c8dd037MTd
4: 0x7fd830019c20 - unwind::begin_unwind::h6101647644969584620
5: 0x7fd83001a3c0 - diagnostic::Handler::bug::h73bed1cade32a05dYID
6: 0x7fd832101800 - driver::session::Session::bug::haf0a22dbefd7a44bSmv
7: 0x7fd8325467d0 - middle::trans::expr::trans_imm_cast::h3be503504a2cb4d6iY2
8: 0x7fd832539140 - middle::trans::expr::trans_unadjusted::hd291a28db4ab1b64i50
9: 0x7fd8324f6380 - middle::trans::expr::trans::h4aa7a0f1f6a515f12o0
10: 0x7fd83259d640 - middle::trans::_match::store_local::h95ac038bd6a8824cjRf
11: 0x7fd8324f4310 - middle::trans::base::init_local::hcaa97d53d8042b21zyb
12: 0x7fd8324f3810 - middle::trans::controlflow::trans_stmt::h754badf284040952fjW
13: 0x7fd8324f51b0 - middle::trans::controlflow::trans_block::hd9fdbeb4ba696bd2boW
14: 0x7fd8325a6520 - middle::trans::base::trans_closure::h201746f506a92a56lpc
15: 0x7fd8324e4b50 - middle::trans::base::trans_fn::hfc81a7de00fc2ea6yAc
16: 0x7fd8324e01d0 - middle::trans::base::trans_item::h0854978c1c605151HTc
17: 0x7fd8325b2910 - middle::trans::base::trans_crate::haa777e4646f5d49aBRd
18: 0x7fd8329f3c80 - driver::driver::phase_4_translate_to_llvm::hee038ef8fdb7099bjOu
19: 0x7fd8329eb130 - driver::driver::compile_input::h411f5de1517db61bIpu
20: 0x7fd832a7f680 - driver::run_compiler::h918ca986269540e0iay
21: 0x7fd832a7f560 - driver::main_args::closure.148406
22: 0x7fd83212f540 - task::TaskBuilder<S>::try_future::closure.100321
23: 0x7fd83212f330 - task::TaskBuilder<S>::spawn_internal::closure.100292
24: 0x7fd8333eb720 - task::spawn_opts::closure.8416
25: 0x7fd831d6f930 - rust_try_inner
26: 0x7fd831d6f920 - rust_try
27: 0x7fd831d0c520 - unwind::try::ha98ecfc6c2b84277uId
28: 0x7fd831d0c380 - task::Task::run::hc9ce4f8671722f9bfYc
29: 0x7fd8333eb490 - task::spawn_opts::closure.8356
30: 0x7fd831d0df70 - thread::thread_start::h605925f5652c970frid
31: 0x7fd830ff6dc0 - start_thread
32: 0x0 - <unknown>
Issue 1:
I'm submitting a ... (check one with "x")

[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Test Repo - https://github.com/mildfuzz/angular-mockError

I am unable to test predicted HTTP error responses. Mockbackend can either send a response with an error code (which my app treats as a successful response in the test environment, but as an error in real world)

I am unable to send status codes with an error response in my tests, so I can not test any error handling my application might implements.

Expected behavior

at least one of the defined test cases passes

Minimal reproduction of the problem with instructions

Test Repo - https://github.com/mildfuzz/angular-mockError

this is a re-opening of issue #7471, which was closed due to lack of repro steps.

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

To be able to test all responses

Please tell us about your environment:

OsX

Angular version: 2.0.X

Angular 2.1.0

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Chrome 54

Language: TypeScript 2.0.3

Node (for AoT issues): node --version = 6.9.1

Issue 2:
I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When showing a form in IE 11 with an input field, the initial state of the field is not pristine, leading to error messages being shown to the user before he touched the field.

Expected behavior

The field state should be pristine until the user first entered and removed some text. This works fine in e.g. Google Chrome

Minimal reproduction of the problem with instructions

http://embed.plnkr.co/fm7lH2/

The red error message should only be display when the user entered and removed some text.

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

Form validation errors should only be displayed when a user touched the form.

Please tell us about your environment:

Windows 7 / IE 11

Angular version: 2.4.7

Browser: IE 11

Language: TypeScript

Node (for AoT issues): node --version = v6.3.1
Issue 1:
System information (version)

OpenCV => 3.4.7 / 4.1.1

Operating System / Platform => Ubuntu 18.04 x86_64

Compiler => gcc 8.3 / gcc 9.1

Detailed description

OpenCV fails to build when Eigen is imported as a CMake target and precompiled header are ON.

When Eigen is imported as a CMake target (here https://github.com/opencv/opencv/blob/3.4.7/cmake/OpenCVFindLibsPerf.cmake#L47-L50) I got the following error when compiling :

[321/1436] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
FAILED: modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
/usr/bin/c++ -DOPENCV_WITH_ITT=1 -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -I../modules/core/src -I../modules/core/include -Imodules/core -I../3rdparty/include/opencl/1.2 -I../3rdparty/ittnotify/include -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -fPIC -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o -MF modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o.d -o modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o -c modules/core/opencv_core_pch_dephelp.cxx
In file included from /tmp/Genie/External/source/opencv/modules/core/src/precomp.hpp:55,
from modules/core/opencv_core_pch_dephelp.cxx:1:
../modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~

Disabling precompiled header with ENABLE_PRECOMPILED_HEADER=OFF when configuring is workaround.

Issue 2:
System information (version)

OpenCV => 4.1.1

Operating System / Platform => Linux Debian 9

Compiler => GCC 6.3.0

Detailed description

I encountered an error with #include <Eigen/core> when building OpenCV 4.1.1 even though Eigen is installed on the system and is found by cmake.

[ 1%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Half/half.cpp.o In file included from /home/user/OpenCV/opencv-4.1.1/modules/imgproc/src/precomp.hpp:50:0, from /home/user/OpenCV/build/modules/imgproc/opencv_imgproc_pch_dephelp.cxx:1: /home/user/OpenCV/opencv-4.1.1/modules/core/include/opencv2/core/private.hpp:66:24: fatal error: Eigen/Core: No such file or directory # include <Eigen/Core>

Please find attached my CMakeCache.txt.

Temporary workaround that solved the issue:

Add -I<path-to-include/eigen3> to CMAKE_CXX_FLAGS.

Steps to reproduce

Download code of OpenCV 4.1.1

Build with configuration specified in CMakeCache.txt.
Issue 1:
Describe the issue:

Suppose we have an array whose total size is zero (product of shape[i] is zero) but the shape != (0,). Below, I'm making one by slicing a non-empty array.

>>> array = np.array([[1, 2, 3], [4, 5, 6]])
>>> array
array([[1, 2, 3],
[4, 5, 6]])
>>> array.tolist()
[[1, 2, 3], [4, 5, 6]]
>>> array[:, :0]
array([], shape=(2, 0), dtype=int64)
>>> array[:, :0].tolist()
[[], []]

The repr looks like [], but I would expect it to be [[], []], as the list representation is. This is minor, but I thought I'd point it out.

I also didn't see anything like it in the current open issues.

Reproduce the code example:

See above.

Error message:

No error message.

NumPy/Python version information:

>>> import sys, numpy; print(numpy.__version__, sys.version)
1.22.4 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21)
[GCC 10.3.0]

Issue 2:
Reproducing code example:

Empty arrays repr like array([], shape=(0, 0), dtype=float64), but this is not actually valid because shape cannot be passed to the array constructor:

>>> from numpy import *
>>> empty((0, 0))
array([], shape=(0, 0), dtype=float64)
>>> array([], shape=(0, 0), dtype=float64)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'shape' is an invalid keyword argument for array()

It would be useful if either array([], shape=(0, 0), dtype=float64) worked or empty arrays printed to another string that actually did work, like empty(shape=(0, 0), dtype=float64). Aside from copy-pastability being useful, it's very confusing that it shows the shape keyword like this when it doesn't actually exist.

Error message:

Numpy/Python version information:

>>> np.__version__
'1.18.1'
Issue 1:
As we talk about parallel computing in various contexts, it might be handy to keep in mind

all the high level moving parts. Here are some that come to mind, just to get the ball rolling.

Hardware

Shared Memory Machines (Threads: See #1790, #1802)

Distributed Memory (especially networks of shared memory) (spawns, MPI?, migrating threads?)

GPUs? (we do/don't believe these are here to stay)

Tools

Nice Graphical Performance Tools and Instrumentation (My first wish: just

have Green (working) / Red (idle) on every processor easily every time I do parallel julia)

Programming Models

Persistent Data as in Global Array Syntax Darrays (Star-P and others)

CILK/Spawns

Map/reduce etc.

Communication Layers

ZMQ, MPI, sockets

Schedulers

??

Does one master know all state?

Can our serial model be in conflict with various parallel models?

Libraries

Scalapack, parallel FFTW?, sparse matrices, PETSc , (star-p like to compare

with more pure julia methods?)

Issue 2:
@mlubin This is what I propose for lufact!

Create a new type - SparseMatrixCSCZeroIndexing

Avoid the copy in lufact!, and simply use S all along

Make S of type SparseMatrixCSCZeroIndexing, so that it doesn't mess up the printing of the Factorization object

Even in the lufact() we can then use this new opaque object, so that it doesn't print all wrong.
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.6

What operating system are you using?

Windows

Operating System Version

Windows 10 Pro 2004

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

The app opens a child window using window.open method (nativeWindowOpen is set to true).

User clicks on a button that is supposed to bring the previously opened window to front. The app calls win.focus() on a said child window object.

The child window should appear above the main window.

Actual Behavior

Nothing happens when win.focus() is called.

Testcase Gist URL

No response

Additional Information

When running (almost) the same code as a web app (in Chrome), the focus method brings the window to the top.

There was a similar issue reported a few years back:

#2867

Issue 2:
Output of node_modules/.bin/electron --version: 3.0.0-beta.11 && 3.0.0-beta.12

Operating System (Platform and Version): macOS High Sierra Version 10.13.6 and Windows 10

Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): 3.0.0-beta.10

Expected Behavior

In 3.0.0-beta.10, the Pepper Flash Plugin does load and does play flash videos

Actual behavior

In 3.0.0-beta.11/12, the Pepper Flash Plugin does NOT load and does NOT play flash videos

To Reproduce

If you provide a URL, please list the commands required to clone/setup/run your repo e.g.

$ git clone https://github.com/alexanderturinske/electron-sample-apps -b pepper-flash-test
$ npm install -g electron@3.0.0-beta.10
$ electron pepper-flash-plugin

New window shows up and it DOES NOT show "Couldn't load plugin"

Close the window

$ git clone https://github.com/alexanderturinske/electron-sample-apps -b pepper-flash-test
$ npm install -g electron@3.0.0-beta.12
$ electron pepper-flash-plugin

New window shows up and it DOES show "Couldn't load plugin"

Screenshots

3.0.0-beta.10:

3.0.0-beta.12:

Additional Information

Add any other context about the problem here.