WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Error with example in fs module.

error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:90:16

https://github.com/denoland/deno/blob/master/std/fs/README.md

import { emptyDir, emptyDirSync } from "https://deno.land/std/fs/mod.ts";

emptyDir("./foo"); // returns a promise
emptyDirSync("./foo"); // void

Issue 2:
I'm trying the following script and I get a few errors.

index.ts

import { exists } from "https://deno.land/std/fs/mod.ts";

const found = await exists('/folder');
console.log('Found:', found);

Error:

error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:90:16

error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:101:10

error TS2339: Property 'symlink' does not exist on type 'typeof Deno'.
await Deno.symlink(originSrcFilePath, dest, type);
~~~~~~~
at https://deno.land/std/fs/copy.ts:114:14

error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:119:16

error TS2339: Property 'symlinkSync' does not exist on type 'typeof Deno'.
Deno.symlinkSync(originSrcFilePath, dest, type);
~~~~~~~~~~~
at https://deno.land/std/fs/copy.ts:132:8

error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:137:10

error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:157:16

error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:185:10

error TS2339: Property 'link' does not exist on type 'typeof Deno'.
await Deno.link(src, dest);
~~~~
at https://deno.land/std/fs/ensure_link.ts:28:14

error TS2339: Property 'linkSync' does not exist on type 'typeof Deno'.
Deno.linkSync(src, dest);
~~~~~~~~
at https://deno.land/std/fs/ensure_link.ts:52:8

error TS2339: Property 'symlink' does not exist on type 'typeof Deno'.
await Deno.symlink(src, dest, srcFilePathType);
~~~~~~~
at https://deno.land/std/fs/ensure_symlink.ts:31:14

error TS2339: Property 'symlinkSync' does not exist on type 'typeof Deno'.
Deno.symlinkSync(src, dest, srcFilePathType);
~~~~~~~~~~~
at https://deno.land/std/fs/ensure_symlink.ts:58:8

Found 12 errors.

deno 1.0.0-rc1

v8 8.2.308

typescript 3.8.3
Issue 1:
query string does not return right hits when you use query with wildcard and it is tokenized. Example

"query_string": {

"query": "luka-por-si*",

"default_operator": "and",

"allow_leading_wildcard": false,

"analyze_wildcard": true,

"minimum_should_match": "100%",

"fields": [

"name"

],

"use_dis_max": false

}

query should return hits with luka AND por AND si_. On es version < 2.3 that works ok, now on version 2.3 and 2.3.1 query returns luka OR por OR si_. I attached files to reproduce this scenario.

Elasticsearch version:>=2.3

JVM version:8

OS version:any (tested on win and Linux ubuntu)

Steps to reproduce:

create index (createindexmapping.txt)

fill data (insertdata.txt)

get results (searchdata.txt)

createindexmapping.txt

insertdata.txt

searchdata.txt

Issue 2:
I started working on adding a score_mode parameter to the rescore query, something like :

{
"rescore" : {
"window_size" : 50,
"query" : {
"rescore_query" : {
"match" : {
"field1" : {
"query" : "the quick brown",
"type" : "phrase",
"slop" : 2
}
}
},
"query_weight" : 0.7,
"rescore_query_weight" : 1.2,
"score_mode" : "multiply"
}
}
}

Default is "total", possible values are : avg, max, min, total and multiply.

My use case is for the "multiply", because I want to do something like:

{
"query" : {
// lot of complex queries
// default scoring
},
"rescore" : {
"window_size" : 500,
"query" : {
"rescore_query" : {
"custom_score" : {
"query" : { "match_all" : { } },
"script" : "complex_scoring",
"lang" : "native"
}
},
"query_weight" : 1.0,
"rescore_query_weight" : 1.2
}
}
}

So rather than having to duplicate my complex query in the rescore query, I just multiply the first score with the second one.

What do you think? I will post my code.
Issue 1:
Currently there is no way to pull out the default settings unless you set them to something or unless you look at the source code. It would be nice to have an api endpoint for seeing all the settings as they are configured (default or not)

Issue 2:
We should provide an endpoint that dumps a map of all settings and their values.

