WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Now deno check command provides two options in terms of how many modules it's going to typecheck.

no option: only local modules are typechecked

--all: all modules including remote are typechecked

This suffices in almost all use cases, but it's going to be complicated if we want to perform typecheck within the project that vendors external dependencies using deno vendor. Vendored dependencies are considered "local" so deno check will check for vendored ones as well. This is sometimes troublesome if vendored dependencies have type errors that are known and acceptable.

So it would be great if we could have a new option, let's say --ignore=<ignore>, that make the type checker ignore type errors happening in the specified files. This way, specifying --ignore=vendor/ will allow us to ignore vendored dependencies.

Issue 2:
I have third party dependencies that work with the default --no-check=remote option. However once I vendor them and updating deno.json to use the vendor/import_map.json, I start getting errors type errors. It appears the only workaround for having my dependencies vendored is to run deno run and deno test with the --no-check flag to disable all checking. I'd like to have checking for my other local files when I run deno test. According to the most recent release blog post, it looks like it's planned to keep local type checking for deno test and to remove it for deno run.

In our deno.json file we can configure deno lint and deno fmt to exclude files and directories. It would be nice if we could do the same with deno's type checking so that we can disable it for the vendor directory generated by deno vendor. That would allow me to use deno vendor without giving up type checking when I run my tests.

Below is an example of one of the type errors I get related to my vendored dependencies. I don't get the type error when not using vendored dependencies.

error: TS2339 [ERROR]: Property 'spawn' does not exist on type 'typeof Deno'. 'Deno.spawn' is an unstable API. Did you forget to run with the '--unstable' flag?
const { status, stderr } = await Deno.spawn(Deno.execPath(), {
~~~~~
at file:///home/kyle/Projects/deno/udibo/vendor/deno.land/std@0.141.0/node/_utils.ts:228:41
Issue 1:
Describe what you were doing when the bug occurred:

Recording with the Profiler

Clicking on the "Ranked Chart"

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:
Following Bergstra NIPS 2011 (@jaberg for the intimates) it would be great to have a GridSearch-like object implementing Gaussian-Process based hyper-parameter optimization.

To keep things simple, we would optimize only on continuous parameter, i.e. in a hyper-cube. The API would specify an initial bounding box, and also whether each parameter should be varied in the log-domain or in the linear-domain.

Some notes from a discussion with James Bergstra:

The algorithm goes mostly as

Compute the score on a set of random points in the specified hyper-cube

For i in budget:

2.a fit Gaussian Process to the pairs (parameters, scores)

2.b find the parameters that optimizes the expectation of getting a lower score then the best currently available. For this, optimize it using a black-box scipy optimizer, such as the simulated annealing).

A lot of the gain comes from sequentially choosing the points, so, as we don't have a queue mechanism, we should do this sequentially for now. Parallel can be done in internal cross-validations, or to compute initial points.

Remark: to computing the expectancy of (X, y) with Gaussian process, we should overide score to use something more clever than the standard LinearRegression score.

Issue 2:
I've found that I cannot use pipelines if I wish to use the label encoder. In the following I wish to build a pipeline that first encodes the label and then constructs a one-hot encoding from that labelling.

from sklearn.preprocessing import OneHotEncoder, LabelEncoder
from sklearn.pipeline import make_pipeline
import numpy as np

X = np.array(['cat', 'dog', 'cow', 'cat', 'cow', 'dog'])

enc = LabelEncoder()
hot = OneHotEncoder()

pipe = make_pipeline(enc, hot)
pipe.fit_transform(X)

However, the following error is returned:

lib/python2.7/site-packages/sklearn/pipeline.pyc in _pre_transform(self, X, y, **fit_params)
117 for name, transform in self.steps[:-1]:
118 if hasattr(transform, "fit_transform"):
--> 119 Xt = transform.fit_transform(Xt, y, **fit_params_steps[name])
120 else:
121 Xt = transform.fit(Xt, y, **fit_params_steps[name]) \

TypeError: fit_transform() takes exactly 2 arguments (3 given)

It seems that the problem is that the fit method for label encoder only takes a y argument, whereas the pipeline assumes that it will take an X and an optional y.
Issue 1:
Hi,

Just a thought that came to my mind as I have to do it several times, shouldn't the pulls floating be removed for mobile devices or at least 320px width?

Reason:

On smaller devices, there is no point in floating the elements in most cases (at least 80%) as display block are generally used on this small screens.

Issue 2:
Would it be useful to have .pull-right-sm, .pull-right-md, .pull-right-lg classes, so as to responsively control the pull-right behavior?

That is, once the columns start collapsing at a smaller width have the pull-right no longer apply, such that what was pulled-right in wide-screen is now aligned-left in narrow-view.
Issue 1:
I currently use due to meet this challenge.

Eg.

$builder->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event)
{
$data = $event->getData();
$form = $event->getForm();

$formDisponibility = $form->get("disponibility");

$choiceListOption = $form->get("disponibility")->getConfig()->getOption("choice_list");

$choices = $choiceListOption->getChoices();

$views = $choiceListOption->getRemainingViews();

foreach($choices as $key => $choice)
{
$view = $views[$key];

$view->attr = array("data-day" => $choice->getDay());
}

});

