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

I used the VideoCapture function to call the camera, but something went wrong. Is this a bug? My CV version is 4.5.3 .

import cv2

cap = cv2.VideoCapture(0)

while True:

ret,frame=cap.read()

gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)

cv2.imshow('WindowName',gray)

if cv2.waitKey(1)&0xFF==ord('q'):

break

cap.release()

cv2.destroyAllWindows()

cv2.error: OpenCV(4.5.3) /Users/runner/miniforge3/conda-bld/libopencv_1633800950233/work/modules/videoio/src/cap.cpp:239: error: (-215:Assertion failed) !info.backendFactory.empty() in function 'open'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/Users/master/python/cv2video.py", line 2, in

cap = cv2.VideoCapture(0)

SystemError: <class 'cv2.VideoCapture'> returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/Users/master/python/cv2video.py", line 2, in

cap = cv2.VideoCapture(1)

SystemError: <class 'cv2.VideoCapture'> returned a result with an error set

Issue 2:
System information (version)

OpenCV => 3.4.2

Operating System / Platform = macOS 10.13.6

Compiler = Xcode Version 10.0 beta 6 (10L232m)

Detailed description

OpenCV iOS framework build fails against most recent Xcode 10 beta. The following error occurs:

CMake Error at cmake/OpenCVCompilerOptimizations.cmake:458 (message):
Required baseline optimization is not supported: NEON
(CPU_BASELINE_REQUIRE=;NEON)
Call Stack (most recent call first):
cmake/OpenCVCompilerOptions.cmake:259 (include)
CMakeLists.txt:555 (include)

-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Failed
CMake Error at cmake/OpenCVCompilerOptimizations.cmake:505 (message):
Compiler doesn't support baseline optimization flags:
Call Stack (most recent call first):
cmake/OpenCVCompilerOptions.cmake:261 (ocv_compiler_optimization_options)
CMakeLists.txt:555 (include)

I realize that this is a beta version of Xcode, but the final version is expected to be released next week, and I was hoping someone else may have seen this issue. Full log is here: https://gist.github.com/amrox/522e7968c5badbb2fdd168068843e808

This seems very similar to

#10363 #8945 but this issue is said to be fixed in 3.4.1, and I'm still seeing it in 3.4.2 and 3.4.3.

Finally this only happens when using the Xcode beta toolchain. If I switch back to Xcode 9.4.1 (9F2000) it builds fine.

Steps to reproduce

Checkout opencv, tested against 3.4.3 3.4.2 and d74b98c3d9264f9623b27a8d4e0fc92ac97b71d0

build iOS framework with: python platforms/ios/build_framework.py build/ios

Edit:

It appears the real problem is due to the fact that libstdc++ is deprecated in Xcode 10 / iOS 12 toolchain and Apple wants you to move to libc++

CMakeError.log: CMakeError.log
Issue 1:
Rather than rolling our own sparse-matrix library, it seems like it would be much better to use PETSc, which is the de-facto standard here.