% curl localhost:9200/_config
{
"cluster": {
"name": "elasticsearch"
},
"index": {
"number_of_shards": 1
},
"node": {
"data": true,
"master": true
},
"etc": "..."
}
Issue 1:
I noticed in 3.1 that .collapse.in breaks width for tbody

I believe tbody.collapse.in should be defined to display:table-row-group versus display:block.

Issue 2:
Since 3.1, I guess, bootstrap has a rule

.collapse.in {

display: block;

}

This rule conflicts with <tr> elements which require "display: table-row". And maybe others as well.

I haven't searched the sources where this rule is defined. Just using the download bootstrap-3.1.0-dist.zip and there it is defined in bootstrap.css line 2357.
Issue 1:
Since IE9 doesn't support CSS transitions, the carousel items aren't sliding in/out. Bit Twitter Bootstrap is supporting the two most recent versions, I would suggest to provide a fallback for the CSS3 transitions like https://github.com/barryvdh/bootstrap/commit/8b294f0c0184eb7111ef6da6046d4d1f33ea7ba3

Issue 2:
On my site and the document I try to test Carousel on IE(7-9) I didn't see transition work. I want it work the same FF, Chrome and Safari. Everyone have any idea?
Issue 1:
======================================================================
FAIL: sklearn.tests.test_multiclass.test_ovr_fit_predict
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose-1.2.1-py2.7.egg/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/erg/python/scikit-learn/sklearn/tests/test_multiclass.py", line 67, in test_ovr_fit_predict
assert_equal(np.mean(iris.target == pred), np.mean(iris.target == pred2))
AssertionError: 0.96666666666666667 != 0.97333333333333338

Issue 2:
failed while building for ubuntu 11.04 32bit:

======================================================================
FAIL: sklearn.tests.test_multiclass.test_ovr_fit_predict
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/nose/case.py", line 186, in runTest
self.test(*self.arg)
File "/tmp/buildd/scikit-learn-0.12.1/debian/python-sklearn/usr/lib/python2.7/dist-packages/sklearn/tests/test_multiclass.py", line 66, in test_ovr_fit_predict
assert_equal(np.mean(iris.target == pred), np.mean(iris.target == pred2))
AssertionError: 0.96666666666666667 != 0.97333333333333338
Issue 1:
Getting the following error:

Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `MainBar`.

MainBar is:

export class MainBar extends React.Component<any, any>{
render() {
return <AppBar title={<span>Title</span>}
/>
}
}

AppBar transpiles to:

var React = require('react');
var AppBar = require('material-ui/lib/app-bar');
var MainBar = (function (_super) {
__extends(MainBar, _super);
function MainBar() {
_super.apply(this, arguments);
}
MainBar.prototype.render = function () {
return React.createElement(AppBar, {"title": React.createElement("span", null, "Title")});
};
return MainBar;
})(React.Component);

So apparently AppBar is an object, not a class.

Any ideas?

Issue 2:
0.14.1 upgraded to babel 6, which introduced a breaking change for commonjs require(): https://phabricator.babeljs.io/T2212

The error is: Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of <SomeComponent>

Using a plugin such as this: https://www.npmjs.com/package/babel-plugin-add-module-exports might provide a solution to give users time to either added the necessary .default to require()s, or transition to ES6 style imports.
Issue 1:
Rustc gives a message that bytes!() is deprecated:

b.rs:1:33: 1:47 warning: `bytes!` is deprecated, use `b"foo"` literals instead
b.rs:1 fn main() { let x: [u8, ..3] = *bytes!("foo"); }
^~~~~~~~~~~~~~
b.rs:1:33: 1:47 help: see http://doc.rust-lang.org/reference.html#byte-and-byte-string-literals for documentation
b.rs:1 fn main() { let x: [u8, ..3] = *bytes!("foo"); }
^~~~~~~~~~~~~~
b.rs:1:33: 1:47 help: see https://github.com/rust-lang/rust/blob/master/src/etc/2014-06-rewrite-bytes-macros.py for an automated migration
b.rs:1 fn main() { let x: [u8, ..3] = *bytes!("foo"); }
^~~~~~~~~~~~~~
b.rs:1:17: 1:18 warning: unused variable: `x`, #[warn(unused_variables)] on by default
b.rs:1 fn main() { let x: [u8, ..3] = *bytes!("foo"); }
^

