WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report

Bug summary

Playback of mp4 files written by FFMpegWriter shows a rolling image if the dpi setting does not match that specified when a figure is created. In particular, this happens if the movie frame images are being displayed on the screen, e.g. during creation of the movie. (There is also an annoying flicker.)

Code for reproduction

Animation in the code below fails, resulting in a rolling image on playback of the saved mp4 movie. Either of two modifications indicated in the comments make the saved movie play back normally.

import matplotlib.animation
import numpy
import pylab

fig = pylab.figure(figsize=(6,6), dpi=120)
writer = matplotlib.animation.FFMpegWriter(fps=10)
x = numpy.linspace(0, 6.28, 100)

with writer.saving(fig, 'rolling_bug.mp4', dpi=100): # saving OK if dpi=120
for offset in numpy.linspace(0, 6.28, 30):
pylab.plot(numpy.cos(x-offset), color='black')
# saving OK if the next line is commented out
pylab.pause(0.01)
writer.grab_frame()

Note that commenting out the pylab.pause() call results in no image being displayed on the screen until the end of the script.

Actual outcome

Inspection of the figure vertical dimension in pixels shows that it has changed across the call to grab_frame(), from 600 to 590 in the above example. The horizontal dimension does not change.

A screen grab from VLC Media Player is shown here:

Expected outcome

The writer.grab_frame() should not change the vertical dimension of the figure.

The flickering did not occur in the last version of Matplotlib I had installed, but I do not know what version that was. I'm pretty sure the vertical image dimension also stayed constant across the grab_frame() call, since this was (abstracted from) working code from about a year ago.

Version info

Windows 8.1

Matplotlib 2.0.2

Python 3.6.1

Anaconda 4.4.0

Installed from conda

Issue 2:
Bug report

Bug summary

The print_figure function in the FigureCanvasBase class records the current figure's dpi, sets it to the requested dpi for the saved figure, and then resets it to the original. Setting the dpi invokes a property function, _set_dpi that calls the figure's set_size_inches method, which then triggers a resize of the figure manager.

This resize is not evident when I use the standard Pyplot commands within a Qt console, presumably because the plot size doesn't change. However, I have embedded the Matplotlib figure in a PyQt GUI where I don't have the toolbar in the same widget, and it causes a noticeable size change for a fraction of a second before the second dpi reset restores the old size.

Possible solution

I would like to suggest that the FigureCanvasBase print_figure function should not invoke the dpi property, but set and then reset the figure's hidden variable, _dpi, which will not trigger the redundant canvas resize. I can submit a pull request, but I wanted to check if there would be side effects.

Matplotlib version

Matplotlib Version: 2.0.2

Operating System: Mac OS 10.12.5

Python Version: 2.7.11

PyQt 4.8.7
Issue 1:
In [8]: a = np.uint64(2)

In [9]: b = a + 1

In [10]: type(b)
Out[10]: numpy.float64

!

Issue 2:
Is this behavior expected?

>>> print type(np.uint32(0) + int(0))
<type 'numpy.int64'>
>>> print type(np.uint64(0) + int(0))
<type 'numpy.float64'>

The latter took me by surprise!
Issue 1:
I have compiled OpenCV 3.0.0 for python on Windows.

When I tried to run the code bellow I got this error message: "The data should normally be NULL!"

import numpy as np
import cv2

img1 = cv2.imread('C:\\Users\\soboh\\Documents\\pcb.jpg',0) # queryImage
img2 = cv2.imread('C:\\Users\\soboh\\Documents\\pcb.jpg',0) # trainImage

sift = cv2.xfeatures2d.SURF_create()

kp1, des1 = sift.detectAndCompute(img1,None)
kp2, des2 = sift.detectAndCompute(img2,None)

FLANN_INDEX_KDTREE = 0
index_params = dict(algorithm = FLANN_INDEX_KDTREE, trees = 5)
search_params = dict(checks=50) # or pass empty dictionary

flann = cv2.FlannBasedMatcher(index_params,search_params)

matches = flann.knnMatch(des1,des2,k=2)

The error happens when calling the function flann.knnMatch(). The full error message is:

"cv2.error: cv2.cpp:161: error: (-215) The data should normally be NULL! in function allocate"

So I have opened the file cv2.cpp and looked at line 161 and found these lines of code:

