WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
@UniqueEntity doesn't properly handle composite keys when one of them is a related entity. The database throws Integrity constraint violation: 1062 Duplicate entry when trying to persist an entity with the same company and name as an already existing one. Expected behavior is that @UniqueEntity's validator blocks persisting the (duplicate) entity. Here's such an entity to illustrate the issue:

/**
* @ORM\Entity
* @ORM\Table(name="my_user",
* uniqueConstraints={@ORM\UniqueConstraint(columns={
* "company_id", "name"
* })}
* )
* @UniqueEntity(fields={"company", "name"})
*/
class MyUser {

/**
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;

/**
* @ORM\ManyToOne(targetEntity="Company", inversedBy="myUsers")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=false)
* @Assert\NotNull
*/
protected $company;

/**
* @ORM\Column(name="name", type="string", nullable=false)
* @Assert\NotBlank
*/
protected $name;

// setters and getters omitted

}

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
4.0.4

Javascript error is report to the JS console (tested in Chrome and Edge) when the exception is handled by Symfony Profiler:

Uncaught TypeError: Cannot set property 'className' of null at Object.createTabs

May be related to #24281.

Steps to reproduce:

Create a new flex project

composer create-project symfony/skeleton blog
cd blog
composer require server --dev
composer require profiler --dev

Create a controller and enable its route in config/routes.yaml:

<?php
namespace App\Controller;

class DefaultController {
public function index()
{
throw new \Exception('Wow!');
}
}

Run php bin\console server:run

Open the browser

Info about the exception is rendered properly

But there is an error in the browser JS console
Issue 1:
Description

There is a great Operator for Cloud Functions: https://airflow.apache.org/docs/apache-airflow-providers-google/stable/operators/cloud/functions.html

But, if needing a bit more compute/control than the functions runtime supports, utilizing Cloud Run could be ideal.

Use case/motivation