But the suggested replacement, as implemented by the python script, no longer compiles. Compiling the program resulting from applying the script's generated patch gives the error:

b.rs:1:32: 1:39 error: mismatched types: expected `[u8, ..3]`, found `[u8]` (expected array of 3 elements, found slice)
b.rs:1 fn main() { let x: [u8, ..3] = *b"foo"; }
^~~~~~~

The b"foo" syntax should not be suggested as a replacement for bytes!("foo") if it cannot fulfill the same roles. In particular, it seems odd to me that b"foo" syntax results in a less flexible type than bytes!("foo").

Note that [u8, ..n] can be converted to &[u8], which can be converted to the DST [u8]--but &[u8], which is what b"foo" produces, cannot be statically converted to [u8, ..n], so the change suggested by the deprecation warning results in loss of generality.

Issue 2:
Tracking issue for rust-lang/rfcs#339

Nominating for backcompat-lang
Issue 1:
by nicerobot:

A somewhat common and useful flag technique is:

./6.out -vvvv

where the same flag is specified multiple times. Such a mechanism seems impossible with
flag.go. It would be useful to provide an array version for flags. Maybe flag.Array,
flag.ArrayInt, flag.ArrayString, flag.ArrayVar, ...

Of course, the above example is a simplistic case and there are plenty of common
examples for allowing more complex duplicate flags to be specified. See rsync and find
for two very common uses.

Issue 2:
I need to gobind multiple packages for an app.

I considered running gomobile for each package and import multiple .so files, but that will fail due to various reasons:

gobind framework for java assumes a single 'gojni.so' file

duplicate code for go runtime in multiple .so files; conflicting symbols, storage, ...

Option 1:

gomobile bind -target=android -o=myapp.aar pkg1 pkg2 pkg3

The command will generate separate java classes for those packages, and gather all asset files under one asset directory. Conflicting package names and asset file names are error.

Problem of proposal 1

I was about to implement fix for #9660 and I don't know how it works with multiple packages.

Option 1.a

gomobile bind -target=android -o=myapp.aar -pkg=com.example.foo,org.example.bar,net.example.baz pkg pkg2 pkg3

Option 1.b

gomobile bind -target=android -o=myapp.aar pkg1:com.example.foo pkg2:org.example.bar pkg3 ...

Option 2:

gomobile bind -target=android -o=myapp.aar -list=something.json

Make gomobile take an input file of a certain format that lists all packages for gobind.

/* something.json */
{
Name: "pkg1",
Android: "com.example.foo",
IOS: "MyFoo"
}

Option 3:

Fake main package file - so when gomobile bind sees the 'main' package, it runs gobind on all the imported packages, and process the command that specifies the custom package name for java and prefix for obj-c.

gomobile bind -target=android -o myapp.aar myapp.go

/* myapp.go */
package main
import (
_ "pkg1" // android:com.example.foo ios:MyFoo
...
)
func main() {
}

/cc @crawshaw @rakyll
Issue 1:
For whatever reason, the latest canary with babel 7 isn't working well with styled jsx plugins via custom babelrc.

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

Expected Behavior

Expected to build the page and display in dev environment, instead spits error each build.

Current Behavior

Instead of building page, the following error is displayed.

Module build failed: Error: Nesting detected at 11:9. Unfortunately nesting is not supported by styled-jsx.

Steps to Reproduce (for bugs)

Download and install with-styled-jsx-plugins example from next repo.

yarn add next@6.0.0-canary.3 react@16.3.2 react-dom@16.3.2

yarn dev

goto localhost:3000

I can verify that the babel preset next/babel isn't receiving any custom options, so when the preset looks for the options, they aren't found.

https://github.com/zeit/next.js/blob/canary/server/build/babel/preset.js#L55

Context

Impossible to build pages currently.

Your Environment

Tech
Version

next
6.0.0-canary.3

node
9.3.0

OS
High Sierra

browser
Chrome

etc

Issue 2:
Hi,

