WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
With pandas version 0.12:

In [3]: pandas.version.version

Out[3]: '0.12.0'

Code to reproduce:

import collections
import pandas as pd
import numpy as np

cols = map(str, np.unique(np.random.randint(0, 1000000, 200)))
index = map(str, np.unique(np.random.randint(0, 1000000, 5000)))
df = pd.DataFrame(np.random.randint(0,5,(len(index), len(cols))),
index=index, columns=cols)

types = []
for _ in xrange(1000):
subcols = np.random.choice(cols, 10)
subindex = np.random.choice(index, 400)
t = df.loc[subindex, subcols]
if type(t[subcols[0]]) == pd.core.series.Series:
types.append('Series')
elif type(t[subcols[0]]) == pd.core.frame.DataFrame:
types.append('Frame')
else:
raise Exception()

print collections.Counter(types)

About 20% of the time the result is a DataFrame and the other 80% is a Series

Issue 2:
I don't think there is a way to get the nlargest elements in a DataFrame without sorting.

In ordinary python you'd use heapq's nlargest (and we can hack a bit to use it for a DataFrame):

In [10]: df
Out[10]:
IP Agent Count
0 74.86.158.106 Mozilla/5.0+(compatible; UptimeRobot/2.0; http... 369
1 203.81.107.103 Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20... 388
2 173.199.120.155 Mozilla/5.0 (compatible; AhrefsBot/4.0; +http:... 417
3 124.43.84.242 Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.3... 448
4 112.135.196.223 Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.3... 454
5 124.43.155.138 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) G... 461
6 124.43.104.198 Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20... 467

In [11]: df.sort('Count', ascending=False).head(3)
Out[11]:
IP Agent Count
6 124.43.104.198 Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20... 467
5 124.43.155.138 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) G... 461
4 112.135.196.223 Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.3... 454

In [21]: from heapq import nlargest

In [22]: top_3 = nlargest(3, df.iterrows(), key=lambda x: x[1]['Count'])

In [23]: pd.DataFrame.from_items(top_3).T
Out[23]:
IP Agent Count
6 124.43.104.198 Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20... 467
5 124.43.155.138 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) G... 461
4 112.135.196.223 Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.3... 454

This is much slower than sorting, presumbly from the overhead, I thought I'd throw this as a feature idea anyway.