PETSc would give us access to a huge number of sparse-direct back-ends (#2632), iterative solvers, sparse eigensolvers (#1573) via the SLEPc library, optimized implementations (#942), multiple output formats, and parallel support (currently completely missing and quite nontrivial to implement well).

Re-inventing the wheel here is a little like rewriting LAPACK.

Issue 2:
I'm having a problem where when I build from 3c7136e when I run julia, I get the error could not allocate pools If I run as a different user, Julia runs successfully.

I think there might be something specific to my user on this box, but I am happy to help identify what is happening here.

I think this is related to #8699

also, from the julia-users group: https://groups.google.com/forum/#!topic/julia-users/FSIC1E6aaXk
Issue 1:
Avatar broken.

Username is missing first character.

User link points to 404 Not Found: https://atom.io/users/

Clicking "Report issues" triggers a dialog about invalid URL with %@.

Issue 2:
This is https://atom.io/packages/jshint - it uses a repo path of the form username/repo in package.json. The repo link in the package card is missing the first letter, and tries to open an invalid URL. The package card also failed to download the username and avatar from GitHub.

Atom 0.210.0-7a6a48d

/cc @jlord
Issue 1:
I tried the example in the file "neural_style_transfer.py". I want to see the outputs features of relu units for a single image in VGG network. I do not want to trouble to modify the code so I simply duplicated the same image for three times and inputs them together to the net (using K.function to extract three outputs). But the output has negative numbers.

However, when I tried to extract the output of only one image (still kept three image as inputs, but using three K.fucntion() to extract their outputs seperately) the problem is gone.

Even for the positive values, joint outputs are still different from individual outputs.

This is weird, I worry if it may cause serious problem. See below for the code segments (I do not modify other codes)

Issue 2:
A shared layer is represented by a single in-memory object. However, in the case shown below, saving then loading the model leads to the creation of duplicate layers - this means that training the loaded model will lead to different results. This is because one use of the shared layer is in a (sub-)model, which in turn is included as a layer in the full model.

Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

Minimal example showing the issue:

from keras.layers import Input, Dense
from keras.models import Model
from keras.models import load_model, save_model

x = Input((10,))
dense = Dense(10)
submodel = Model(x, dense(x))
model = Model(x, dense(submodel(x)))

save_model(model, 'test.model')
model2 = load_model('test.model')

print('Layer name is shared in original model:', model.layers[1].layers[-1].name == model.layers[-1].name)
print('Layer is shared in original model:', model.layers[1].layers[-1] is model.layers[-1])
print('Layer name is shared in loaded model:', model2.layers[1].layers[-1].name == model2.layers[-1].name)
print('Layer is shared in loaded model:', model2.layers[1].layers[-1] is model2.layers[-1])

returns:

Layer name is shared in original model: True
Layer is shared in original model: True
Layer name is shared in loaded model: True
Layer is shared in loaded model: False
Issue 1:
This works fine in Chrome React DevTools, only an issue in the Firefox flavor.

React version: N/A

Steps To Reproduce

Use the React DevTools in Firefox

With the Components inspector open, press e.g. CMD-+ or CMD-- to increase/decrease the UI font size

The current behavior

The rest of the debugger UI reacts (heh) to the change in font size, but the React DevTools font remains tiny. This is a critical accessibility issue -- I have a visual disability and this makes the DevTools extremely hard to use.

The expected behavior

The React DevTools UI also changes font size.

Issue 2:
This was a bit weird:

Look at the last log.

Notice how our internal error that we're supposed to just give to the error boundary is said to be uncaught. I wonder why. It doesn't look like intentional.
Issue 1:
Electron version: All

Operating system: Windows vs Mac

When I define a custom undo behaviour I found it become different between Windows and Mac devices.

This is what I did:

// the main menu I overwrite:
let menuTemplate = [
// Edit
{
label: 'Edit',
submenu: [
{
label: 'Undo',
accelerator: 'CmdOrCtrl+Z',
click () {
console.log('Undo');
}
},

{
label: 'Redo',
accelerator: 'Shift+CmdOrCtrl+Z',
click () {
console.log('Redo');
}
},
]
}
];

As you can see, I overwrite the Undo behaviour and use the same shortcuts from the Browser. When I press ctrl/cmd+z on Mac, things goes fine, the menu click go first and take over it. But in Windows, it seems like the original webContents.undo() will be executed first, if the undo stack have states (which means you should typing some letters on a <input> first).

This makes me have no chance to overwrite the undo for Windows platform. Is this expect in Windows? If we can not change the menu behaviour, is there a way to disable/stop webContents.undo when pressing ctrl+z so that the Main Menu can receive it?

Issue 2:
Minimal repro: https://gist.github.com/DanielDignam/b49084941a2f731501d5

We are using node 4.1.1, Chrome 45.0.2454.85, and Electron 0.35.2, on Windows 10

Run attached app. Notice ^Z reports correctly to the console. Type something into the input box and hit the button to remove the element from the DOM. Hit ^Z notice it doesn't report. Hit ^Z again and notice it does.

If you rerun and paste something into the text box N times you'll notice the number of ^Z's it takes before it is reported is N+1.

The implication is that the input box is still processing events even though it is no longer in the DOM, and doesn't pass the ^Z on until it has emptied its Undo stack.

This breaks undo in our application where application undo actions will not be restored on ^Z if an input field has been used and then removed from the DOM.

We want to undo other state in our application when there is no form/input.

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body id='body'>
<h1>Hello World!</h1>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
<script>
function removeInput(event) {
var i = document.getElementById("foo");
var b = document.getElementById("body");
b.removeChild(i);
}
const remote = require('electron').remote;
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;
var template = [
{
label: 'Edit',
submenu: [
{
label: 'Undo',
accelerator: 'CmdOrCtrl+Z',
click: function () {
console.log('Undo called');
},
enabled: true
}
]
}];
menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
</script>
<input id='foo' type='text'/>
<input type='button' onclick='removeInput()'/>
</body>
</html>
Issue 1:
Describe what you were doing when the bug occurred:

1.

2.

3.

Please do not remove the text below this line

DevTools version: 4.2.1-3816ae7c3

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108

at Map.forEach ()

at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)