is it possible to define and use multiple custom Documents in next.js? Should I operate with subfolders?

[ x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I would like to define and import more than one custom document (https://github.com/zeit/next.js/#custom-document).

Should I operate with subfolders?

Current Behavior

I can't define more than one custom document definition.

Steps to Reproduce (for bugs)

I just run the code you can find here https://github.com/zeit/next.js/#custom-document

Context

I'd like to set the lang attribute in HTML tag in a multi-language website.

Your Environment

| Tech | Version |

| next | 4.1.3 |

| node | 8.8.1 |

| OS | Ubuntu 16.04.2 LTS |

| browser | Google Chrome 64 bit v58.0.3029.110 |

Thanks,

Luca
Issue 1:
VSCode Version: 1.1.0-alpha

OS Version: Windows 10

Steps to Reproduce:

In the Explorer viewlet, right click on a file > Select for Compare

Right click another file > Compare with 'selected.js'

Try to modify the first file (left side compare window)

It makes sense when comparing the changes of a single file, but when two different files are being compared you should be able to modify the first opened one.

Issue 2:
Trying to publish while the repo url contains username will still ask me for username.

Leaving empty or filling in the username and password will result in authentication fail by remote server.

Example,

repo url: https://FilipDz@bitbucket.org/FilipDz/baze.git

username: or FilipDz

password: ******

output:

remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.

fatal: Authentication failed for 'https://FilipDz@bitbucket.org/FilipDz/node-baze.git/'
Issue 1:
Migrated issue, originally created by Craig Radcliffe (@chradcliffe)

I noticed this issue while trying to use sqlalchemy as a query generator to produce a string for input into a system that doesn't accept bind parameters.

The literal_binds parameter, when passed through the compile_kwargs parameter in the compile() method, does not seem to apply to a LIMIT clause. Here is a basic example:

from sqlalchemy import select
from sqlalchemy.sql import table, literal_column

t = table("foo")
t.append_column(literal_column("bar"))
print select([t.c["bar"]]).limit(100).compile(compile_kwargs={'literal_binds': True})

The output is:

#!
SELECT foo.bar
FROM foo
LIMIT :param_1

I would expect:

#!

SELECT foo.bar
FROM foo
LIMIT 100

Other clauses, including JOINs, WHEREs, GROUP BYs, etc. work as expected.

The issue is present in 0.9.8.

Issue 2:
Migrated issue, originally created by Dobes Vandermeer (@dobesv)

I am trying to use the "baked query" pattern to reduce the time spent generating SQL, which currently is quite significant for our app.

One thing I can't seem to parameterize using a bindparam, however, is the limit on the query.

Although in #805 the limit was changed into a bindparam, this doesn't allow me to provide my own bindparam but rather always creates its own bindparam, assuming the limit I procide is a number already.

I think that if the places where currently it wraps a numeric limit into a bindparam using sql.literal() it would also check if limit was already a bindparam then it would be good.

Here's an example that can be pasted into the test suite:

def test_select_with_bindparam_limit(self):
"""Does a query allow bindparam for the limit?"""
sess = create_session()
users = []

q1 = sess.query(self.classes.User).order_by(self.classes.User.id).limit(sa.bindparam('n'))
for n in xrange(1,4):
users[:] = q1.params(n=n).all()
assert len(users) == n
Issue 1:
The current watch mode for webpack is fairly good at caching load results and general workload between file changes as long as you keep the same webpack process running. The initial build for some projects, on the other hand, can be on the order of more than a minute. This can make the build process very slow if for some reason you need to stop your watcher, or node crashes, or you simply want to restart your connect server with different flags.

It would be nice if webpack were able to persist compilation information between invocations of the node process to the filesystem and reload that cache later -- so ideally, performance between different $ webpack calls would be close to how long it takes to --watch to recompile when it detects a change.

Issue 2:
I'm sure this has been talked about before, but I can't find a clear issue for it. I'm playing around with using webpack with server-side node modules (using target: node). I started to like the idea of bundling of everything into a single js file because that would be cool for deployment, but what kills that idea is binary dependencies. They definitely can't be bundled in, though you might know of a hack that lets me alias them or something.

Is there any way to tell the system ignore bundling anything coming from node_modules, and just leave it as a require statement?

I don't know if the IgnorePlugin means that, but if so, trying it results in an error: plugins: [ new webpack.IgnorePlugin(/.*/, /.*node_modules.*/) ]

% webpack --config webpack.node.config.js

/Users/james/projects/jlongster4/node_modules/webpack/lib/Compilation.js:203
factory.create(module.context, dependencies[0], function(err, dependantModul
^
TypeError: Cannot read property 'context' of null
at Tapable.<anonymous> (/Users/james/projects/jlongster4/node_modules/webpack/lib/Compilation.js:203:24)
Issue 1:
Right now, pandas's read_csv() supports forcing column names read from CSV data to be unique:

>>> import pandas as pd
p>>> pd.__version__
u'0.20.3'
>>> from StringIO import StringIO
>>> csv_data = """a,a,b
... 1,2,3
... 4,5,6"""
>>> df = pd.read_csv(StringIO(csv_data))
>>> df.columns.tolist()
['a', 'a.1', 'b']

The documentation suggests that passing mangle_dupe_cols=False to read_csv() will change this behavior to one where it'll overwrite data on load. That doesn't seem to be implemented as of this version:

>>> df = pd.read_csv(StringIO(csv_data), mangle_dupe_cols=False)
# snip
ValueError: Setting mangle_dupe_cols=False is not supported yet

However! Pandas doesn't fundamentally disallow duplicate column names. There's a simple (but somewhat convoluted) trick to get duplicate columns from a CSV file into your headers:

>>> df = pd.read_csv(StringIO(csv_data), header=None)
>>> df.columns = df.iloc[0]
>>> df = df.reindex(df.index.drop(0)).reset_index(drop=True)
>>> df
0 a a b
0 1 2 3
1 4 5 6

(Then again, maybe this isn't so simple; there's a funny "0" in there with the column headings and that seems weird.)

Problem description

I would like a native way to read CSV files with repeated headers. In my application, it's literally so I can warn people about duplicated column headers. Yes, I could use python's built-in csv module for this, but then I'm using two methods to read CSV files and it gets weird.

Since mangle_dupe_cols=False is not yet implemented, I might propose this behavior in this case.

Output of pd.show_versions()

pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.11.final.0

python-bits: 64

OS: Darwin

OS-release: 17.3.0

machine: x86_64

processor: i386

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

LOCALE: None.None

pandas: 0.20.3

pytest: 3.2.1

pip: 9.0.1

setuptools: 36.2.7

Cython: None

numpy: 1.13.1

scipy: None

xarray: None

IPython: 5.4.1

sphinx: None

patsy: None

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: 0.999999999

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
#12935 added full support for duplicate column names (in header or in names) by mangling them. While this has been considered acceptable by users, ideally, we would like to not have to mangle them.
Issue 1:
It would be great if you could add torch.pi, which should return the constant 3.14159(etc).

Torch is highly desirable as a significantly faster alternative to numpy, implementing most of its functions. But it's missing a very basic thing, which is an easily accessible pi constant. It would be great and convenient if this simple thing were added.

As for implementation, literally linking to math.pi would be fine.

Currently, the only way to access pi would be to import it from another library like math/numpy, or to do torch.asin(torch.tensor(1.)).

Issue 2:
See title. I think this could be useful if you don't want to google it every time.
Issue 1:
It would be convenient to rewind video back and force to see the issue. Now it is required to download video to do so. Allure report support this, would be nice to have it in Html report.

Issue 2:
Context:

Playwright Version: 1.16.3

Operating System: Mac

Node.js version: 17.0.1

Browser: Chromium

Code Snippet

import { test } from "@playwright/test";

test("example", async ({ page }) => {
await page.goto("https://www.google.com");
const s = page.locator("input[name=q]");
await s.fill("example");
await page.waitForTimeout(5000);
await s.fill("overwritten");
await page.waitForTimeout(5000);
});

Describe the bug

When trying to select other times (rewind/forward) on the video, the clip continues to play from its current location.

When I play the video in test-results, I can rewind/forward it as expected

html.report.video.mp4