WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I tried using the latest xxxx/xxxx.d.ts file in this repo and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

I want to talk about knex/knex.d.ts.

The authors of that type definition are cc/ @tkqubo

It looks like the knex.d.ts definition file declares a dependency on bluebird 2.0 typings. The current version of knex.js relies in the 3.x branch of bluebird. Using bluebird (3.0) at the top level and knex in the same project results in error TS2300 Duplicate identifier 'export=' errors, as the type system seems to be looking at both types/bluebird (for 3.0) and types/knex/node_modules/types/bluebird (for 2.0). Manually modifying the package.json and types/knex directories in my node_modules directory clear this problem up.

Issue 2:
d3/d3.d.ts /cc @gustavderdrache @borisyankov

d3.js got a major overhaul. Its API has improved considerably. See d3 v4 changes. I'm quite excited about it, but for the time being I have to stay with v3 or abandon TypeScript for a critical class.

Fascinating article by @mbostock discussing examples of poor d3.js API pre-v4 and the rationale behind v4's API: What Makes Software Good - well worth the read no matter what walk of programming you come from.

Edit: hang on- I just saw https://github.com/tomwanzek/d3-v4-definitelytyped so perhaps @tomwanzek is already taking care of this?
Issue 1:
System info

Playwright Version: 1.33.0

Operating System: macOs 13.1

Browser: Chromium

Other info:

Source code

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

I have a basic bootstrap 'switch' toggle element that is not 'checkable' using PW. It looks like this when it renders and comes out of a CustomInput provided by react-strap which uses Bootstrap4

The underlying HTML for it ends up being this

<input type="checkbox" id="foo" name="someName" class="custom-control-input">

I have tried the following below but PW times out after trying for 50 times to check the toggle

await page.locator('#foo').setChecked(true)
await page.locator('#foo').check()
await page.locator('#foo').click()

If I change the toggle to become not a switch but a regular checkbox, then the HTML changes to

<input id="foo" name="someName" label="My Label" type="checkbox" class="form-check-input">

Then PW has no problem checking the checkbox.

Is it possible to also use PW to 'check' toggle elements (that are just checkboxes under the hood) or is that not supported?

Issue 2:
System info

Playwright Version: 1.32

Operating System: Mac

Browser: [All, Chromium, Firefox, WebKit]

Other info:

Source code

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

test('checkboxes should be nicer in light mode when system is set to dark', async ({ page }) => {

await page.setContent(<input id='checkbox' type='checkbox'></input>);

await page.getByRole('checkbox').check();

await expect(page.getByRole('checkbox')).toBeChecked();

});

Steps

set system to dark mode

Open UI mode

Toggle light and dark mode

Expected

check boxes should not be dark when in light mode

Actual
Issue 1:
I built the libcaffe2.a for android as the guide[./scripts/build_android.sh]. The build is success, but I find that the library is too large[800MB+]. The library file in Android Demo(such as AICamera-Style-Transfer & AICamera) is small[Only 60MB]. Is there a way to reduce the file size? How to config?

Issue 2:
🚀 Feature

Currently there are a number of tensor properties which we bind in python which are not shared with the JIT / C++ api.

Some of these have been duplicated in JIT, but many are not supported.

Either:

Develop a test mechanism to keep them in sync

Figure out a way to share properties via native declaration

Native declaration would likely be a two-step process:

add properties to JIT type system (or other solution)

figure out codegen

The following properties are currently bound, many of which will throw if they are used in a scripted function.