if( data != 0 )
{
CV_Error(Error::StsAssert, "The data should normally be NULL!");
// probably this is safe to do in such extreme case
return stdAllocator->allocate(dims0, sizes, type, data, step, flags, usageFlags);
}

so I have put the line that starts with "CV_Error" in a comment and compiled again the OpenCV and tried to run the same code and everything worked fine, but I am not sure that what I did is ok!!! Any help?

Issue 2:
The following code returns an error.

sift = x2d.SIFT_create(1000)
features_l, des_l = sift.detectAndCompute(im_l, None)
features_r, des_r = sift.detectAndCompute(im_r, None)

FLANN_INDEX_KDTREE = 1
index_params = dict(algorithm=FLANN_INDEX_KDTREE, trees=5)
search_params = dict(checks=50)
flann = cv2.FlannBasedMatcher(index_params,search_params)

The error returned:

opencv/modules/python/src2/cv2.cpp:161: error: (-215) The data should normally be NULL! in function allocate

I tried this with Python 2.7.

FLANN_INDEX_KDTREE is set to 1 unlike here,

since in modules/flann/include/opencv2/flann/defines.h I found it set to 1 on line 84.
Issue 1:
When editing the profiles.json settings file, it is currently not possible to specify more than one defaultProfile. As a result, it is not possible to have the Terminal automatically start up with more than one tab. It would be extremely convenient, to be able to specify the 3 or 4 most commonly used command-line environments to all open up in separate tabs every time Terminal is started. This would e.g. give users the ability to always open up a Command Prompt, PowerShell, and Ubuntu shell all at the same time.

Issue 2:
Being in windows it makes no sense to not being able to set font size, face type, font and background colors, pointer size and form, etc... just from JSON. It's unnecessarily annoying. That should be possible to be done from a window UI though translated automatically to JSON.
Issue 1:
@code_native appears to be a little broken on LLVM 3.7. The labels are all printed at the very beginning, which is not very helpful to figure out the control flow.....

julia> function f(a)
s = zero(eltype(a))
@inbounds for i in 1:length(a)
s += a[i]
end
s
end
f (generic function with 1 method)