see http://stackoverflow.com/a/17194717/1240268
Issue 1:
Issue Id: 5ff55400-6d9e-cf2f-f43a-b414cfe1e50b
Versions
- 043a4e7
- 6c2d51a
- a5a983d
- b0b6af5
Stack
TypeError: Cannot read property 'className' of null
[/vs/base/browser/dom.ts#L65:20 (_findClassName)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/browser/dom.ts#L65:20 %28_findClassName%29)
[/vs/base/browser/dom.ts#L172:1 (toggleClass)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/browser/dom.ts#L172:1 %28toggleClass%29)
[/vs/editor/contrib/suggest/browser/suggestWidget.ts#L650:2 (SuggestWidget.setState)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/editor/contrib/suggest/browser/suggestWidget.ts#L650:2 %28SuggestWidget.setState%29)
[/vs/editor/contrib/suggest/browser/suggestWidget.ts#L576:9 (SuggestWidget.onEditorBlur)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/editor/contrib/suggest/browser/suggestWidget.ts#L576:9 %28SuggestWidget.onEditorBlur%29)
[/vs/base/common/winjs.base.raw.js#L1782:0 (onComplete)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/common/winjs.base.raw.js#L1782:0 %28onComplete%29)
[/vs/base/common/winjs.base.raw.js#L1448:0 (call)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/common/winjs.base.raw.js#L1448:0 %28call%29)
[/vs/base/common/winjs.base.raw.js#L1127:0 (_notify)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/common/winjs.base.raw.js#L1127:0 %28_notify%29)
[/vs/base/common/winjs.base.raw.js#L1343:0 (enter)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/common/winjs.base.raw.js#L1343:0 %28enter%29)
[/vs/base/common/winjs.base.raw.js#L1311:0 (_run)](https://github.com/microsoft/vscode/blob/043a4e760131b3bedc328b748a604494240ed0e5/src/vs/base/common/winjs.base.raw.js#L1311:0 %28_run%29)

Issue 2:
Today when you open VS Code on wrong casing workspace path, all file events stop to work. We should detect this case and either fix it or print a warning.
Issue 1:
Problem description

The v1 documentation here states that, "The CSS injected by Material-UI to style a component has the lowest specificity possible as the is injected at the top of the ". However, I am observing locally that the styles are being injected at the bottom of . I do not have any custom configuration set for JSS, so I don't believe anything in my codebase would be causing the difference in behavior.

I'm trying to follow the JSS docs to customize the insertion point via a comment, but everything I do within jss.setup() seems to be overriden with a MUIThemProvider that usesmuiThemeProviderFactory.js, which I don't have direct access to.

The docs examples use getContext, but that seems like a lot of extra boilerplate just to set a CSS insertion point. Does anyone have any advice on how I can get the JSS styles to actually render at the bottom of the <head /> element?

I'm reporting this here instead of SO, because I believe that the documentation is incorrect, and could use some examples for what I would expect to be a common use case for MUI consumers that don't also rely on JSS as their primary styling solution.

Versions

Material-UI: 1.0.0-beta.6

React: 15.6.1

Browser: Chrome latest

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

Expected Behavior

Positioning of the IconButton as an InputAdornment should be the same on IE11 as it is on other browsers.

Current Behavior

The IconButton is rendered too low and further to the right (for a right adornment).

Steps to Reproduce (for bugs)

An example of this is on the material-ui-pickers doc site (https://material-ui-pic.firebaseapp.com/)

Source to produce this is here: https://github.com/dmtrKovalenko/material-ui-pickers/blob/master/lib/src/_shared/DateTextField.jsx

The horizontal positioning issue can also be seen on the example on material-ui.com. However, the vertical positioning seems to come from using an IconButton.

The horizontal issue is because width: 100% is set on the input element. Removing this and setting flex-grow: 1 fixes this.

The vertical issue can be fixed by setting a fixed height of 48px on the input adornment.

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.33

React
16.2.0

browser
IE11

etc
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

13.1.1

What operating system are you using?

Windows

Operating System Version

Windows 10 Pro Version 2004

What arch are you using?

x64

Last Known Working Electron version

11.3.0

Expected Behavior

navigator.bluetooth.requestDevice({acceptAllDevices: true})should scan the BLE devices and returns it.

But it worked in MacOS.

Actual Behavior

navigator.bluetooth.requestDevice({acceptAllDevices: true}) is not returning anything and keeps scanning.

It is not working in windows only and worked in MacOS.

Testcase Gist URL

No response

Additional Information

No response

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.1

What operating system are you using?

Windows

Operating System Version

Version: Home 2004 / OS build: 19041.867

What arch are you using?

x64

Last Known Working Electron version

11.3.0

Expected Behavior

navigator.bluetooth.requestDevice({acceptAllDevices: true}); in a renderer JS file should trigger the select-bluetooth-device event registered in an electron/main JS file.

Actual Behavior

Does not trigger the event.

Testcase Gist URL

https://gist.github.com/910403defe0696032c1f5ccb1a9b1d7e
Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
yes

RFC?
no

Symfony version
3.4.x-dev (8c4a1e7)

Error:

PHP Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\LogicException: %scheb_two_factor.security_voter.class% should implement the Symfony\Component\Security\Core\Authorization\Voter\VoterInterface interface when used as voter. in vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php:54

This service is defined in https://github.com/scheb/two-factor-bundle/blob/master/Resources/config/security.xml#L52. Looks like class is not resolved in https://github.com/symfony/security-bundle/blob/master/DependencyInjection/Compiler/AddSecurityVotersPass.php#L45.

It returns parameter instead.

Error is going away when I hardcode FQCN instead of %scheb_two_factor.security_voter.class% parameter.

I've read https://github.com/symfony/symfony/blob/master/UPGRADE-3.4.md#securitybundle and this class does implement VoterInterface, the problem lies in fact that AddSecurityVotersPass is operating with "%scheb_two_factor.security_voter.class%" string instead with FQCN.

/cc @nicolas-grekas

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4

When voter service class is parameter, it is not yet resolved while checking if it implements VoterInterface.

Maybe type of AddSecurityVotersPass should be "optimization"?
Issue 1:
trait Foo: Fn(i32) + Send { }
impl<T:?Sized + Fn(i32) + Send> Foo for T { }

fn wants_foo(t: Box<Foo>) {
}

fn main() {
let f = Box::new(|x| println!("{}", x));
wants_foo(f);
}

Output:

<anon>:9:13: 9:14 error: the value of the associated type `Output` (from the trait `core::ops::FnOnce`) must be specified [E0191]
<anon>:9 wants_foo(f);
^

cc @nikomatsakis

Issue 2:
http://static.rust-lang.org/doc/master/std/hash/index.html
Issue 1:
When a tsconfig.json file is used to target a directory instead of an explicit file list, inherited classes aren't guaranteed to be ordered correctly unless they contain /// <reference tags. It would be nice if directory based compilation could work out the order for inherited classes without the need for the extra tags.

eg.

If i have an empty tsconfig.json file:

{}

A base class:

/** Base class */
class ServiceBase {
}

And inheriting class:

/** Child class */
class MyService extends ServiceBase {
constructor(){
super();
}
}

And a project structure like:

ProjectDir
--MyService.ts
--ServiceBase.ts
--tsconfig.json

The output .js will output the child class before the base class which gives runtime errors:

var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
/** Child class */
var MyService = (function (_super) {
__extends(MyService, _super);
function MyService() {
_super.call(this);
}
return MyService;
})(ServiceBase);
/** Base class */
var ServiceBase = (function () {
function ServiceBase() {
}
return ServiceBase;
})();

If I add a reference comment to my child class, the ordering will be correct:

/// <reference path="ServiceBase.ts"/>

I'd like to not have to do this, since the reference tags no longer seem necessary for most other use cases:

Issue 2:
Hello,

I am having the same issue, which had lot of activity on codeplex.

https://typescript.codeplex.com/workitem/627

class A extends B {
// ...
}

class B {
// ...
}

Compiles without error but obviously fails at runtime.
Issue 1:
Running this piece of code on Babeljs (abstracted):

for(var el of arr)
do()

Throws the following error:

[Error] ReferenceError: Can't find variable: Symbol

Using Safari 8.0.6

Chrome is ok

Firefox is ok

Issue 2:
I have some code like:

for (var n of geoHashes) {
console.log(n);
}

Only in firefox it throws an error: ReferenceError: Symbol is not defined
Issue 1:
Bug Report

Current behavior

Application does not compile with @babel/preset-react@7.10.4, using version 7.10.1 does.

Input Code

https://github.com/Amsterdam/atlas/tree/babel-bugreport

Run npm run start on this branch.

Expected behavior

Code compiles as before

Environment

System:
OS: Linux 5.6 Fedora 32 (Workstation Edition) 32 (Workstation Edition)
Binaries:
Node: 14.5.0 - ~/.nvm/versions/node/v14.5.0/bin/node
Yarn: 1.22.4 - ~/.nvm/versions/node/v14.5.0/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v14.5.0/bin/npm
npmPackages:
@babel/core: ^7.10.4 => 7.10.4
@babel/plugin-transform-runtime: ^7.10.4 => 7.10.4
@babel/preset-env: ^7.10.4 => 7.10.4
@babel/preset-react: ^7.10.1 => 7.10.1
@babel/preset-typescript: ^7.10.4 => 7.10.4
@babel/runtime: ^7.10.4 => 7.10.4
babel-eslint: ^10.1.0 => 10.1.0
babel-loader: ^8.1.0 => 8.1.0
babel-plugin-styled-components: ^1.10.7 => 1.10.7
babel-plugin-transform-commonjs-es2015-modules: ^4.0.1 => 4.0.1
eslint: ^7.3.1 => 7.3.1
jest: 26.1.0 => 26.1.0
karma-babel-preprocessor: 8.0.1 => 8.0.1
webpack: 4.43.0 => 4.43.0

Additional context

Issue 2:
Issue originally made by @stefanoverna

Bug information

Babel version: 6.1.21

Node version: 5.1.0

npm version: 3.3.12

Input code

I prepared a small sample that illustrates the problem:

https://github.com/stefanoverna/babel-react-skeleton

Just `npm run dev` and open the Inspector to see the exception

Description

It seems that the following code doesn't get transformed correctly by the babel-plugin-transform-class-properties package:

import React from "react";

class App extends React.Component {
state = {
count: 0
};

render() {
return <div>Hello there!</div>;
}
}

export default App;

At runtime, the following error is thrown by the _possibleConstructorReturn function:

ReferenceError: this hasn't been initialised - super() hasn't been called
Issue 1:
I find this a bit annoying, because I'm used to use the exponent notation to declare large numbers. Of course I could do zeros(10^4) but I think it should also work with 1e4.

The problem is that 1e4 is a float and 10^4 an int, and that Array doesn't accept floats for dimensional arguments.

Is there any problems with trying to convert floats to int when declaring arrays ? I think it would simplify things quite a bit, and it seems safe to me, since convert will give an InexactError when trying to declare an array with 10.5 elements.

It would also solve this kind of weird behavior:

julia> zeros(100/10)
ERROR: no method Array(DataType,Float64)
in zeros at array.jl:205

Issue 2:
Currently, rand(1,1e7) fails:

julia> rand(1,1e7)
ERROR: no method rand(Int64,Float64)

Should using FloatingPoints be allowed? Shall it throw InexactError() if round(m)!=m?
Issue 1:
Describe what you were doing when the bug occurred:

1.

2.

3.

Please do not remove the text below this line

DevTools version: 4.6.0-6cceaeb67

Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:173658)

at p (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:359968)

at Zc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:360183)

at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620)

at nl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:69923)

at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:110996)

at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381)

at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306)

at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171)

at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:98781)

Component stack: in Zc

in div

in div

in So

in Unknown

in n

in Unknown

in div

in div

in rl

in Ze

in fn

in Ga

in _s

Issue 2:
The DevTools Profiler occasionally encounters the error:

Could not find commit data for root "..." and commit ...

This issue is intermittent and we do not currently know hot to reproduce it. If you can reproduce it we would love to get any of the following information from you:

Info about how you reproduce it. (Share your code or site with us?)

An exported Profiler JSON that contains the bug. (This may be less useful, since the bug likely happens pre-export- but may still be helpful.)
Issue 1:
Reason:

It allows the user to compute these metrics on soft classifications. E.g. let Y be a (n,k) ndarray, where each row is a probability distribution over classes. Let C be a (n,c) ground truth ndarray, each row is a probability distribution over classes. Then A = np.dot(Y.T, C) is the expected contingency matrix.

Example of a function where it's currently implemented:

mutual_info_score

Functions for which it should be implemented:

adjusted_rand_score

fowlkes_mallows_score

normalized_mutual_info_score

adjusted_mutual_info_score

homogeneity_completeness_v_measure

Discussion

Is there an architectural or semantic reason for why we wouldn't want to allow custom contingency matrices? Otherwise this seems like an easy update.

Issue 2:
Supervised clustering metrics (at least where there is a fixed set of samples, unlike in coreference resolution with system mentions) can usually be calculated from the contingency matrix alone. I think passing y_true=contingency, y_pred=None should trigger this behaviour, saving computational time when calculating multiple measures.
Issue 1:
Choose one: is this a bug report or feature request? A bug report.

I couldn't tell if this was the same bug as other similar issues. Sorry for any duplication.

Input Code

for(let [a] of c) {
a=1;
()=>a;
}

Babel/Babylon Configuration (.babelrc, package.json, cli command)

{
presets: [
[ '@babel/env', { debug: true } ]
]
}

BROWSERSLIST='IE 11' npx babel --config-file ./.babelrc test.js

Adding in the destructuring plugin doesn't change anything.

Expected Behavior

Something like @babel/preset-es2015 produces (boilerplate omitted):

var _loop = function _loop() {
var _step$value = _slicedToArray(_step.value, 1),
a = _step$value[0];

a = 1;

(function () {
return a;
});
};

for (var _iterator = c[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
_loop();
}

Current Behavior

var _loop = function _loop(_a) {
_a = 1;

(function () {
return _a;
});

a = _a;
};

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {
for (var _iterator = c[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var _ref3 = _step.value;

var _ref2 = _slicedToArray(_ref3, 1);

var _a2 = _ref2[0];

_loop(_a2);
}

The line a = _a assigns to a when no variable a is in scope.

It seems @babel/preset-env orders the relevant transforms like this:

transform-block-scoping { "ie":"11" }
transform-for-of { "ie":"11" }

when they really should be ordered like this:

transform-for-of { "ie":"11" }
transform-block-scoping { "ie":"11" }

or the relevant transformations should be insensitive to ordering.

You can run them by themselves to confirm:

npx babel --no-babelrc --plugins @babel/transform-for-of,@babel/transform-block-scoping test.js # works correctly
npx babel --no-babelrc --plugins @babel/transform-block-scoping,@babel/transform-for-of test.js # breaks

Context

Our code had a more convoluted example, but basically captured a mutated loop variable within a lambda, and threw an exception at runtime because of the bogus assignment.

Your Environment

software
version(s)

Babel
7.0.0-beta.40

node
9.8.0

npm
5.6.0

Operating System
macOS 10.13.3

Issue 2:
This generates invalid code:

({
foo: (/*string*/ x) => /*object*/
10
});

Returns implicit undefined:

"use strict";

({
foo: function foo( /*string*/x) {
return /*object*/
10;
}
});
Issue 1:
TypeScript Version:

Version 1.9.0-dev.20160525-1.0

Code

// A self-contained demonstration of the problem follows...
async function getBar(params: number) {
return 1;
}

transform into with --target ES6

Expected behavior:

Don't transform async/await with polyfill codes.

I would not like to transform async/awai in typescript phase, use babel or something to transform them, or use browser's natively support.

In this case, I'd like to use TypeScript compiler as a very nice type checker and down transform to ECMA262's latest standard syntax.

Actual behavior:

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments)).next());
});
};
function getBar(params) {
return __awaiter(this, void 0, void 0, function* () {
return 1;
});
}

Issue 2:
From @mathiasdose on February 11, 2016 8:20

One of the features that I really liked with vscode was the folder path intellisense inside require('path') while doing NodeJs development. Now I just see a list of global variables. I don't use the new salsa, and I'm targeting ES5.

Something that might be worth mentioning is that the intellisense of the required modules is working as before.

Copied from original issue: microsoft/vscode#2923
Issue 1:
Add a view for extension management like Atom with detailed lists, extension download / update progress.

Issue 2:
The quick open UI isn't working fully well.

We need to come up with a better UI story that can

increase visibility of extensions;

fix awkward UI interactions we have today (status bar widget, error output pane, messages, etc);

enable us to implement more features in the future (enablement/disablement, statistics, etc).