WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I tried using the @types/requirejs package and had problems.

package.json

`

"devDependencies": {

"@syncfusion/ej2-build": "*",

"@types/chai": "^3.4.28",

"@types/jasmine": "2.8.9",

"@types/jasmine-ajax": "^3.1.27",

"@types/requirejs": "^2.1.31"

}

`

When i try compile my application it throws below error:

[11:47:10] Starting 'scripts-gen'...

D:/workspace/components/ej2-button-components/node_modules/@types/requirejs/index.d.ts(396,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.

[11:47:23] 'scripts-gen' errored after 12 s

[11:47:23] TypeScript error: D:/workspace/components/ej2-button-components/node_modules/@types/requirejs/index.d.ts(396,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.

at Object.getError (D:\workspace\components\ej2-button-components\node_modules\gulp-typescript\release\utils.js:53:15)

versions:

node - v8.11.3

npm - 5.6.0

typescript -3.0.3

Please check this and provide any solution for this ASAP

Issue 2:
I'm getting the following error when I compile my sails project from my lodash typings.

error TS2403: Subsequent variable declarations must have the same type. Variable '_' must be of type 'any', but here has type 'LoDashStatic'.
>> 1 non-emit-preventing type warning
>> Error: tsc return code: 2
Warning: Task "ts:compile" failed. Use --force to continue.
Aborted due to warnings.

I am using TSC 1.7.5. Here are my tsconfig, tsd and package files.

I swear this used to work, any help would be much appreciated.

Thanks.
Issue 1:
Describe the workflow you want to enable

Currently, there is no way to derive the Sensitivity or the Specificity from the confusions matrics

The only way to be calculated is to do it yourself. this can be simple if you are doing a simple binary classification like this one on the image.

But if you are dealing with multiple categories more than 2 this can be slightly complicated and it can take time!

Also, I think that calculating Sensitivity and Specificity will help analyze our model much much better

.

Describe your proposed solution

Add 2 new functions to sklearn.metrics that accept the confusion matrix and then return sensitive or specificity

Should be something like this

from sklearn.metrics import sensitive_score, specificity_score, confusion_matrix
conf = confusion_matrix(y_test, y_pred)
specificity = specificity_score(conf)
sensitive = sensitive_score(conf)

We can do even better by make it more intuitively to use

# it will caculate the confusion matrix internally !
specificity = specificity_score(y_test, y_pred)
sensitive = sensitive_score(y_test, y_pred)

Describe alternatives you've considered, if relevant

I think this feature will be good to have one.

I can implement it myself!! and open a new pull request

Issue 2:
I'm not sure if this is intended, but I was confused that the score function after grid search uses a different scorer than the scorer defined in GridSearchCV.

Example:

from sklearn import datasets
from sklearn.linear_model import LinearRegression
from sklearn.grid_search import GridSearchCV
from sklearn.cross_validation import train_test_split
from sklearn.metrics import mean_squared_error
from sklearn.metrics import r2_score

digits = datasets.load_digits()
X = digits.data
y = digits.target
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=0)

hyperparams = [{'fit_intercept':[True, False]}]
algo = LinearRegression()

grid = GridSearchCV(algo, hyperparams, cv=5, scoring='mean_squared_error')
grid.fit(X_train, y_train)
print grid.score(X_test, y_test)
print mean_squared_error(y_test, grid.best_estimator_.predict(X_test))
print r2_score(y_test, grid.best_estimator_.predict(X_test))

I expected that grid.score() would use the mean_squared_error because this was previously defined in the scoring option. It took me some time to find out that the number is actually the r2_score which seems to be the score function of LinearRegression.

The documentation of score() in BaseSearchCV says:

The score function of the best estimator is used, or the scoring parameter where unavailable.

Maybe the documentation of score() in BaseSearchCV could be adapted to make it clear that the calculated score is not necessarily the same as the one defined in the scoring parameter of GridSearchCV.
Issue 1:
Migrated issue, originally created by Anonymous

If a exception raise in commit() function, rollback() function would be called and then the exception would be re-raised. The re-raising of the exception may be failed when sqlalchemy work with a coroutine framework such as evenlet or gevent due to a context switch(rollback is a bocking function, which will cause a context switch, and the exception may be cleared within the context switch). The issue could be simplely fixed by the following patch without risk.

Attachments: 2703.patch | 2703.2.patch | greenthread_compatibility_fix.patch | greenthread_compatibility_fix_v2.patch

Issue 2:
Migrated issue, originally created by Anonymous

We have an oracle database with multiple schemas defined. When I try to add a table to a particular schema using SQA (see attached example), the operation fails because a table with the same name is found inside one or more of the other schemas, despite the fact that I'm specifying which schema to use in the Table definition. When I turn engine echo on I see the following:

2007-04-24 16:55:35,952 INFO sqlalchemy.engine.base.Engine.0x..54 select table_name from all_tables where table_name=:name

2007-04-24 16:55:35,954 INFO sqlalchemy.engine.base.Engine.0x..54 {'name': 'TASK'}

When I perform this query against the DB I get multiple rows returned. The problem appears to be that this query does not account for the schema/owner in any way.

Note that I have tried the same test using Postgres and it works as expected.

Attachments: test.py
Issue 1:
Code Sample, a copy-pastable example if possible

s1=pd.Series([True,False,True,True])
s2=pd.Series([True,True,False])

s1.index=pd.MultiIndex.from_tuples( [(0, 2), (1, 1), (1, 2), (2, 1)],names=['st', 'at'])
s2.index=pd.Index([0,1,2], name='st')

ds1=pd.DataFrame(s1)
ds2=pd.DataFrame(s2)

s3=pd.Series([True,False,True])
s4=pd.Series([True,True,False])

Expected Output

st at
0 2 True
1 1 False
1 2 True
2 1 False
dtype: bool

For series, * and & give different result:

In: s1 & s2
Out:
st at
0 2 False
1 1 False
1 2 False
2 1 False
dtype: bool

In: s1 * s2
Out:
st at
0 2 True
1 1 False
1 2 True
2 1 False
dtype: bool

BUT for dataframes they give the same:

In: ds1 * ds2
Out:
0
st at
0 2 True
1 1 False
1 2 True
2 1 False

In: ds1 & ds2
Out:
0
st at
0 2 True
1 1 False
1 2 True
2 1 False

and last for series with single index, also both s3 & s4 or s3 * s4 give:

0 True
1 False
2 False
dtype: bool

output of pd.show_versions()

pandas: 0.18.1

Issue 2:
Something seems to be wrong with s1 == s2 when s1 and s2 don't have the same index. Here is a snippet example:

import operator
import pandas
s1 = pandas.Series([1,2], ['a','b'])
s2 = pandas.Series([2,3], ['b','c'])
s1 == s2
s2 == s1

with the output:

InIn [5]: s1 == s2
Out[5]:
a False
b False

In [6]: s2 == s1
Out[6]:
b False
c False

On the other hand using combine works fine:

In [7]: s1.combine(s2, operator.eq)
Out[7]:
a 0
b 1
c 0

In [8]: s2.combine(s1, operator.eq)
Out[8]:
a 0
b 1
c 0

I guess you can first align s1 and s2 and then compare them, but is there a good reason why this couldn't work out of the box?

There doesn't seem to be any tests for pandas.Series. eq for two series with a different index in pandas/pandas/tests/test_series.py. I have a patch lying around to add such a test and I could commit it if that's useful.
Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

The --limit option

ANSIBLE VERSION

ansible 2.4.0 (devel ba3295dd3f) last updated 2017/04/12 11:26:36 (GMT +200)

CONFIGURATION

OS / ENVIRONMENT

N/A

SUMMARY

One of our developer tried to use one of our playbooks using multiple limits, thinking it will behave like a :& pattern. Having something like:

ansible-playbook deploy.yml --limit foo --limit bar

The limit on foo was omitted without any warning/error message prompted.

STEPS TO REPRODUCE

$ ansible-playbook deploy.yml --limit foo --limit bar --list-hosts
# The output will only contain hosts from *bar* group
$ ansible-playbook deploy.yml --limit "foo:&bar" --list-hosts
# The output will contain hosts contained in both foo and bar groups

EXPECTED RESULTS

I think that ansible should, at least, print a warning to mention that one of the --limit will be omitted

ACTUAL RESULTS

The playbook was run on hosts from the group mentioned in the second limit.

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

systemd

ANSIBLE VERSION

ansible 2.4.0
config file = /home/sxpert/.ansible.cfg
configured module search path = [u'/home/sxpert/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]

The documentation of the systemd module states that one should be able to do :

- name: "restart systemd"
systemd:
daemon_reload: "yes"
become: "yes"

yet, when one does this, the following error occurs :

fatal: [testvm]: FAILED! => {
"changed": false,
"failed": true,
"msg": "name is also required when specifying state"
}

so, which one is it ?
Issue 1:
I wanna ask where and how to see the log details（exit code 137，what！） when superset container not started：

File /home/superset/superset/assets/src/../backendSync.json was saved!

Done in 4.81s.

yarn run v1.12.3

$ NODE_ENV=production webpack --mode=production --colors --progress

clean-webpack-plugin: /home/superset/superset/assets/dist has been removed.

Starting type checking service...

Using 1 worker with 2048MB memory limit

92% chunk asset optimization TerserPluginKilled

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

error Command failed with exit code 137.

ERROR: compose.cli.main.main: Service 'superset' failed to build: The command '/bin/sh -c cd superset/assets && yarn --non-interactive --frozen-lockfile --link-duplicates && yarn run sync-backend && yarn run build && rm -rf node_modules && yarn cache clean' returned a non-zero code: 1

Issue 2:
Thank you for all your contributions.

To keep the project maintainable, please help the community by

🚮closing your issues that has been resolved, are no longer relevant or is duplicated.

https://github.com/apache/incubator-superset/issues

🚮closing your PRs that you no longer intend to merge or the code is not relevant any more. If the problem in the PRs still persists, please create an issue instead.

https://github.com/apache/incubator-superset/pulls

Everyone closing 1-2 PRs/issues can really make a difference.

🗑️✨
Issue 1:
source code test.js as below:

function testable(target) {
target.isTestable = true;
}

@testable
class MyTestableClass {}

and with .babelrc

{
"presets": ["es2015", "stage-0"]
}

When run babel, failed

$ babel test.js
TypeError: test.js: Property right of AssignmentExpression expected node to be of a type ["Expression"] but instead got "Decorator"
at Object.validate (/Users/soulwu/test/node_modules/babel-types/lib/definitions/index.js:99:13)
at validate (/Users/soulwu/test/node_modules/babel-types/lib/index.js:295:9)
at Object.builder (/Users/soulwu/test/node_modules/babel-types/lib/index.js:248:7)
at maybeMemoise (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:29:32)
at memoiseDecorators (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:56:7)
at Object.exports.default (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:61:3)
at PluginPass.ClassDeclaration (/Users/soulwu/test/node_modules/babel-plugin-transform-decorators/lib/index.js:164:45)
at /usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/visitors.js:271:19
at NodePath._call (/usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:72:18)
at NodePath.call (/usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:44:17)

need help...

Issue 2:
Issue 1:
It seems to me, that the source code of unit-tests.html here https://angular.io/docs/ts/latest/testing/jasmine-testing-101.html isn't correct. It should be:

...
<link rel="stylesheet" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<script src="../node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>
...

cause user have to install jasmine-core

Issue 2:
I'm submitting a ...

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Currently, when a (very) deep object is thrown as part of an error. The error message attempts to stringify the object, this freezes browsers for a significant period of time, and then produces an error message, many thousands of lines long. See screenshot

Expected behavior

If there were a default max depth to stringify to, a produced error message would only stringify to this depth from the original object.

Minimal reproduction of the problem with instructions

An object (parent) references many child objects in a key called children, each child references its parent object in a key called parent. Should an error be thrown on a child object (say a Duplicates in a repeater are not allowed error) the entire structure is stringified in the error section Duplicate value: .

What is the motivation / use case for changing the behavior?

Speedier error messages, that allow for quicker debugging.

Please tell us about your environment:

OSX 10.12.1, Sublime Text 3, BreezeJS

Angular version: 1.5.6

Browser: all

Language: all (as far as im aware)
Issue 1:
import seaborn as sns
sns.histplot([20.002347, 20.002347, 51.004152, 19.00218, 20.002346])

is irresponsive for a long time with increasing memory usage. Adding bins=10 creates the plot without major delay.

Version: 0.11.1

Issue 2:
Hello! It is my first Github bug report, so please let me know if some additional info is needed.

I'm trying to use sns.pairplot for some pandas DataFrame and in result my computers are running out of memory and losing terminals with all the data.

The problem set of digits (csv) can be downloaded here:

https://www.dropbox.com/s/2dian5cipxx6dzu/temp.csv?dl=0

Interestingly, when I try to use sns.pairplot for another set of parameters with the same of an even greater number of lines, everything works nice.

Seaborn version: 0.11.0

This problem occurred on both my computers (OSx and Win10).
Issue 1:
Version

2.6.10

Reproduction link

https://jsfiddle.net/just_ben1996/5bfs80gk/14/

Steps to reproduce

Create a component with a :is to an 'input' native element.

v-model this component to something within your data as shown.

Note the input isn't pre-populated with the value, and on change it does not change the value it is bound to with v-model.

What is expected?

v-model should work as usual, updating the value when changed and displaying the value initially in the component.

What is actually happening?

The initial value is not shown in the input component, and on change it does not update the value it is bound to.

Issue 2:
vuejs does not behave properly when use v-model with dynamic component .

jsfiddle adress:

http://jsfiddle.net/zuomingcai/4pukLmnc/1/

focus the input element in above fiddle and press any key to see the hehavior.
Issue 1:
facebook/react/pull/5744

It seems with the newest update v15 when passing props into a child component with the spread operator the console throws the warnings associated with this pull request.

seems to only throw issue when the component is not a class but only stateless component hence passing just {...props} and not {...this.props}

I am not accessing refs or keys in the child component

Issue 2:
React version: 16.13.1

Steps To Reproduce

In a project with React, and react-leaflet@2.7.0

import React from "react";
import Renderer from "react-test-renderer";
import { Map, TileLayer } from "react-leaflet";

let component = Renderer.create(
<Map>
<TileLayer
attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
</Map>
);

Link to code example: https://codesandbox.io/s/react-test-renderer-leaflet-mohzp

The current behavior

It raise an error Map container not found.

The expected behavior

Enzyme's attachTo option allow to mount the comment in a more realistic environment, which fixes this bug. But there is no equivalent feature in react-test-renderer as far as I know.

See PaulLeCam/react-leaflet#246 for more info about the Enzyme fix for this issue.

It should render the map as expected.
Issue 1:
It could be useful to be able to intercept dialog events from webview (alert, confirm, prompt) to be able to implement our own gui.

Also it is part of chrome webview events

https://developer.chrome.com/apps/tags/webview#event-dialog

Issue 2:
Output of node_modules/.bin/electron --version: v3.0.8

Operating System (Platform and Version): Ubuntu 18.0.4

When running electron like:

npx electron web/spectron/example/index.js the appPath (via app.getAppPath()) ends up becoming broken and just:

/home/path/to/myproject/node_modules/electron/dist/resources/default_app.asar

... this is wrong.

Note that if I just do npx electron . the value is right and is:

/home/path/to/myproject

... and if I bundle my app as a real APP with .asar packaging I get:

/opt/Polar Bookshelf/resources/app.asar

The problem is that this breaks my spectron tests as I can't find a reliable path to require() my entry point.
Issue 1:
I wanted to understand if we could create BDD Style tests similar to the ones that we'd create using cucumber with the playwright test runner. we use the test runner extensively in our playwright automation framework (Visual regression is an example).

Kindly advise.

Issue 2:
Our team has a case to use the BDD test, Playwright has any plan to add their own BDD implementation using the playwright test runner? That would be great if to have.

This can help many people who want to use BDD along with Playwright. That's where cucumber became popular 😉
Issue 1:
In Node we have os.EOL which abstracts the OS.

In Deno we have std/fs/eol which is an os-invariant enumeration. The docs for writeFile and similar just use denormalized \n.

Is this a case where we can prefer the Node pattern over the Go pattern, or is there some other recommended way to do this sort of thing? I'm simply trying to write a file with line breaks.

Issue 2:
I get this error; in the Deno 1.23.2.

error: Unable to output during bundling.

Caused by:
0: load_transformed failed
1: failed to analyze module
2: failed to resolve https://esm.sh/react@^18.2.0?pin=v86?bundle/jsx-runtime from file:///C:/Users/ayovr/Documents/dev/deno-bundle-automatic-jsx-runtime-error-reproduction/mod.tsx
3: Cannot resolve "https://esm.sh/react@^18.2.0?pin=v86?bundle/jsx-runtime" from "file:///C:/Users/ayovr/Documents/dev/deno-bundle-automatic-jsx-runtime-error-reproduction/mod.tsx".

I made this repository with a simple reproduction: https://github.com/ayoreis/deno-bundle-automatic-jsx-runtime-error-reproduction
Issue 1:
Maybe there's some really easy way to make this work in TS that I'm not seeing.

I want to load jQuery as an AMD module, not as a global. jquery.d.tsas currently defined does not export a jquery external module. Instead it defines the $ and jQuery variables as global variables.

Is there a simple way to declare an external module that has the same signature as JQueryStatic?

If not, is it possible to change jquery.d.ts to support external module loading?

Here's how I have it working so far. The problem is I have to manually copy the whole JQueryStatic definition into jquery.d.ts. I don't want to do this. I want to take advantage of your work. Is there something I should do differently, or something that should be changed in jquery-1.8.d.ts?

folders

public/
components/
DefinitelyTyped/ (etc)
lib/
jquery.d.ts
main.ts
config.js

config.js

requirejs.config({
paths: {
'lib/jquery: 'path/to/jquery/lib',
}
})

main.ts

import $ = module("lib/jquery")
console.log("HI", $.ajax)

lib/jquery.d.ts

///<reference path="../components/DefinitelyTyped/Definitions/jquery-1.8.d.ts" />

declare module "lib/jquery" {
export function ajax(settings: JQueryAjaxSettings): JQueryXHR;
export function ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;

export function (selector: string, context?: any): JQuery;
export function (element: Element): JQuery;
export function (object: { }): JQuery;
export function (elementArray: Element[]): JQuery;
export function (object: JQuery): JQuery;
export function (func: Function): JQuery;
export function (array: any[]): JQuery;
export function (): JQuery;
}

Issue 2:
In the package.json for this package, currently there is:

"dependencies": {
"@types/react": "*"
},

It would be better to use carat ranges than the current wildcard for @types/react in the package.json for this package, because otherwise say for example the user is on React 15, and React 16 is released, and thus then the @types/react version is 16, causing this error:

node_modules/@types/react-select/node_modules/@types/react/index.d.ts
(3422,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>

[x ] I tried using the @types/react-select package and had problems.

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

Using: ts-loader: Using typescript@2.4.2

Authors: @Hesquibet, @giladgray, @iebaker, @tdreyno @skirsdeda, @vujevits, @devrelm, @MartynasZilinskas