julia> @code_native f(Int[])
L16:L29: .text
movq 8(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
jle L29
movq (%rdi), %rdx
xorl %eax, %eax
addq (%rdx), %rax
addq $8, %rdx
addq $-1, %rcx
jne L16
retq
nop
pushq %rax
movq (%rsi), %rdi
movabsq $f, %rax
callq *%rax
movabsq $jl_box_int64, %rcx
movq %rax, %rdi
callq *%rcx
popq %rdx
retq

@vtjnash I remember you have a PR about code_native?

Also @Keno

Edit: add missing **not**

Issue 2:
ref b2e69d0#commitcomment-12053593 and https://github.com/JuliaLang/julia/pull/11852/files#r34115071
Issue 1:
Module loaders like systemjs expect module paths to point to a valid file path, including the .js extension. Although exploringjs says the extension might not be needed, the module loader spec's default behaviour has not yet been decided upon. So for code to have the widest possible support it would be good to have an option to tell the compiler to add the extension.

Issue 2:
Currently, TS can't find modules when you use a file extension in the import name (import {Foo} from './foo.ts';) - SystemJS updated and file extensions are now required (though the spec issue is still under discussion) on imports (without setting some legacy settings in System.config). So when compiling with --module, you can either have a functioning typechecker (no extensions on your imports) or a functioning runtime (.js on your imports, since your result files have .js extensions). This is complicated further by systemjs's bundler, which looks for dependent files before TS transpiles them, so you have to use .ts extensions on your imports so the bundler can resolve the paths to real ones.

This extension madness is all incredibly awkward to work with, and I'm not sure if this needs module resolution logic updating on our part, arguing for old behavior on the loader spec, or talking to systemjs and having them change how they're finding modules ignoring the spec.
Issue 1:
Migrated issue, originally created by Anonymous

it is a PITA to get a function index to work right using sqlalchemy.

for those that aren't familiar... postgres , oracle and a few other dbs all allow for indexes to be created as a function

the idiomatic example is:

create unique index user_email_address_uidx on user(lower(email_address));

which allows for case-sensitive storing of the email address, and creates a lower version to speed searching and preserve uniqueness

the planners automagically use the index on queries like:

select * from user where lower(email_address) = %s

i'm not sure what a long-term solution would be, but in the short term... for the two most common operations, my suggestion is to add two new operators to sql.compiler

operators.lower_eq : lambda x, y: "lower(%s) = lower(%s)" % (x, y),

operators.upper_eq : lambda x, y: "upper(%s) = upper(%s)" % (x, y),

this should work too :

operators.lower_eq : lambda x, y: "lower(%s) = %s" % (x),

operators.upper_eq : lambda x, y: "upper(%s) = %s" % (x),

Issue 2:
Migrated issue, originally created by Anonymous

The following query:

list(session.query(Employee, Employee.company))

unexpectedly returns 5-element tuples

[e1, 1, u'e1', u'employee', 1),
(Employee e2, 2, u'e2', u'employee', 1),
(Employee e3, 3, u'e3', u'employee', 2)]((Employee)

IMHO no one expects such a result.

Full test case attached.

Attachments: sqlalchemy-bug-query_Employee_company.py | interpret-relations-as-query-entities.patch
Issue 1:
As Kubernetes moves to support more multi-tenant use cases and to increase security in general, it would be helpful if there was a way to firewall pods from other pods, ideally using something simple like labels.

Is there a preferred approach to support this use case? If this is implemented via dynamic iptables rules, I assume it would need to be part of the pod definition and kubelet rather than an external firewall service? Or perhaps there are lessons learned at Google regarding how to best isolate applications?

Somewhat related #2585.

Issue 2:
I'd like to update a replication controller's name using kubectl, but am unable to do so.

Basically, I want to mimic the rolling-update command where it creates a temporary rc name and then renames it.

There are the steps I'd like to take:

kubectl rolling-update app app-tmp -f app-rc.json
kubectl patch rc app-tmp -p '{ "metadata": { "name": "app" } }'

And the error I am getting:

Error from server: the name of the object (app) does not match the name on the URL (app-tmp)
Issue 1:
For example, pressing Alt+F should open File menu, then press -> to move to Edit menu.

On Windows 7/8, this does not work after the main editor is focused, except for the welcome page.

On Ubuntu Linux (Unity), the menu bar can be activated normally by keyboard.

Atom version: 0.201

Issue 2:
The normal Windows Alt+{letter} menu shortcuts don't work in Atom. Holding Alt highlights the relevant letter in each menu name, but then pressing the letter doesn't open the menu. For example, Alt+F should open the File menu, but instead the Key Binding Resolver shows it invoking the following:

editor:move-to-end-of-word atom-text-editor resources\app\keymaps\emacs.json

This is a vanilla install of Atom 0.141.0 in Windows 7 Home Premium x64. I haven't opted in to enabling anything Emacs related.

Pressing Alt also doesn't focus the menu bar and allow it to be navigated by arrow keys like it normally does in Windows.

I'm reporting this per this suggestion
Issue 1:
I am not sure if the title is clear enough. The reason for this issue for me is the spatial plugin for neo4j (https://github.com/neo4j/spatial). If you want to use neo4j with the spatial plugin completly via cypher and the rest api over http, it is not possible to configure an autoindex which takes care of adding node with 'lat' and 'lon' properties to the correct index. Without adding the nodes to the correct index they will be not found when using cypher with a withinDistance query. So after each CREATE cypher query on would have to make an additional call to the REST API.

See here for a complete example / list of actions: https://gist.github.com/thomasfr/8103037

There is also a related issue on the spatial plugin: neo4j-contrib/spatial#125

Is it possible to add more than one auto indexing configuration, with the possibility to define the index type for different node "types", to the neo4.properties file? A node type could be identified via their labels or simply when the node has the configured properties in node_keys_indexable.

cheers

Issue 2:
Using neo 2.0.1, the query:

match (n:States)
where n.name =~ '.*rul.*'
return n.name order by n.name desc
limit 200

returns result after 14 secs. Number of n:States nodes is about 450 000, number of nodes fullfilling the condition is about 130 000 and count with the same condition returns in 1 sec. There is index on :States(name).

Profiling returns

ColumnFilter(symKeys=["n", "n.name"], returnItemNames=["n.name"], _rows=200, _db_hits=0)
Top(orderBy=["SortItem(Cached(n.name of type Any),false)"], limit="Literal(200)", _rows=200, _db_hits=0)
Extract(symKeys=["n"], exprKeys=["n.name"], _rows=131072, _db_hits=131072)
Filter(pred="LiteralRegularExpression(Property(n,name(1)),Literal(.*rul.*))", _rows=131072, _db_hits=458752)
NodeByLabel(label="States", identifier="n", _rows=458752, _db_hits=0)

Now, this type of match is very common to all applications - table with filter and ordering, so performance is important.

This query probably doesn't use the index (because of the condition) but it should because of the order by.

When running this type of query in MSSQL, server works as follows:

Using index scan in descending order goes over every value and evaluates the condition. When number of items fulfilling the condition reaches 200 the work is done and result is returned. In many cases this happens in very short time (enough of items fulfilling the condition is found at the end of indexed items)

In Neo4j with cypher, server probably sorts all items fulfilling the condition and then returns the 200 from the begining.

Is there some plan to optimize this type of queries?

Thanx and sorry, I'm new to Neo and GitHub :)
Issue 1:
I have not thought it out, but there was a (now cleared out) issue about np.nditer not allowing to access the it.operands after the with statement is finished. For return operands, accessing it only after finishing everything doesn't seem unreasonable though.

EDIT: Example code:

import numpy as np

def foo(a):
it = np.nditer([a, None])
with it:
for x,y in it:
y[...] = x * x
return it.operands[1]
b = np.arange(2)
print(foo(b))

is not currently valid.

Issue 2:
See some discussion in #10951.

The issue is that the nditer operands attribute does not always refer to the actual operand array, but rather to the temporary buffer/copy of the operand array, despite what the nditer docstring says.

This is a problem for code like:

>>> def square(a):
... with np.nditer([a, None]) as it:
... for x, y in it:
... y[...] = x*x
... return it.operands[1]

since the returned value could in principle be a temporary buffer, rather than the newly created 'out' array. In practice, this hasn't been a problem because the out arrays are never buffered, I think.

Because of our recent improvements to the nditer as a context manager, and #10951, there is a second problem that the operands cannot be accessed once the iterator context is exited. For instance, this means the return statement above can't currently be placed outside the with statement, even though in principle that is where it should go because the operand is only "written back to" at context exit.
Issue 1:
System info

Playwright Version: [v1.36.1]

Operating System: [Windows container on GitLab.]

Browser: [Chrome, Chromium]

Other info:

After upgrading to v1.36.1 I ran the Playwright job in GitLab and I got some error messages and Playwright tests don't run .The errors displayed after running npx playwright install --with-deps and npx playwright install chrome

Failed to install browsers

Error: Failed to download Chromium 115.0.5790.75 (playwright build v1071), caused by

Error: Download failure, C:\Users\ContainerAdministrator\AppData\Local\ms-playwright\chromium-1071\INSTALLATION_COMPLETE does not exist

and

Failed to install browsers

Error: Failed to download FFMPEG playwright build v1009, caused by

Error: Download failure, C:\Users\ContainerAdministrator\AppData\Local\ms-playwright\ffmpeg-1009\INSTALLATION_COMPLETE

does not exist.

Currently we are using 1.34.3 and I think it also worked on 1.35 when I tried to upgrade after the last version was out

I noticed that there is a FFMPEG message so I also tried npx playwright install ffmpeg but got the same error

Issue 2:
System info

Playwright Version: 1.30.0

Operating System: windows 10

Browser: chromium

Source code

I provided exact source code that allows reproducing the issue locally.

Config file

// playwright.config.ts
export default {}

Test file (self-contained)

test('asdf', async ({ context, page }) => {
await page.setContent(
"<button onclick=\"window.open('https://www.google.com', '_blank')\">asdf</button>",
)
await context.route(/\/asdf/u, () => {})
const newPagePromise = context.waitForEvent('page')
await page.click('button')
await newPagePromise
})

Steps

enable "Show browser" in the playwright extension options on vscode's "Testing" tab

click the gutter run button next to the test

Expected

test passes

Actual

"Browser has been closed" error

this only occurs when running the test through the vscode extension with "Show browser" enabled. the test passes when disabling "Show browser" or when running the test with the playwright test command
Issue 1:
By following the Templates section on Best Practices book, I should have the following code in my controller:

public function indexAction()
{
return $this->render('default/index.html.twig');
}

This throw the following exception:

Template name "default/index.html.twig" is not valid (format is "bundle:section:template.format.engine").

I'm using "symfony/symfony": "2.6.*".

I think the template path validator should be reviewed, isn't it ?

Thanks.

Issue 2:
Hello,

I have update to 2.1.5... and now in all my translated site i heve this error:

An exception has been thrown during the rendering of a template ("[ERROR 94] Validation failed: no DTD found ! (in n/a - line 2, column 21)

[ERROR 1877] Element '{urn:oasis:names:tc:xliff:document:1.2}trans-unit': Duplicate key-sequence ['19'] in key identity-constraint '{urn:oasis:names:tc:xliff:document:1.2}K_unit_id'.

Everything worked fine until now....

Along also an example of a file which use xliff:

<?xml version="1.0" encoding="UTF-8" ?> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file source-language="en" datatype="plaintext" original="file.ext"> <body> <trans-unit id="1"> <source>Gallery</source> <target>Galeria</target> </trans-unit> <trans-unit id="2"> <source>Mustamp</source> <target>Mustamp</target> </trans-unit> <trans-unit id="3"> <source>Highlights</source> <target>Destaques</target> </trans-unit> <trans-unit id="4"> <source>HIGHLIGHTS</source> <target>DESTAQUES</target> </trans-unit> </body> </file> </xliff>

Probably'm doing something wrong, can you help me?

Thanks in advance,

Paulo
Issue 1:
Summary of the new feature/enhancement

I want to extend my keyboard layout to allow entering specific Unicode characters that are not accessible via the plain keyboard layout. Specifically, as a German speaker who spends 99% of the time coding and 1% writing short emails or chat notices in German, I want to extend a US layout to allow easy access to German umlauts without having to change the layout:

AltGr+A -> "ä"

AltGr+U -> "ü"

AltGr+s -> "ß"

and so on.

Keyboard manager only allows remapping keys to other keys or shortcuts to other existing shortcuts. What is missing is a way to remap shortcuts to characters that are not yet accessible via the layout.

Proposed technical implementation details (optional)

"Remap shortcuts" could allow multiple alternative targets. One of them could allow entering (or pasting) an arbitrary unicode string.

Issue 2:
FancyZone Editor v2

Current list of like-to-have improvements

Improved Multi-monitor awareness and editing

Easier renaming

Better initial screen. Currently it is all about creating versus what i have done in the past. This would allow for easier hot swapping of layouts. One unified screen showing predefined templates and custom layouts.

Zone numbering (zones overlays need numbering as well for snapping)

Support for dark mode and high contrast. (#326)

Default space around zones value is the last value used

Fine control for size zone adjustment (x/y, z-index, height / width)

Straight forward way to add / delete splitters (#581, #750)

Have different setups for different configurations (#177) (at work vs home)

Disable layouts that don't fit the screen orientation (landscape vs portrait) or don't have the same screen ratio

A single, holistic way for customizing layout. (hinted in #582)

I can edit a base template where it only splits but a custom only does custom size windows

even a "custom" base only does split

Things to think about:

Possibly think about 'magnetic / dock sides'

Percentages versus hard numbers. This will allow me to move a custom layout instantly to a different resolution monitor

how a zone can cross monitor boundaries

FAR from done / perfect but doing a first stab at a spec.

https://github.com/microsoft/PowerToys/blob/dev/crutkas/FzEditor2Spec/doc/specs/FancyZoneEditorV2.md
Issue 1:
Hi,

Is there a way to run batches with QuestionAnsweringPipeline rather than just one example?

Thanks.

Issue 2:
🖥 Benchmarking transformers

Benchmark

I'm trying to benchmark QA model with bert-large-uncased-whole-word-masking-finetuned-squad. But it seems it is extremely slow e.g. 3-4 sec for 1 question with 2 contexts.

I feel there is something I'm missing in pipeline.

Sample Code:

def answer(self, contexts:List[str], question:str, **kwargs):
## tokenizer, model, pipeline all are cached in actual implementation
## via [reify](https://docs.pylonsproject.org/projects/pyramid/en/latest/api/decorator.html)
## so model loading is not a problem.
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', max_len=500)
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-
finetuned-squad')
pipeline('question-answering', model=model, tokenizer=tokenizer)
pipeline_input = []
for c in contexts:
pipeline_input.append({
'question' : question,
'context' : c
})
answers = pipeline(pipeline_input)

Set-up

CPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz

memory: 16GB