{"T", (getter)THPVariable_get_T, nullptr, nullptr, nullptr},
{"_cdata", (getter)THPVariable_get_cdata, nullptr, nullptr, nullptr},
{"_version", (getter)THPVariable_get_version, nullptr, nullptr, nullptr},
{"grad_fn", (getter)THPVariable_get_grad_fn, nullptr, nullptr, nullptr},
{"_grad_fn", (getter)THPVariable_get_grad_fn, (setter)THPVariable_set_grad_fn, nullptr, nullptr},
{"is_leaf", (getter)THPVariable_is_leaf, nullptr, nullptr, nullptr},
{"data", (getter)THPVariable_get_data, (setter)THPVariable_set_data, nullptr, nullptr},
{"_grad", (getter)THPVariable_get_grad, (setter)THPVariable_set_grad, nullptr, nullptr}, // only for legacy reasons
{"grad", (getter)THPVariable_get_grad, (setter)THPVariable_set_grad, nullptr, nullptr},
{"_base", (getter)THPVariable_get_base, nullptr, nullptr, nullptr},
{"volatile", (getter)THPVariable_get_volatile, (setter)THPVariable_set_volatile, nullptr, nullptr},
{"output_nr", (getter)THPVariable_get_output_nr, nullptr, nullptr, nullptr},
{"requires_grad", (getter)THPVariable_get_requires_grad, (setter)THPVariable_set_requires_grad, nullptr, nullptr},
{"_backward_hooks", (getter)THPVariable_get_backwards_hooks, (setter)THPVariable_set_backwards_hooks, nullptr, nullptr},
{"name", (getter)THPVariable_get_name, nullptr, nullptr, nullptr},
{"shape", (getter)THPVariable_get_shape, nullptr, nullptr, nullptr},
{"is_cuda", (getter)THPVariable_is_cuda, nullptr, nullptr, nullptr},
{"is_sparse", (getter)THPVariable_is_sparse, nullptr, nullptr, nullptr},
{"is_mkldnn", (getter)THPVariable_is_mkldnn, nullptr, nullptr, nullptr},
{"is_quantized", (getter)THPVariable_is_quantized, nullptr, nullptr, nullptr},
{"dtype", (getter)THPVariable_dtype, nullptr, nullptr, nullptr},
{"layout", (getter)THPVariable_layout, nullptr, nullptr, nullptr},
{"device", (getter)THPVariable_device, nullptr, nullptr, nullptr},
{"ndim", (getter)THPVariable_get_ndim, nullptr, nullptr, nullptr},
Issue 1:
In this program

http://play.golang.org/p/NTlW5mD8qX

the constant 1e-779137 underflows silently to 0 (while this is not well defined in the
spec, it is not unexpected).

But the constant 1e-779138 leads to a compile-time error:

http://play.golang.org/p/LxjbNujhmO

Both exponents are well past the range of values representable by float64.

If floating-point constants silently underflow to 0 when materialized, they should
always do that.

Issue 2:
by szabo.antal.92:

What steps will reproduce the problem?
Run an executable in go (with anything that at the end uses syscall.StartProcess)
without setting any input/output redirection

What is the expected output?
The program executes the other one, without creating any pipes

What do you see instead?
The program executes the other program, but creates pipe(s) for its input/output

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Windows

Which revision are you using? (hg identify)
weekly.2011-09-21

Please provide any additional information below.

You can reproduce this by compiling https://github.com/nsf/gocode, then when you run the
tests, it hangs, because of the open pipes of the server.

It is easy to fix, if you want, I can write a patch.
Issue 1:
Symfony\Component\Process

I'm getting this error after running a process for a long time

A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable

Seems to be the windows workaround in getDescriptors()

I found the problem to be 65,000 temp files created by this file in my windows temp but not removed. I have to clear these out daily.

PHP should remove the files but they slowly build up.

Issue 2:
On Windows Process::start creates a temporary file every time because of this code:

if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->fileHandles = array(
self::STDOUT => tmpfile(),
);

When being invoked for thousands of times as part of task scheduling pipeline, it leaves thousands of temporary files and eventually hits the limit at 65536 files per directory, after which point it can't create a new temporary file and simply dies.

After being used, the temporary file should be deleted.
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]

Windows Terminal version (if applicable): 0.2.1715.0

Steps to reproduce

Open up a new powershell or cmd window and try to enter a @ with a German layout keyboard. I tried to type the @ char with ctrl + alt + q and I did try it with AltGr + q in both cases the behavior is identical.

Seems like the problem is present with the backslash '' as well on a German keyboard you need to either use ctrl + alt + ß or AltGr + ß to get the char in any other application.

Since I can ctrl + c my command the alt key should be the problem or the combination.

It is possibly to copy the char if you type it into the editor and paste it with a click of the right mouse button. This is a workaround for the moment.

Expected behavior

The correct char is getting displayed

Actual behavior