Issue 2:
It would be nice to be able to define extra HTML attributes for choices in a choice list that are added to the option or input tags.

Origin of this ticket: #3456
Issue 1:
To have pull-right and pull-left for Bootstrap v3 in xs, sm, md, lg media. This will help having some complex behavior for contents.

I'm working on number of projects which needs some Complex behavior on content . as you can see in the Modal Window at this site http://stream.aljazeera.com .. which is messing the pull-right and pull-left for media devices.

You will notice that content will change for mobiles, Tablets.

Now we are into the new Bootstrap v3 !!!!!

As for Bootstrap v3 we still see that we do not have this list Of classes.

pull-left-xs

pull-right-xs

pull-left-sm

pull-right-sm

pull-left-md

pull-right-md

pull-left-lg

pull-right-lg

As we do have to add them every time.

I have this Repo for that at this link https://github.com/Natshah/bootstrap-pull

I hope that you consider adding add the 8 new classes.

Thanks :)

Issue 2:
Would it be useful to have .pull-right-sm, .pull-right-md, .pull-right-lg classes, so as to responsively control the pull-right behavior?

That is, once the columns start collapsing at a smaller width have the pull-right no longer apply, such that what was pulled-right in wide-screen is now aligned-left in narrow-view.
Issue 1:
Run application and see html generated

http://plnkr.co/edit/nNc5ETPm7KvxkC6w3btt?p=preview

Current behavior

<table class="table">
<thead>
<tbody> <- this tbody element is generated
<tr trset="">
<!--template bindings={}-->
<th class="sorting">
nameTitle
</th>
<th class="sorting">
urlTitle
</th>
</tr>
</tbody>
</thead>
<tbody></tbody>
</table>

Expected/desired behavior

<table class="table">
<thead>
<tr trset="">
<!--template bindings={}-->
<th class="sorting">
nameTitle
</th>
<th class="sorting">
urlTitle
</th>
</tr>
</thead>
<tbody></tbody>
</table>

Other information

Issue 2:
If I write something like this:

<tbody *ngFor="#item of [1,2,3]" myTableRow></tbody>

that uses the following component:

@Component({
selector: '[myTableRow]',
template: '<tr><td>test</td></tr>'
})
export class MyTableRow {}

then it produces invalid HTML, there will be two nested tbody tags, like this:

<tbody mytablerow="">
<tbody>
<tr><td>test</td></tr>
</tbody>
</tbody>

(In the real application I use this to group together multiple tr tags in a tbody, and the table has many tbody tags after each other)