at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)

at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)

at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)

at el (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:68139)

at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:108547)

at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)

at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)

Component stack: in vl

in div

in div

in div

in wo

in Unknown

in n

in Unknown

in div

in div

in Li

in $e

in dn

in Ca

in Pc

Issue 2:
PLEASE INCLUDE REPRO INSTRUCTIONS AND EXAMPLE CODE

I got this error when I click 'Ranked'.

Please do not remove the text below this line

DevTools version: 4.0.4-3c6a219

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11441

at Map.forEach ()

at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11387)

at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11920)

at _i (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:277123)

at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)

at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:98280)

at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)

at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363

Component stack: in _i

in div

in div

in div

in Or

in Unknown

in n

in Unknown

in div

in div

in Ha

in le

in ve

in ko

in Ul
Issue 1:
What is the current behavior?

When I using DefinePlugin to inject process.env variable into the package, the output file will contain hundreds of duplicated the variable object (in everywhere the code use it) like this:

{NODE_ENV:"production"}.NODE_ENV

Even I activated the --optimize-dedupe argument it still happens.

If the current behavior is a bug, please provide the steps to reproduce.

Just try this configuration:

new webpack.DefinePlugin({
'process.env': JSON.stringify({
NODE_ENV: process.env.NODE_ENV
})
})

What is the expected behavior?

I am expecting any variable injected by DefinePlugin should only present once in the output code as an internal module. And when any usage of the variables it could just be like a requirement.

Because if it act like current, the size of output file will be very huge with several injected variables.

Hope you could help on this.

Issue 2:
Bug report

What is the current behavior?

If i use babel-transform-runtime and use optimization splitChunks app.bundle.js not start in browser.

If the current behavior is a bug, please provide the steps to reproduce.

clone https://github.com/ariran5/webpack-splitting-error

open index.html in dist

or

clone https://github.com/ariran5/webpack-splitting-error
cd webpack-splitting-error
npm i
npm run webpack

and open index.html in dist

in order for this to work, you need to remove optimization in webpack config

What is the expected behavior?

JavaScript is expected to start working

Other relevant information:

webpack version: 4.16.5

Node.js version: 10.8

Operating System: windows 10

Additional tools:
Issue 1:
Electron version: 0.36.7