Looking to be able to trigger Cloud Run jobs from Airflow akin to Cloud Functions [ when needing to compute slightly larger things that don't work with Functions ].

Related issues

I did not see any related issues.

Hoping for some comment on whether this would be welcomed. If nobody else would address, but would be a welcomed contribution, then I am happy to dig into contributing.

Are you willing to submit a PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Apache Airflow version

2.3.0 (latest released)

What happened

After upgrade from 2.2.2 to 2.3.0, when I am trying to do airflow db upgrade all I get is following log and then airflow hangs:

Found 16 duplicates in table task_fail. Will attempt to move them.

What you think should happen instead

Airflow should not hang at this log and properly move these duplicates

How to reproduce

Run Airflow 2.2.2

Create duplicates in table task_fail

Update Airflow to 2.3.0 and try upgrading DB

Operating System

Debian 10

Versions of Apache Airflow Providers

apache-airflow-providers-apache-cassandra==2.0.1 \
apache-airflow-providers-apache-hive==2.0.2 \
apache-airflow-providers-celery==2.1.0 \
apache-airflow-providers-cncf-kubernetes==2.0.2 \
apache-airflow-providers-ftp==2.0.1 \
apache-airflow-providers-http==2.0.1 \
apache-airflow-providers-imap==2.0.1 \
apache-airflow-providers-jdbc==2.0.1 \
apache-airflow-providers-mysql==2.1.1 \
apache-airflow-providers-papermill==2.2.3 \
apache-airflow-providers-postgres==2.2.0 \
apache-airflow-providers-sftp==2.1.1 \
apache-airflow-providers-sqlite==2.0.1 \
apache-airflow-providers-ssh==2.1.1 \
apache-airflow-providers-google==5.1.0 \
apache-airflow-providers-apache-beam==3.1.0 \
apache-airflow-providers-apache-spark==2.0.1 \

Deployment

Other Docker-based deployment

Deployment details

Google GKE

2 Instances of Airflow processes running(HA configuration)

Anything else

Problem occurs every time I am trying to update database.

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct
Issue 1:
Issue with current documentation:

The documentation for scipy.interpolate.RegularGridInterpolator describes the class as for "Interpolation on a regular grid in arbitrary dimensions" and there is this statement, "The data must be defined on a regular grid; the grid spacing however may be uneven." Isn't such a grid a rectilinear grid, and not explicitly not a regular grid? See Regular Grid.

The really odd thing about all of this is that the code on which this class is based, regulargrid by Johannes Buchner, seems to make the same mistake. In the README for the regulargrid repo, it even links the wikipedia article I've just referenced here at the top. Then it goes on to describe a Cartesian Grid as one with equal spacing between points (correct, but that spacing has to also be equal across each dimension) and a Regular Grid as having unequal spacing between points (incorrect). Beneath this definition of "Cartesian grid", there's an example of a grid which is Regular but not Cartesian.

Just to make sure that the "Regular grid" was actually rectilinear, I checked regulargrid/test/test_regulargrid.py. On line 13, the breaks are distributed randomly in each of two spatial dimensions, making it in fact rectilinear and not regular.

I can also confirm that the same mistake is made in scipy.interpolate.interpn - I've used this code on rectilinear grids and it seems to work fine, despite the method saying that a "regular grid" is required many times in the documentation.

I think correcting this is important - I tried for hours to find a rectilinear grid interpolator so that I could use it instead of interpn... it turns out I need not have bothered!

Suggested fix:

The documentation for scipy.interpolate.RegularGridInterpolator and scipy.interpolate.interpn should be updated to specify that the interpolation happens on a rectilinear grid rather than a regular grid.

Issue 2:
The Pypi wheels (in particular the manylinux ones) contain prebuilts libraries for openblas (bsd) and libgfortran.... (gpl with runtime exception?) but no information about their licenses and where to get the corresponding sources. It would be great to have some clarity in this domain.

The same issue exists with numpy numpy/numpy#8689
Issue 1:
If I paste this function in the REPL and hit one of the arrow keys, the first line is duplicated.

function f(io::IO, s)
print(io, "StringDecoder from $(F()) to $(T()) wrapping $(s.istream)")
end

i.e. I get this:

julia> function f(io::IO, s)
julia> function f(io::IO, s)
print(io, "StringDecoder from $(F()) to $(T()) wrapping $(s.istream)")
end

Each additional press gives a new duplicated line.

Issue 2:
I had hoped that indexing a named tuple (#22194) with a Symbol would be a type-inferrable operation. I'm guessing that a tfunc or whatever, like for Tuple, may be needed here.

_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.7.0-DEV.2400 (2017-11-02 03:12 UTC)
_/ |\__'_|_|_|\__'_| | ajf/empty/5fa163f (fork: 1 commits, 0 days)
|__/ | x86_64-linux-gnu

julia> nt = (a=1, b=2.0)
(a = 1, b = 2.0)

julia> f(x) = x[:a]
f (generic function with 1 method)

julia> @code_warntype f(nt)
Variables:
x::NamedTuple{(:a, :b),Tuple{Int64,Float64}}

Body:
begin
return (Base.getfield)(x::NamedTuple{(:a, :b),Tuple{Int64,Float64}}, :a)::Union{Float64, Int64}
end::Union{Float64, Int64}
Issue 1:
To replicate:

A = Tridiagonal(rand(4), rand(5), rand(4))
B = rand(5, 5)
A * B #works
B * A #MethodError
B * full(A) #works

Seems to me some fallback is missing. I'm on v0.4-rc2, haven't tried on master.

Issue 2:
See http://stackoverflow.com/questions/21595246/try-catch-or-type-conversion-performance-in-julia. We have lots of integer, float, expression parsing code that all just raises exceptions rather than indicating whether they succeeded or not, but we discourage try/catch as control flow. Should we provide non-error-raising versions of all of these functions that people can use to test whether some string is a valid float, for example?
Issue 1:
TypeScript Version: nightly (1.9.0-dev.20160521) (same behavior in 1.8.10).

Given this plain JavaScript file annotated with JSDoc for the Closure Compiler (included via allowJs):

/**
* @param {number=} input
* @return {number}
*/
function legacyMethod(input) {
if (typeof input === "undefined") {
return 0;
}
return input * input;
};

And this TypeScript file:

console.log(legacyMethod(1));
console.log(legacyMethod());

I would expect that the second legacyMethod call to also be fine, due to the = suffix on the type (see https://developers.google.com/closure/compiler/docs/js-for-compiler#types for more details on the Closure Compiler type language). Based on Visual Studio Code's Intellisense the extracted type for legacyMethod is function legacyMethod(input?: number): number which seems correct. However, when running, I get:

main.ts(2,13): error TS2346: Supplied parameters do not match any signature of call target.

Out of curiosity, I tried legacyMethod(undefined) which worked (as did legacyMethod(null), which the Closure Compiler would not have allowed, since optional parameters are undefined, not null).

Issue 2:
When I use jsdoc to create constructor the intellisense work well. Except a bug that it must obey parameter. It will not know type if the parameter is not all passed in. even it marked as optional by jsdoc

As the screenshot. air is optional by jsdoc

this work but

not
Issue 1:
Typically .env these files are small and manageable, but there are times when you run into situations where you duplicate the same data within the file. Here is an example:

MAIL_USERNAME=hello@laravel-news.com

MAIL_FROM_ADDRESS=hello@laravel-news.com

The dotenv package that Laravel relies on can use variables with other defined variables in this same file. For example:

MAIL_USERNAME=hello@laravel-news.com

MAIL_FROM_ADDRESS=${MAIL_USERNAME}

This simple trick allows you not to repeat yourself and can be useful when you have multiple services requiring the same piece of data.

I tried using this with the deno dotenv package and the deno standard library for env files and both parsers don't pick up the variable, intead the console log value in the MAIL_FROM_ADDRESS example above would be just ${MAIL_USERNAME} instead of hello@laravel-news.com.

Issue 2:
When running deno info mod.ts the printed emit field shows a path with a duplicate extension .ts.js. mod.tscontains just some re-exports:

// mod.ts
export { foo, bar, baz } from "./mods/mod.ts"

deno info mod.ts
local: /mnt/c/Users/User/foo/bar/mod.ts
type: TypeScript
emit: /path/to/some/project/mod.ts.js
dependencies: 3 unique (total 11.42KB)

deno --version:

deno 1.13.2 (release, x86_64-unknown-linux-gnu)
v8 9.3.345.11
typescript 4.3.5
Issue 1:
A major use case for the numpy.fromfile() function is in reading from binary file of some kind. Frequently, binary formats are just arrays of data with a fixed-size header. It would be useful to have an extra optional parameter for the fromfile() function which defines a byte offset for when to start reading. This parameter would default to 0, leaving it backwards-compatible with existing code.

Reproducing code example:

import numpy as np

binary_file = "sample_binary.bin"
my_array = np.fromfile(binary_file, dtype=np.uint8, offset=40)

Currently, the above code will not run, as the 'offset' keyword argument is not supported. In this call, the ndarray object 'my_array' would be the result of the binary file being read in, starting with an offset of 40 bytes.

It is certainly possible to work-around the issue currently, but adding direct support for offsets in the function would make for cleaner code.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1412 on 2010-02-25 by trac user A_LARAS, assigned to @cournape.

Hi There[[BR]]

I'm trying to build scipy from the trunk (latest release):[[BR]]

python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr/local/python[[BR]]

but stuck with the following error :[[BR]]

C compiler: c++_r -qlanglvl=extc89 -DNDEBUG -O[[BR]]

compile options: '-Iscipy/interpolate/src -I/usr/local/python/lib/python2.4/site-packages/numpy/core/include -I/usr/local/python/include/python2.4 -c'[[BR]]

c++_r: scipy/interpolate/src/_interpolate.cpp[[BR]]

sh: c++_r: not found.[[BR]]

sh: c++_r: not found.[[BR]]

error: Command "c++_r -qlanglvl=extc89 -DNDEBUG -O -Iscipy/interpolate/src -I/usr/local/python/lib/python2.4/site-packages/numpy/core/include -I/usr/local/python/include/python2.4 -c scipy/interpolate/src/_interpolate.cpp -o build/temp.aix-5.3-2.4/scipy/interpolate/src/_interpolate.o" failed with exit status 127[[BR]]

whith export CXX="c++", I hit another error (syntax error)[[BR]]

c++ c++ -qlanglvl=extc89 -bI:/usr/local/Python.2.4/lib/python2.4/config/python.exp build/temp.aix-5.3-2.4/scipy/interpolate/src/_interpolate.o -Lbuild/temp.aix-5.3-2.4 -o build/lib.aix-5.3-2.4/scipy/interpolate/_interpolate.so[[BR]]

c++: c++: No such file or directory[[BR]]

c++: unrecognized option '-qlanglvl=extc89'[[BR]]

c++: unrecognized option '-bI:/usr/local/Python.2.4/lib/python2.4/config/python.exp'[[BR]]

error: Command "c++ c++ -qlanglvl=extc89 -bI:/usr/local/Python.2.4/lib/python2.4/config/python.exp build/temp.aix-5.3-2.4/scipy/interpolate/src/_interpolate.o -Lbuild/temp.aix-5.3-2.4 -o build/lib.aix-5.3-2.4/scipy/interpolate/_interpolate.so" failed with exit status 1[[BR]]

the second "c++" is passed as an options to CXX compiler, and I don't know how to get rid of this.[[BR]]

OS: AIX 5.3 64 bits[[BR]]

CC: gcc (GCC) 4.2.4[[BR]]

CXX: c++ (GCC) 4.2.4[[BR]]

Python: Python 2.4 (#2, Dec 20 2004, 10:36:59) [C] on aix4[[BR]]

Numpy: 1.4[[BR]]
Issue 1:
run the spider with scrapy runspider, it also happens on parse and crawl.

https://gist.github.com/nramirezuy/65faa56c7eab1e117d77

Issue 2:
Programming a Crawler from ipython notebook is causing boto to raise an error

ERROR:boto:Caught exception reading instance data
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/boto/utils.py", line 219, in retry_url
r = opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error timed out>
ERROR:boto:Unable to read instance data, giving up
2015-03-24 00:58:54-0300 [fipe-periodo] INFO: Closing spider (finished)
2015-03-24 00:58:54-0300 [fipe-periodo] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 308,
'downloader/request_count': 1,
'downloader/request_method_count/GET': 1,
'downloader/response_bytes': 124031,
'downloader/response_count': 1,
'downloader/response_status_count/200': 1,
'finish_reason': 'finished',
'finish_time': datetime.datetime(2015, 3, 24, 3, 58, 54, 646566),
'item_scraped_count': 171,
'response_received_count': 1,
'scheduler/dequeued': 1,
'scheduler/dequeued/memory': 1,
'scheduler/enqueued': 1,
'scheduler/enqueued/memory': 1,
'start_time': datetime.datetime(2015, 3, 24, 3, 58, 53, 978029)}
2015-03-24 00:58:54-0300 [fipe-periodo] INFO: Spider closed (finished)

We solved the problem by removing boto from scrapy.optional_packages

Here is the code

from twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy import log, signals
from scrapy.utils.project import get_project_settings

from fipe_spiders.spiders.automoveis import FipePeriodo

from scrapy import optional_features
# uncommented fixes my issue
# optional_features.remove('boto')

def setup_crawler(Spider):
spider = Spider()
settings = get_project_settings()

crawler = Crawler(settings)
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
crawler.configure()
crawler.crawl(spider)
crawler.start()

setup_crawler(FipePeriodo)

log.start()
reactor.run()
Issue 1:
Hi,

After our latest vendor upgrade we have experienced a very long execution time on our CI server. After digging into it I found the following:

Symfony 2.6.5, Win 7 x64, dev mode:

Total time 755 ms
Initialization time 480 ms

composer update symfony/symfony

//...

- Removing symfony/symfony (v2.6.5)
- Installing symfony/symfony (v2.6.8)

(no other vendors were updated)

Symfony 2.6.8, Win 7 x64, dev mode:

Total time 9622 ms
Initialization time 9405 ms

problem present on linux as well

php error log empty

dev log seems normal

prod mode is unaffected

Any help would be much appreciated.

Issue 2:
On Previous versions of symfony (lower than 2.6.8) the response time of a page was about 800 ms in dev environment. With the upgrade in 2.6.8 the response time was more than 4s with high usage of CPU. In production environment, I didn't notice any response time change between 2.6.7 and 2.6.8.

The timeline of the toolbar shows an Initialization time from 300ms for 2.6.7 to 3800ms for 2.6.8.

Environment :

Linux Ubuntu 15.04

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

Context

We ❤️next.js! I made the (possibly) poor decision of migrating our (nteract's) monorepo to Webpack 4 only to notice that next.js is on webpack 3. How far off is a migration to webpack 4? My primary reason for asking is to know if I should switch us back to webpack 3 or just wait on the next next version. 😄

We have a few non-next.js apps (some loaded by a python server, one by electron) and we want to make the webpack similar using the universal webpack configurator plugins crafted for next 4. I don't want to break our next apps, so I kept those a bit separate.

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

Context

We ❤️next.js! I made the (possibly) poor decision of migrating our (nteract's) monorepo to Webpack 4 only to notice that next.js is on webpack 3. How far off is a migration to webpack 4? My primary reason for asking is to know if I should switch us back to webpack 3 or just wait on the next next version. 😄

We have a few non-next.js apps (some loaded by a python server, one by electron) and we want to make the webpack similar using the universal webpack configurator plugins crafted for next 4. I don't want to break our next apps, so I kept those a bit separate.
Issue 1:
julia> module temp
struct x end
end
Main.temp

julia> using Main.temp

julia> f(::temp.x) = 1
f (generic function with 1 method)

julia> f(temp.x())
1

julia> module temp
struct x end
end
WARNING: replacing module temp.
Main.temp

julia> f(temp.x())
ERROR: MethodError: no method matching f(::Main.temp.x)
Closest candidates are:
f(::Main.temp.x) at REPL[3]:1
Stacktrace:
[1] top-level scope
@ REPL[6]:1

In this case perhaps there might be a way to indicate that the present module differs from the one for which the method had been added? The closest candidate is confusing otherwise.

Issue 2:
Here's a MWE on v1.6.1:

struct Foo end

f = Foo()

module Bar
export Foo, func
struct Foo end

func(f::Foo) = "hi"
end # module

using .Bar

func(f) # Error: can't dispatch

# Then I did:
f isa Foo
methods(func) # Only one method found

# I should have checked:
f isa Bar.Foo

If the error message could say there are two Foos defined in different modules that would be helpful.
Issue 1:
Some keyboards (like HP Pavilion 600) have a functional button (F1-F12) that cannot be locked to use this as function keys without Fn key holding. And no, they don't have any Fn lock (HP support confirms this). So I can remap most of these keys, but F9-F12 keys seem as shortcuts (it detects with Remap shortcut function):

Win-F9 => F12

Win-Ctrl-F9 => F11

Win-Tab => F10

Win-Shift-F9 => F9

But I can't map a shortcut into a specified key, only as another shortcut.

So, I will be glad to use the ability to remap a keyboard shortcut into a specified key.

Issue 2:
📝 Provide a description of the new feature

This feature will remove the default search bar, and attach a permanent search prompt onto the desktop. Also, adds additional behaviour which will snap when user clicks shift+drag. And blurs, on using windows, or losing focus?

What is the expected behavior of the proposed feature? What is the scenario this would be used?

It will replace the search bar, and add it in the middle of the screen, which is how I want my indexing to be, not the old boring start menu one. Maybe, it will also have feature to completely index the whole partition. And please, don't link it to search engine. Don't mess this up, like you did it to the start menu search. Just add a "Search on web" button to redirect to the browser.

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Issue 1:
Awesome effort guys. I have recently migrated from Mac OS. There is feature of 'Spotlight Search' in Mac which helps to search a particular file or anything. It also helps to find word meanings.

This helped me a lot as I could find meanings clicking few buttons.

I would request to add that feature (dictionary search) in Powertools under PowerToys Run command.

Issue 2:
Environment

Windows build number: 10.0.18362.449
PowerToys version: 0.13.0
PowerToy module for which you are reporting the bug (if applicable): PowerRename

Steps to reproduce

Create reparse points, e.g. duplicate a folder with some files in OneDrive, right click the folder and choose "Free up space". OneDrive will change the local files to reparse points. Mark the files, right click them. The context menu does not show PowerRenamer (but it does show the standard "Rename" which works, albeit only for a single file, as usual).

Expected behavior

PowerRenamer should show up in the context menu and work on the reparse point(s).

Actual behavior

PowerRenamer does not show up (or work) with NTFS reparse points.

Screenshots
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.900]
PowerToys version: v0.19.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Try to attach a window to a FancyZone that borders the Windows Taskbar and the window is resized behind the taskbar.

Noticed this happening after PowerToys update when Windows Explorer had to restart and also after Sleep/Hibernation.

Expected behavior

Windows don't go behind the taskbar

Actual behavior

Windows do go behind the taskbar

Screenshots

Issue 2:
Environment

Windows build number: 10.0.18363.900
PowerToys version: 0.19.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones
Monitor(s): 2 side-by-side 4K monitors (one set to display scaling 100% and the other to 125%)

Steps to reproduce

Set Windows taskbar location to Top

Snap a window to a FancyZone (2 priority grid zones in my case)

Expected behavior

The window should snap to the full-height of the FancyZone below the task bar

Actual behavior

The window snaps behind the task bar (as shown with the green arrows)

The window leaves a gap underneath each window (as shown with the red arrows), which exposes the desktop background underneath

Screenshots
Issue 1:
Hi! Is there any way to generate tests dynamically? Like in mocha:

https://mochajs.org/#dynamically-generating-tests

For example:

test.describe.serial('Dynamic tests', () => {
const asyncData = test.preloadData()

test('Check testData', () => {
ok(asyncData?.length)
})

asyncData.forEach(item => {

test(`Test for ${item}`, async () => {
....
})
})
})

Issue 2:
You can already do each via running test in a loop:

for (const data in [...]) {
test('testing ' + data, async () => {});
}

If the above does not work for you, please tell us why in the comments!