I get all kinds of malformed tables because of this, and it also breaks the usual table > tbody > td CSS rules, and is actually invalid HTML.

This worked fine with alpha.46, but has been broken since alpha.47.

Demo here: http://plnkr.co/edit/myYJZf6ZZj1ofhIcNj7E?p=preview
Issue 1:
Proposed changes

Inspired by the example stem plot.

1. Z order

Currently the stems are on top of the markers. This is in agreement with the MATLAB behavior http://de.mathworks.com/help/matlab/ref/stem.html#btrw_xi-94

However, it looks a bit untidy. I propose to place the markers on top.

2. Example coloring

The example cycles through the stem colors. IMO this is an untypical use case. The example (in particular if we just have one) should show a typical diagram. Therefore, we should change it to just one stem color.

Issue 2:
Bug report

Bug summary

When opening a matplotlib figure window, the (Windows) task bar icon is not correct. It instead shows a white / blank icon. Possible duplicate of #14850?

Description

This issue started after updating the Spyder IDE to 4.1.2 (which required removing and reinstalling matplotlib), but the folks over at the spyder repository indicated this was not something they control.

I tried:

updating matplotlib from 3.1.3 to the most recent version (3.2.1) using conda update -c conda-forge matplotlib

a clean reinstall of anaconda (for unrelated reasons), but the same issue was still present

resetting the windows icon cache by removing C:\Users\<user>\AppData\Local\IconCache.db and restarting windows explorer

switching backend for rendering the figure through the Spyder settings from Automatic to Qt5, Qt4, or Tkinter. In all cases the outcome was the same.

Outcome

Note the icon on the windows task bar, the white page-like icon is that of the figure window.

Expected outcome

Previously I would see the spyder IDE icon (which, apparently, is already strange behaviour) also for the figure windows, on another machine I see the matplotlib logo.

Matplotlib version

Operating system: Windows 10

Matplotlib version: 3.1.3, but upgrading to 3.2.1 did not resolve the problem

Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg (but tried also Qt4 and TKinter)

Python version: 3.7.6
Issue 1:
When you want the FlashBag to set a message, you'd like to do getFlashBag on the session. However, you can only achieve this by type hinting an injection on the Session\Session object. The Session\SessionInterface doesn't contain the "getFlashBag" method thus you can't use the Request::getSession();

If you do want to get the flash bag from it, you can try "getSession()->getBag('flash bag name')". However, that doesn't guarantee that you get the flash bag that was inserted because you don't know the name.

It's a minor inconvenience that has multiple custom solutions, but I've seen this issue come around a couple of times already in "#symfony".

Issue 2:
I don't know if this is intended, but the SessionInterface from HttpFoundation does not contain the getFlashBag method. Why is this annoying? Well if I have got a request in a controller and I call getSession on it my IDE provides autocompletion for the SessionInterface and I am not seeing the getFlashBag method.
Issue 1:
The following code is taken in part from the contour demo of the matplotlib documentation. I am using contourf instead of simple contour. The contour plot is shown just as I want it to be within the matplotlib figure window.

As soon as it comes to saving I am not content with the result. A PNG save looks perfect, but I do not have any levels, as png si no vector format. When saving to PDF of SVG format I have levels, BUT there are thin light borders around the levels. At first I thought they are caused, because every level is getting a stroke around. When opening the SVG file with inkscape to drop those strokes, I found out, that actually the levels are saved just a bit to small or a bit too large respectively... you hardly note them, when you zoom in, but by zooming out they get quite prominent. I suppose they are due to the fact, that the values of the levels are saved with low precision!? Is it possible to get rid of theese borders by some command?

I am aware that these borders will not make a difference in most applicative contexts. Unfortunately where I am using them the do not simply look ugly, but really disturb the quality of the depicted results...

import matplotlib
import numpy as np
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

matplotlib.rcParams['xtick.direction'] = 'out'
matplotlib.rcParams['ytick.direction'] = 'out'

delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
Z = 10.0 * (Z2 - Z1)

plt.ion()
plt.figure()
CS = plt.contourf(X, Y, Z, colors=[[0,0,0.5],[0,0,0.2]])
plt.title('Saved as PNG')
plt.savefig('image1.png')

plt.title('Saved as SVG')
plt.savefig('image1.svg')

Issue 2:
This is the underlying problem raised in #1178.

It is illustrated by the test below; note that boundary anomalies are visible in all forms--agg on the screen, and pdf and svg displayed with a viewer--but in different places depending on the viewer and the size of the figure as rendered.

Note that the colorbar is rendered using pcolormesh, which has its own renderer with agg but otherwise is handled by draw_path_collection.

import numpy as np
import matplotlib.pyplot as plt

z = np.arange(150)
z.shape = (10,15)

fig, axs = plt.subplots(2,2)

ax = axs[0,0]
cs0 = ax.contourf(z, 20)
cbar0 = fig.colorbar(cs0, ax=ax)

ax = axs[0,1]
cs1 = ax.contourf(z, 20, alpha=0.3)
cbar1 = fig.colorbar(cs1, ax=ax)

ax = axs[1,0]
im2 = ax.imshow(z, interpolation='nearest')
cbar2 = fig.colorbar(im2, ax=ax)

ax = axs[1,1]
im3 = ax.imshow(z, interpolation='nearest', alpha=0.3)
cbar3 = fig.colorbar(im3, ax=ax)

plt.savefig("test1.pdf")
plt.savefig("test1.svg")
plt.show()
Issue 1:
Juha Syrjälä opened SPR-9578 and commented

I am trying to use a result of method call to a spring bean as a part of the cache key, but that doesn't seem to work.

@Inject

private KeyCreatorBean keyCreatorBean;

@Cacheable(value = "cacheName", key = "{@keyCreatorBean.createKey, #p0}")

@Override

public List<Examples> getExamples(ExampleId exampleId) {

Results in this kind of stack trace:

org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 1): Field or property 'keyCreatorBean' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpressionRootObject'

at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:208)

at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:72)

at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:52)

at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)

at org.springframework.expression.spel.ast.InlineList.getValueInternal(InlineList.java:86)

at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)

at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:88)

at org.springframework.cache.interceptor.ExpressionEvaluator.key(ExpressionEvaluator.java:80)

at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:464)

Reference URL: http://stackoverflow.com/q/11396911/1431

Issue Links:

#18385 Cacheable condition SpEL cannot invoke bean methods ("duplicates")

#13512 @Cachable condition should allow referencing return value

#18804 Allow @Cacheable method to return java.util.Optional variant of cached value

10 votes, 12 watchers

Issue 2:
Alex opened SPR-2294 and commented

I have a class 'MyBean' with a property 'myMap' of type java.util.Map. Spring allows me to configure an instance of this class as follows, using mapped properties:

<bean id="myBean" class="com.foo.MyBean">

<property name="myMap[foo]" value="a" />

</bean>

This works fine.

However, I have an application where the map keys need to be mapped property names, e.g "foo.bar[0]". i.e. the map entry key itself contains the "[" and "]" character:

<bean id="myBean" class="com.foo.MyBean">

<property name="myMap[foo.bar[0]]" value="a" />

</bean>

When I call toString() on the myMap property after Spring has instantiated the bean, this is the result:

{foo.bar[0=a}

As you can see, the key for this map entry is missing the closing "]" character.

There appears to be a bug in the string parsing of the mapped property name?

Affects: 1.2.8

Issue Links:

#5976 Handle nested brackets in a map keys ("duplicates")

1 votes, 1 watchers
Issue 1:
System information (version)

OpenCV = 4.5.5.dev

torch = 1.6.0

Steps to reproduce

net = cv2.dnn.readNetFromONNX(onnx_path)

Issue

I am getting the following error. when I updated the PyTorch to the latest version like 1.12.0 I am getting a new error (-215:Assertion failed) inputs.size() in function 'getMemoryShapes' . Any help on this would be appreciated.

`cv2.error: OpenCV(4.5.5-dev) /home/nsight/YOLOX/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1021: error: (-2:Unspecified error) in function 'handleNode'

Node [Range@ai.onnx]:(Range_404) parse error: OpenCV(4.5.5-dev) /home/nsight/YOLOX/opencv/modules/dnn/src/layer_internals.hpp:110: error: (-2:Unspecified error) Can't create layer "Range_404" of type "Range" in function 'getLayerInstance'

`

Here is a snapshot of layer 404 in ONNX graph

Issue 2:
System information (version)

OpenCV => 4.2

Operating System / Platform => MacOS Catalina v.10.15.3

IDE => Spyder 4.1.0

Compiler => python3.7

Detailed description

I can open images and process them with openCV, but when it comes to destroying windows shown with cv2.imshow() using cv2.destroyAllWindows() script stops execution in console, but that pop up window is just hangs/freezes

With video it’s even worse - i can capture from camera and/or file, but i can’t modify video properties or save capture to file (file is created but 8k size)

So, it’s like partially broken and yet at the same time it gives no exceptions.

Steps to reproduce

import cv2

cap = cv2.VideoCapture(0) #capture frame from built-in video camera
#print frame properties - width / height
print(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
print(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

### That part breaks execution (if removed all works well.) ###
cap.set(3,1208) #set width property to 1208
cap.set(4,720) #set height property to 720

print(cap.get(3))
print(cap.get(4))
###.... ###

while(cap.isOpened()):#run loop if file/device is open
ret,frame = cap.read() #read frames continiously until break

if ret:
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) #convert image to gray-scale
cv2.imshow('DisplayWindow', gray) #display frames readed from camera and show in window named "frame"

if cv2.waitKey(1) & 0xFF == ord('q'):#break from loop on 'q' pressed
break
else:
break

cap.release() #release camera
cv2.destroyAllWindows()# should destroy all windows, but Window stop showing camera capture and just freezes and stays.

Issue submission checklist

I report the issue, it's not a question

I checked the problem with documentation, FAQ, open issues,

answers.opencv.org, Stack Overflow, etc and have not found solution

I updated to latest OpenCV version and the issue is still there

There is reproducer code and related data files: videos, images, onnx, etc
Issue 1:
There was 1 failure:

1) Symfony\Component\Process\Tests\SigchildEnabledProcessTest::testPTYCommand
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
'foo
+sh: 1: 3: Bad file descriptor
'

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

uname -a
Linux ewgra-Inspiron-5720 3.13.0-58-generic #97-Ubuntu SMP Wed Jul 8 02:56:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

At Process::start proc_open have arguments:

$commandLine : string(61) "(echo "foo") 3&gt;/dev/null; code=$?; echo $code >&3; exit $code"

$descriptors =

array(4) {

[0]=>

array(1) {

[0]=>

string(3) "pty"

}

[1]=>

array(1) {

[0]=>

string(3) "pty"

}

[2]=>

array(1) {

[0]=>

string(3) "pty"

}

[3]=>

array(2) {

[0]=>

string(4) "pipe"

[1]=>

string(1) "w"

}

}

$this->processPipes->pipes = array(0) {}

Issue 2:
Running

phpunit src/Symfony/Component/Process

I got the error

There was 1 failure:

1) Symfony\Component\Process\Tests\SigchildEnabledProcessTest::testPTYCommand
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
'foo
+sh: 1: 3: Bad file descriptor
'

/home/arnau/code/symfony/src/Symfony/Component/Process/Tests/AbstractProcessTest.php:433

Symfony branch: 2.7

OS: Ubuntu 14.04.1 LTS

PHP: 5.5.9-1ubuntu4.5

PHPUnit: 3.7.20