In the powershell no char will be shown

in the command line the letter q or ß is getting displayed

Issue 2:
Description of the new feature/enhancement

Proposed technical implementation details (optional)

Hello, Windows Terminal doesn't support the new cross-platform PowerShell.

Please add below feature:

Support the new cross-platform PowerShell
Issue 1:
I have following config in package.json:

...
"babel": {
"optional": [
"runtime"
]
},
...

which should add Promise and other classes. If I understand it correctly, it should also shim Array.protoype functions.

Unfortunatelly, it does not work:

console.log(Promise) // Object
console.log(Array.prototype.find) // undefined
console.log(Array.find)) // Object

Why Array.prototype.find is undefined. Is there something what I missed? Thank you.

Issue 2:
When I call [].find() using babel-node it works, but it doesn't work in the runtime because it doesn't proxy find to core-js. Suggestion: use _core.Array.find, but this may be difficult. This probably belongs to a bigger class of problems regarding ES6 built-in prototype extensions. Easy way is to just polyfill it. Any ideas?
Issue 1:
Since this most recent update VSCode seems to crash randomly when editing files (particularly PHP files for me). Everything will pause (besides the menus) and just sit there until it asks me to wait or close the program.

Issue 2:
I really liked the auto indentation discovery mechanism and not having it sometimes screws the indentation of files that have only tabs.

It would be cool to have a status bar widget that tells me which mode I am on. Even cooler would be to bring back the auto detection as a default and use the widget to communicate its detection.

Clicking it would bring quick open with a picker to switch modes.
Issue 1:
I have 3 monitors, the two outer monitors are identical. See the below screenshot from nvidia control panel.

When configuring Fancy Zones, if I set up a zone on the left monitor, It will also be set to the right monitor. If I open a program, and snap it to a zone on the right monitor, close it down, then reopen it, It will open up on the equivalent zone on the left monitor. It's as if Fancy Zones is only able to 'see' one of the two monitors. I can only assume this is because its using the monitor name as the identifier or something.

Let me know if you need any more information.

Issue 2:
Environment

Windows build number: [Version 10.0.18362.387]
PowerToys version: 0.12.0.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

I have 2 custom layouts. One for the left monitor, one for the right.

I move the mouse to the left monitor and press [WIN] ~

I choose Custom, and the left layout option.

I click Apply

I move the mouse to the right monitor and press [WIN] ~

I choose Custom, and the right layout option.

I click Apply.

The right monitor layout is applied to all monitors. I have tried also just moving the settings window before hitting apply but that doesn't work either.

I can also use the main settings window, drag to the monitor, change the layout, and the same behavior happens, both monitors are updated.

Expected behavior

Expected to be able to have a separate layout on different monitors.

Actual behavior

Identical layout applied to all monitors.

Screenshots
Issue 1:
from SO

the .add_categories should be able to take an Index/ndarray, ATM it must be converted to a list

should be a keyword for something like: add any additional categories that I am passing to you (even if the current ones are duplicates, just add these to the end). e.g.

In [147]: s = pd.Categorical(list('aabbcd'))

In [148]: s2 = list('aabbcdefg')

In [149]: s
Out[149]:
[a, a, b, b, c, d]
Categories (4, object): [a, b, c, d]

In [150]: s.add_categories(s.categories.sym_diff(Index(s2)).tolist())
Out[150]:
[a, a, b, b, c, d]
Categories (7, object): [a, b, c, d, e, f, g]

I would ideally just like to say:

s.add_categories(s2, take_new=True)

(maybe not the best keyword, but something like this)

Issue 2:
from the timeseries realease example: http://pandas.pydata.org/pandas-docs/version/0.19.0/whatsnew.html#merge-asof-for-asof-style-time-series-joining

making ticker as category:

trades.ticker = trades.ticker.astype('category')
quotes.ticker = quotes.ticker.astype('category')

merge = pd.merge_asof(trades, quotes,
on='time',
by='ticker')

Expected Output

merge.dtypes

Out[31]:

time datetime64[ns]

ticker category

price float64

quantity int64

bid float64

ask float64

geting :

time datetime64[ns]

ticker object

price float64

quantity int64

bid float64