I would like to be able to customize the button title for an open dialog (https://github.com/atom/electron/blob/master/docs/api/dialog.md#dialogshowopendialogbrowserwindow-options-callback)

For example, to say Choose instead of Open:

Issue 2:
A Choose dialog is just like an Open dialog, but not only does it have a custom title, it also has a custom name for the “Open” button. Two examples where it is helpful:

choosing a directory where downloaded files should be saved – you “Choose” the directory

using a dialog to “Import” a file in a different format, not to “Open” a file in your app’s format

It is used in OS X apps: OS X Human Interface Guidelines – The Choose Dialog. I don’t know if other platforms have an equivalent.

The simplest way to support it would be accepting another option in the options parameter of dialog.showOpenDialog. The property name would be something like buttonLabel, openButtonLabel, or prompt (which is OS X’s name for it). The property should contain a string that the button will be renamed to.

To implement this for OS X, you just need to add this code to SetupDialog in file_dialog_mac.mm:

if (!prompt.empty())
[dialog setPrompt:prompt];

And also change SetupDialog and its callers to pass prompt in, which would be extracted from the options of showOpenDialog.

I can imagine that this might be useful for Save dialogs, too – you could change the button to “Save As” or “Export” instead of “Save”. You can probably implement it for dialog.showSaveDialog in exactly the same way as for showOpenDialog. It would make sense that users could pass the same option to customize the button, since those two functions already support mostly the same options.
Issue 1:
Sorry if this is a duplicate...it seems like this would have come up for somebody else before, but I can't find anything about it.

Bug report

Bug summary

When using AxesGrid and the 'extend' option for filled contours, the last rectangular color levels before the arrow-shaped endpoints are blank. A workaround is to manually create the colorbar via mpl.colorbar.ColorbarBase.

Code for reproduction

import numpy as np

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import AxesGrid
import matplotlib as mpl

levels = np.arange(0., 1.2, 0.15)

# This yields blank values just before the end arrows in the colorbar.
fig = plt.figure()
axgrid = AxesGrid(fig, 111,
nrows_ncols=(1, 1),
ngrids=1,
cbar_mode='single')
ax = axgrid[0]
cs = ax.contourf(np.random.random((10, 20)),
extend='both')
cbar = axgrid.cbar_axes[0].colorbar(cs)

# This problem does not occur when not using AxesGrid.
fig, ax = plt.subplots()
cs = ax.contourf(np.random.random((10, 20)),
extend='both')
cbar = plt.colorbar(cs, ax=ax)

# The problem also doesn't occur if using AxesGrid + manually creating the colorbar.
fig = plt.figure()
axgrid = AxesGrid(fig, 111,
nrows_ncols=(1, 1),
ngrids=1,
cbar_mode='single')
ax = axgrid[0]
cs = ax.contourf(np.random.random((10, 20)),
extend='both', levels=levels)

cmap = mpl.cm.viridis
cb = mpl.colorbar.ColorbarBase(axgrid.cbar_axes[0], cmap=cmap,
boundaries=levels,
orientation='vertical', extend='both')

Actual outcome

See the attached images.

Matplotlib version

Operating system: MacOS + Jupyter Notebook

Matplotlib version: 2.1.0

Matplotlib backend (print(matplotlib.get_backend())): MacOSX

Python version: 3.6

Jupyter version (if applicable): 4.3.0

Other libraries:

Matplotlib installed via conda install -c conda-forge matplotlib

Issue 2:
When trying to plot a 2d DataArray and setting the extent of one of the two axis with a numpy datetime64 value, the following error is returned:

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

I suggest adding the following code after this line

matplotlib/lib/matplotlib/image.py

Line 972
in
ca4958b

self._extent = xmin, xmax, ymin, ymax = extent

:

from matplotlib.dates import date2num
extent_ = []
for value in extent:
if np.issubdtype(value.dtype, np.datetime64):
value = date2num(value)

extent_.append(value)

This is linked to an issue I started on xarray:

pydata/xarray#6629
Issue 1:
In several PRs (e.g. #11182 #12916) the question arises whether we need to deprecate some object before it can be removed or changed. This goes back to defining what is public API in scikit-learn.

The lest controversial definition is that,

import paths with that include a module with a leading _ are private

other modules are public.

However, you could do, for instance,

from sklearn.cluster.dbscan_ import NearestNeighbors

Does it mean that we are supposed to preserve backward compatibility on sklearn.cluster.dbscan_.NearestNeighbors in terms of import path? How about sklearn.preprocessing.data.sparse (scipy.sparse)?

I guess not, meaning that just because we have an import path without an underscore does not mean that it is part of the public API. At the very least it also needs to be documented or used in examples.

If we take this definition,

most of sklearn.utils, is public API (as documented https://scikit-learn.org/stable/modules/classes.html#module-sklearn.utils) but certainly not all 151 objects listed in #6616 (comment)

sklearn.utils.fixes is not.

sklearn.externals are not (except for sklearn.externals.joblib) that we previously used in examples.

This would mean that we can e.g. remove sklearn.externals.six in #12916 without a deprecation warning (but possibly with a what's new entry). I have a hard time seeing a user reasonably complaining that we didn't go through a deprecation cycle there.

This would also help resolving the "public vs private utils" discussion in #6616

WDYT, do you have other ideas of how we should define what is public API in scikit-learn?

cc @scikit-learn/core-devs

Issue 2:
This is maybe for 1.0. Recently we started marking files like model_selection._split private, so that everything has a single canonical import:

from sklearn.model_selection import cross_val_score

For many (older?) models that's not the case, we have

from sklearn.linear_model.logistic import LogisticRegression
from sklearn.linear_model import LogisticRegression

etc.

I think it would be nice to make all the files that are not the canonical import (according to the API documentation) private (with deprecation obviously).

That might be a bit annoying for existing users that used long import paths, but it makes auto-complete much more helpful and the module structure much less confusing for newcomers.

For example sklearn.linear_model.ridge is a module, while sklearn.linear_model.ridge_regression is a function that implements ridge regression and sklearn.linear_model.Ridge is a class that implements ridge regression. From the names this is totally unclear.
Issue 1:
It seems there are incompatibilities between the new Profiler and the previous one, regarding CSS frameworks.

Indeed, the profiler breaks Bootstrap 3.x styles, and vice-versa (you can see on the screenshot below that the left side menu is not at the correct position):

We should expect similar issues with other CSS frameworks.

Issue 2:
Hi !

I've made a event listener that tries to switch controller under specific conditions. Here is how I set the new controller in the FilterControllerEvent:

$event->setController(array(new DefaultController(),'badRefererAction'));

When these conditions are fullfilled, my controller action is called but it cannot render any template (below the controller code):

namespace MyCompany\MyBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class DefaultController extends Controller
{
/**
* @Route("/badref", name="plugin_badreferer")
* @Template()
*/
public function badRefererAction()
{
return $this->render('MyCompanyMyBundle:Default:badReferer.html.twig', array());
}
}

as it crashes with the following error:

FatalErrorException: Error: Call to a member function get() on a non-object in E:\workspace_web\Symfony\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Controller\Controller.php line 106

What is the problem here?
Issue 1:
As reported at pendulum, there are cases where creating a date_range fails with a segfault: pendulum issues 131.

Code Sample

from datetime import datetime, timedelta

from pendulum.tz.timezone import UTCTimezone
from pendulum.tz.timezone_info import UTC
import pandas as pd

tomorrow = datetime.now() + timedelta(hours=24)
now = datetime.now()

r = pd.date_range(now, tomorrow, freq='1H')

r.tz = UTC
# prints out the current date and time
print(r[0])

r.tz = UTCTimezone
# seg faults
print(r[0])

Problem description

As I understand it is allowed for tzinfo objects to return None for utcoffset according to the Python docs. However, in _get_dst_info of tslib it is assumed not to return None. As I understand from the aforementioned pendulum ticket, it is correct to return None in this case.

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.11.3-200.fc25.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8

pandas: 0.20.3

pytest: 3.1.3

pip: 9.0.1

setuptools: 25.1.1

Cython: None

numpy: 1.13.1

scipy: 0.19.1

xarray: None

IPython: 6.1.0

sphinx: None

patsy: None

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: 4.6.0

html5lib: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: None

s3fs: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
xref #13351 (comment)

We use io/common/_get_handle and io/common/get_filepath_or_buffer in various places in most of the io modules, need to unify encoding handling to a somewhat simpler interface (1 function).