ask float64
Issue 1:
Consider the following data frame:

>>> df = pd.DataFrame(1.0, index=pd.MultiIndex.from_product([[0, 1], [0, 1]]), columns=['a'])
>>> df
a
0 0 1.0
1 1.0
1 0 1.0
1 1.0

Taking a slice of this and assigning it to itself should leave the data unchanged, but look what happens:

>>> df.loc[(0,), :] = df.loc[(0,), :]
>>> df
a
0 0 NaN
1 NaN
1 0 1.0
1 1.0

I'm on pandas version 0.20.1

Issue 2:
Best shown with an example.

import numpy as np, pandas as pd
timestamps = map(pd.Timestamp, ['2014-01-01', '2014-02-01'])
categories = ['A', 'B', 'C', 'D']
df = pd.DataFrame(index=pd.MultiIndex.from_product([timestamps, categories], names=['ts', 'cat']),
columns=['Col1', 'Col2'])

>>> df
Col1 Col2
ts cat
2014-01-01 A NaN NaN
B NaN NaN
C NaN NaN
D NaN NaN
2014-02-01 A NaN NaN
B NaN NaN
C NaN NaN
D NaN NaN

I want to set the values for all categories in a single month. These examples work just fine.

df.loc['2014-01-01', 'Col1'] = 5
df.loc['2014-01-01', 'Col2'] = [1,2,3,4]

>>> df
Col1 Col2
ts cat
2014-01-01 A 5 1
B 5 2
C 5 3
D 5 4
2014-02-01 A NaN NaN
B NaN NaN
C NaN NaN
D NaN NaN

These examples don't work.

df.loc['2014-01-01', 'Col1'] += 1
df.loc['2014-02-01', 'Col2'] = df.loc['2014-01-01', 'Col2']

>>> df
Col1 Col2
ts cat
2014-01-01 A NaN 1
B NaN 2
C NaN 3
D NaN 4
2014-02-01 A NaN NaN
B NaN NaN
C NaN NaN
D NaN NaN

It doesn't seem to be a "setting a value on a copy" issue. Instead, Pandas is writing the NaNs.

My current workaround is to unstack each column into a DataFrame with simple indexes. This works, but I have lots of columns to work with. One dataframe is much easier to work with than a pile of dataframes.

The computations for each month depend on the values computed in the previous month, hence why it can't be done fully vectorized on an entire column.
Issue 1:
XContentBuilder xContentBuilder = XContentFactory.contentBuilder(XContentType.JSON);
xContentBuilder.startObject();
xContentBuilder.rawField("foo", new BytesArray("{\"test\":\"value\"}"));
xContentBuilder.endObject();

results in the following string:

{,"foo":{"test":"value"}}

Issue 2:
I often use the XContentBuilder.rawField method to append my own JSON objects or arrays to the builder. Nonetheless, I found something quite annoying: a comma is always prepend when adding a new raw field, whatever it is the first field or not. The JsonXContentGenerator.writeRawField methods [1] seems to confirm that.

This leads to malformed JSONs, for instance:

@Test
public void rawFieldBug() throws IOException {
XContentBuilder factory = XContentFactory.jsonBuilder().startObject()
.rawField("myfield", "{}".getBytes())
.endObject();
String json = factory.string();
Assert.assertEquals("{\"myfield\":{}}", json);
// returns >{, "myfield" : {}}< instead
}

This bug was seen in the 0.90.RC2 elasticsearch version.

PS: In addition, a rawField(String fieldName, String content) (with potentially validation) might be very nice for such use cases :)

[1] Extracted form org.elasticsearch.common.xcontent.json.JsonXContentGenerator

@Override
public void writeRawField(String fieldName, byte[] content, OutputStream bos) throws IOException {
generator.writeRaw(", \""); // <= here?!
generator.writeRaw(fieldName);
generator.writeRaw("\" : ");
flush();
bos.write(content);
}
Issue 1:
I've noticed one common piece of code when I have to write a redirect:

return new RedirectResponse($this->router->generate('app.example', [...]));

What I would like to write is something similar to:

return new RoutedRedirectResponse('app.example', [...]);

The actual route would be generated at a later stage and use the default router.

Issue 2:
I run my app with Symfony 2.6. Whin I have a exception, this message is thrown.

PHP Fatal error: Cannot redeclare class Symfony\Component\Debug\Exception\FlattenException in /home/baptiste/Project/pole-gestion.fr/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php on line 25

I think that it's linked at the inclusion of FlattenException into Symfony\Component\HttpKernel\Exception\FlattenException which is deprecated.
Issue 1:
Like the layouts and pieces in Rails, I want a method to reuse the code. Currently the webview tag can only display a whole html page; hence I should always write duplicated html header tags and so on. Sharing on the global javascript objects among them directly (since they may in the same page it's redundant to have another scheme handle the sharing problem) could also save a lot of codes. Or is there any way to customize an html tag so that I can implement what I need.

Issue 2:
As I understand things the net module is supposed to follow the Node API as closely as possible, from net.md

The net module API has been specifically designed to mimic, as closely as possible, the familiar Node.js API. The API components including classes, methods, properties and event names are similar to those commonly used in Node.js.

The net module version of IncommingMessage, however, returns a different structure for its header collection than its Node counterpart. Where Node returns a simple object like { "Content-Type": "foo", ... } the net module returns an object where each value is an array containing any duplicate headers: { "Content-Type": [ "foo" ], ...}

So the net module returns duplicate headers as an array whereas Node will concat duplicate headers into a single string value (comma separated list) if the header is defined as a list in the HTTP specification.

From the Node docs

Duplicates in raw headers are handled in the following ways, depending on the header name:

Duplicates of age, authorization, content-length, content-type, etag, expires, from, host, if-modified-since, if-unmodified-since, last-modified, location, max-forwards, proxy-authorization, referer, retry-after, or user-agent are discarded.

set-cookie is always an array. Duplicates are added to the array.

For all other headers, the values are joined together with ', '.

Expected behavior

Duplicate HTTP response headers should be joined together if allowed by the HTTP specification or else discarded.

Actual behavior

Headers are returned in an array regardless of duplicates.

Proposed solution

Node has already solved this problem once, see _http_incoming.js#L134-L180. Although the method is exposed on the IncommingMessage prototype it's an undocumented method which is subject to change so using it directly is probably #dangerzone. Since the licenses of electron and node seem compatible I propose borrowing that code and adapting it for use in electron.

cc @kevinsawicki @joshaber @shiftkey
Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

ansible galaxy tags

ANSIBLE VERSION

ansible 2.2.1.0
config file =
configured module search path = Default w/o overrides

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

Lot of duplicate tags in ansible galaxy

fixing this issue will permit a better visibility of roles, less pages, easier to find a role.

STEPS TO REPRODUCE

Download all page of tags :

max=$(curl "https://galaxy.ansible.com/api/v1/tags/?page=1&format=json" | jq '.num_pages')
> /tmp/1.json
for i in $(seq 1 $max );do curl "https://galaxy.ansible.com/api/v1/tags/?page=${i}&format=json" >> /tmp/1.json; done

See few duplicates :

cat /tmp/1.json | jq -r '.results[].name' | grep -i raspberry
raspberry
raspberrypi
RaspberryPi
RaspberryPI

cat /tmp/1.son | jq -r '.results[].name' | grep -i ec2
ec2
EC2

EXPECTED RESULTS

cat /tmp/1.json | jq -r '.results[].name' | grep -i raspberry

raspberrypi

cat /tmp/1 | jq -r '.results[].name' | grep -i ec2

ec2

ACTUAL RESULTS

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

core

ANSIBLE VERSION

2.4.3.0

CONFIGURATION

OS / ENVIRONMENT

N/A

SUMMARY

It seems that ansible will always throw an warning if a host group is empty and there is no way to avoid getting this warning if the group is empty.

This goes even more verbose when list of groups is specified.

STEPS TO REPRODUCE

#!/usr/bin/env ansible-playbook -i hosts
---
- hosts: empty-group
tasks:
- debug: msg="foo"

With hosts:

localhost

[empty-group]

EXPECTED RESULTS

No warning.

ACTUAL RESULTS

[WARNING]: Could not match supplied host pattern, ignoring: empty-group

PLAY [empty-group] *******************************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************