WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
scikit-learn 0.16.1 or 0.17dev

numpy 1.80 or 1.9.2

scipy 0.14.0

from sklearn.datasets import make_blobs
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier

datax,datay=make_blobs(n_samples=500)
baseSVC=RandomForestClassifier()
clf=GradientBoostingClassifier(init=baseSVC,verbose=1)
clf.fit(datax,datay)
y_pred=clf.predict(datax)

And get these:

Iter Train Loss Remaining Time

Traceback (most recent call last):

File "/media/internal4tb/steven/research_lre_ivector_2015/utils/bugTest.py", line 16, in

clf.fit(datax,datay)

File "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py", line 980, in fit

begin_at_stage, monitor)

File "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py", line 1040, in _fit_stages

random_state)

File "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py", line 747, in _fit_stage

sample_weight=sample_weight)

File "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py", line 550, in negative_gradient

return y - np.nan_to_num(np.exp(pred[:, k] -

IndexError: too many indices for array

Similar to #2233 #2691 not only the same error for RF and SVC

Issue 2:
here is a tiny script which reproduces the crash.

from sklearn.datasets import load_iris
from sklearn import ensemble
from sklearn.cross_validation import train_test_split

iris = load_iris()
X, y = iris.data, iris.target
X, y = X[y < 2], y[y < 2] # make it binary

X_train, X_test, y_train, y_test = train_test_split(X, y)

# Fit GBT init with RF
rf = ensemble.RandomForestClassifier()
clf = ensemble.GradientBoostingClassifier(init=rf)

clf.fit(X_train, y_train)
acc = clf.score(X_test, y_test)
print("Accuracy: {:.4f}".format(acc))

It also seems that the init param in GradientBoostingClassifier is

not really tested.

@pprett @glouppe @ogrisel
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I have a SnackBarController component that I place at the root of my Router, this is backed by a redux reducer with some actions that allow me to open the SnackBar and pass properties to it for the message and such

Custom Component

class SnackBarController extends React.Component {
render () {
return (
<Snackbar
open={this.props.snackBar.open}
message={this.props.snackBar.message}
autoHideDuration={this.props.snackBar.autoHideDuration}
onRequestClose={() => this.props.dispatch(closeSnackBar())}
action={this.props.action}
onActionClick={this.props.onActionClick}
/>
);
}
}

Actions

export const SNACKBAR_OPEN = 'SNACKBAR_OPEN';

export const openSnackBar = data => ({
type: SNACKBAR_OPEN,
...data,
open: true
});

export const SNACKBAR_CLOSE = 'SNACKBAR_CLOSE';

export const closeSnackBar = data => ({
type: SNACKBAR_CLOSE,
open: false
});

Reducer

import { SNACKBAR_OPEN, SNACKBAR_CLOSE } from "../actions/snackBar";

const snackBarInitialState = {
open: false,
message: 'There was an error',
autoHideDuration: 3000,
action: undefined,
onActionClick: undefined
};

export default (state = snackBarInitialState, action) => {
switch (action.type) {
case SNACKBAR_OPEN:
case SNACKBAR_CLOSE:
const { type, ...rest } = action;
return {
...state,
...rest
};
default:
return state;
}
};

I then call the open action when for instance a promise rejects

this.props.dispatch(openSnackBar({
message: "Use next?",
onActionClick: this.makeUpdates,
action: 'Use',
autoHideDuration: 6000
}));

Current Behavior

When I attempt to open a SnackBar this way, I only get a SnackBar with the message and the timeout, no action button shows at all

Steps to Reproduce (for bugs)

https://codesandbox.io/s/jpy3opvr93

Click button

See that there is no action

Context

Ideally this is supposed to allow me to control a snack bar from anywhere in my application including within other action generators

Your Environment

Tech
Version

Material-UI
^0.19.4

React
^16.1.1

Redux
^5.0.6

browser
Chrome Version 62.0.3202.94 (Official Build) (64-bit)

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

The docs for Snackbar Component incorrectly use the onRequestClose prop in all examples. This was a breaking change in Material UI 1.0.0-beta.24 Dec 17, 2017. The docs should be updated to reflect the changes. Also, I haven't checked any other components as this is my first time using a Material component, but this issue may persist across other docs.

Expected Behavior

Expect onRequestClose to be the correct prop for the Snackbar, and possibly other, component(s).

Current Behavior

onClose is the actual prop that Snackbar (and possibly other components) expect. Using onRequestClose throws a warning and the Snackbar will never trigger the function passed to onRequestClose, nor will the autoHideDuration trigger it.

Breaking Change

Current Docs
Issue 1:
We are using the custom _error.js page, and we're seeing an issue where anything other than a 404 from a server error is rendering the error page twice.

It looks like it's rendering once on the server (the render HTML only has 1 error page), but also rendering an additional error page on the client.

I'm not sure if this is a bug, or if there is something wrong with the way we're handling the error (we're letting next handle the uncaught error). Any guidance would be appreciated.

I've created an example that replicates the issue here:

https://github.com/kochis/next.js/tree/duplicate-error-example/examples/duplicate-error-pages

Screenshot

Issue 2:
Expected Behavior

1 error component is rendered

Current Behavior

2 error components are rendered below eachother. 1 through SSR and 1 through client side rendering.

Steps to Reproduce (for bugs)

import Link from 'next/link'

export default class extends React.Component {
static async getInitialProps() {
// Just throw an error in getInitialProps
throw new Error('test');
}
render() {
return (
<div>
<h1>Hello world</h1>
</div>
)
}
}

Context

Issue can be seen here: https://create-next-example-app-olyuogqcxe.now.sh/ (deployment with the above code). Scroll down cause the component itself is screen filling 😅

@harshmaur surfaced this.

Your Environment

Tech
Version

next
2.x+ (so beta too)

mode
production
Issue 1:
Is there any way to run flutter / dart code as a background service / receiver without a FlutterView?

Issue 2:
Customers would like to execute dart code as background processes on both iOS and Android, for things like syncing down data when wifi is available but the app is not open, etc.

@mpcomplete created a background process on Android to execute Dart code to update flutter. But I'm not aware of a parallel on iOS.

This issue tracks the development of APIs in plugins or otherwise. Engine support for these abstractions is tracked in #6192.
Issue 1:
Select an indented line of text by placing your cursor at the beginning of the line and pressing the down arrow while holding the shift key. Copy the line with cmd-c, then immediately paste with cmd-v.

I expect the duplicated line to be pasted with the same indentation as the previous line, but it's always pasted with leading whitespace removed.

Atom Version: 0.44.0

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.44.0 Atom-Shell/0.7.6 Safari/537.36

Issue 2:
If I've selected a block of ruby that is indented and then paste it on a line that is blank (no with no spaces on it), the lines are inserted with no indentation in front of them, instead of the indendation of the line above.

I have to hit "tab" before pasting if I want to get it to line up with everything else.

Atom Version: 0.44.0

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.44.0 Atom-Shell/0.7.6 Safari/537.36
Issue 1:
Hello,

when I run the following testcase in the dockerfile with npm 7.0.6 it fails with:

npm ERR! Cannot read property 'once' of undefined

Running it with 7.0.5 works as expected.

Dockerfile:

FROM ubuntu:20.04

# silence debconf
ENV DEBIAN_FRONTEND=noninteractive

# update base packages
RUN apt-get update && apt-get upgrade -y

# install nodejs
WORKDIR /opt
RUN apt-get install -y tar wget xz-utils
RUN wget --no-check-certificate https://nodejs.org/download/release/latest-v12.x/node-v12.19.0-linux-x64.tar.xz \
&& tar -axvf node-v12.19.0-linux-x64.tar.xz
RUN ln -s /opt/node-v12.19.0-linux-x64/bin/* /usr/local/bin/

# upgrade npm
RUN npm install npm@7.0.6 -g # CVE-2020-15095 / GHSA-xgh6-85xh-479p
RUN npm --version

# run testcase
WORKDIR /testcase
ADD package.json .
RUN npm run testcase

package.json:

{
"name": "testcase",
"version": "1.0.0",
"description": "dummy test case",
"scripts": {
"testcase": "/bin/true"
}
}

Could you please take a look?

Issue 2:
What / Why

This code assumes that add is only ever called with an object with a once method:

run-script/lib/signal-manager.js

Lines 31 to 36
in
1c7bbcd

const add = proc => {

runningProcs.add(proc)

if (!handlersInstalled)

setupListeners()

proc.once('exit', ({ code }) => {

In fact, add is called with undefined in a Docker container when running any script. (I'm not sure what about the Docker environment causes this.) See repro instructions below.

When

Repros consistently.

Where

n/a

How

n/a

Current Behavior

When running any script, npm raises the following error:

23 verbose stack TypeError: Cannot read property 'once' of undefined
23 verbose stack at Object.add (/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/signal-manager.js:36:8)
23 verbose stack at runScriptPkg (/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:63:19)
23 verbose stack at runScript (/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:8:16)
23 verbose stack at runScript (/usr/local/lib/node_modules/npm/lib/run-script.js:77:11)

Steps to Reproduce

Create a Dockerfile containing:

FROM node:14.14

RUN npm install --global npm@7.0.6

WORKDIR /app

RUN npm init -y
RUN npm test || exit 0
RUN cat /root/.npm/_logs/*.log

Then, run docker build ..

Expected Behavior

An error should not be raised.

Who

@isaacs @nlf

References

n/a
Issue 1:
Using rev 1278:a7e14835e46b of golang.org/x/tools the stringer command generate a source file

(t_string.go) which fails to compile due to the following error:

./t_string.go:18: cannot use _T_index[i - T(1)] (type uint16) as type uint8 in assignment

p.go

package p

// NOTE: Using rev 1278:a7e14835e46b of golang.org/x/tools the stringer command
// generate a source file which fails to compile due to the following error:
// cannot use _T_index[i - T(1)] (type uint16) as type uint8 in assignment

//go:generate stringer -type T

type T uint8

const (
Taaaaaaaaaaaaaaaaaaaaaaaaaaa T = iota
Tbbbbbbbbbbbbbbbbbbbbbbbbbbb
Tccccccccccccccccccccccccccc
Tddddddddddddddddddddddddddd
Teeeeeeeeeeeeeeeeeeeeeeeeeee
Tfffffffffffffffffffffffffff
Tggggggggggggggggggggggggggg
Thhhhhhhhhhhhhhhhhhhhhhhhhhh
Tiiiiiiiiiiiiiiiiiiiiiiiiiii
Tjjjjjjjjjjjjjjjjjjjjjjjjjjj
)

t_string.go

// generated by stringer -type T; DO NOT EDIT

package p

import "fmt"

const _T_name = "TaaaaaaaaaaaaaaaaaaaaaaaaaaaTbbbbbbbbbbbbbbbbbbbbbbbbbbbTcccccccccccccccccccccccccccTdddddddddddddddddddddddddddTeeeeeeeeeeeeeeeeeeeeeeeeeeeTfffffffffffffffffffffffffffTgggggggggggggggggggggggggggThhhhhhhhhhhhhhhhhhhhhhhhhhhTiiiiiiiiiiiiiiiiiiiiiiiiiiiTjjjjjjjjjjjjjjjjjjjjjjjjjjj"

var _T_index = [...]uint16{28, 56, 84, 112, 140, 168, 196, 224, 252, 280}

func (i T) String() string {
if i >= T(len(_T_index)) {
return fmt.Sprintf("T(%d)", i)
}
hi := _T_index[i]
lo := uint8(0)
if i > 0 {
lo = _T_index[i-1]
}
return _T_name[lo:hi]
}

Issue 2:
A pattern that I'm coming up on reasonably frequently in my code is the following:

if _, ok := myMap[key]; ok {
// do some stuff
}

It seems to me like there would be some (albeit small) gains to be had in the compiler detecting this particular case of discarding the value result of map-lookup in favor of only returning the boolean, and avoid doing the pointer arithmetic necessary to find that value.
Issue 1:
When I hold down the Windows key, it's nice that it lists almost all the keys that you can use with it.

Why is V missing (clipboard history?)

I think I've got it down now, but it would be nice when I've lost my mind.

Or is it because it's not in all versions of Windows 10 yet?

Issue 2:
total list from MSFT support: https://support.microsoft.com/en-us/help/12445/windows-keyboard-shortcuts

This list will be added into #890 with v2 of shortcut guide.

Combination
Effect

Win + Esc
Close magnification

Win + Enter
Narrator (Below 19h1)

Win + Pause
System Window

Win + PrtScn
Capture screenshot

Win + Space
Switch Keyboard Layout

Win + Tab
Open Timeline

Win + ;
Emoji Keyboard Pop up

Win + .
Emoji Keyboard Pop up

Win + ,
Peek at desktop

Win + +/-
Magnifier

---
---

Win + A
Action Center

Win + B
Focus system tray

Win + C
Cortana (doesn't work on 1909)

Win + D
Display & hide desktop

Win + E
File Explorer

Win + F
Open Feedback Hub

Win + G
Game bar

Win + H
Dictation bar

Win + I
Settings

Win + K
Quick connect

Win + L
Lock PC

Win + M
Minimize windows

Win + N
Notification dialog (Need to verify min version, may be Win11 and up)

Win + Q
Open Search Bar

Win + P
Open Display Mode Selection panel

Win + R
Run Dialog

Win + S
Open Search Bar

Win + T
Navigate between task bar items

Win + U
Ease of access center

Win + V
Open Clipboard History

Win + W
Open Windows Ink Workspace Panel

Win + X
Quick launch menu

Win+Z
Snap Flyout ( win11+)

---
---

Win + Shift + M
Restores windows minimized with Win + M

Win + Shift + S
Screenshot

Win + Shift + T
Navigate between task bar items reversed

Win + Shift + Left/Right Arrow
Move entire active window to different window

---
---

Win + Ctrl + arrow
Switch virtual desktop

Win + Ctrl + Enter
Narrator (19h1 and above)

Win + Ctrl+F4
Close virtual desktop

Win + Ctrl + D
New virtual desktop

Win + Ctrl + N
Narrator settings

Win + Ctrl + Q
Quick Assist

---
---

Win + Alt+ D
Toggles calendar in taskbar

---
---

Win + Ctrl + Shift + B
Restart Video Driver

---
---

Win + Shift + Ctrl + Alt
emulates the Office key
Issue 1:
Code Sample

import pandas as pd

df = pd.DataFrame({
'a': [1, 1, 2, 3],
'b': [None, 1, 2, 3],
'c': [1,2,3,4],
})

grouped = df.groupby(('a', 'b'))
print('Number of groups:', len(grouped))
# Number of groups: 4

num_iterations = 0
for _ in grouped:
num_iterations += 1

print('Number of groups iterated over:', num_iterations)
# Number of groups iterated over: 3

Problem description

Presently, when a GroupBy object is iterated over, any group where one of the columns grouped by is None is skipped.

This is a problem because when iterating over groups, we expect to iterate over all groups.

It is also a problem because it is not sensible to say the length of an iterable is x when iterating over it only performs some y < x number of iterations.

Expected Output

I'd expect iterating over a GroupBy object to iterate over all groups, regardless of the value in the key columns.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.5.2.final.0

python-bits: 64

OS: Linux

OS-release: 2.6.32-504.12.2.el6.x86_64

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

pandas: 0.18.1

nose: 1.3.7

pip: 9.0.1

setuptools: 23.0.0

Cython: 0.24

numpy: 1.11.1

scipy: 0.17.1

statsmodels: 0.6.1

xarray: None

IPython: 5.1.0

sphinx: 1.4.1

patsy: 0.4.1

dateutil: 2.5.3

pytz: 2016.4

blosc: None

bottleneck: 1.1.0

tables: 3.3.0

numexpr: 2.6.0

matplotlib: 1.5.1

openpyxl: 2.3.2

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.2

lxml: 3.6.0

bs4: 4.4.1

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: 1.0.13

pymysql: None

psycopg2: 2.6.2 (dt dec pq3 ext)

jinja2: 2.8

boto: 2.40.0

pandas_datareader: None

Issue 2:
ENH: maybe for now just provide a warning if dropping the nan rows when pivotting...

rom ml

http://stackoverflow.com/questions/16860172/python-pandas-pivot-table-silently-drops-indices-with-nans

This is effectivly trying to groupby on a NaN, currently not allowed

In [13]: a = [['a', 'b', 12, 12, 12], ['a', nan, 12.3, 233., 12], ['b', 'a', 123.23, 123, 1], ['a', 'b', 1, 1, 1.]]

In [14]: df = DataFrame(a, columns=['a', 'b', 'c', 'd', 'e'])

In [15]: df.groupby(['a','b']).sum()
Out[15]:
c d e
a b
a b 13.00 13 13
b a 123.23 123 1

Workaround to fill the index with a dummy, pivot, and replace

In [31]: df2 = df.copy()

In [32]: df2['dummy'] = np.nan

In [33]: df2['b'] = df2['b'].fillna('dummy')

In [34]: df2
Out[34]:
a b c d e dummy
0 a b 12.00 12 12 NaN
1 a dummy 12.30 233 12 NaN
2 b a 123.23 123 1 NaN
3 a b 1.00 1 1 NaN

In [35]: df2.pivot_table(rows=['a', 'b'], values=['c', 'd', 'e'], aggfunc=sum)
Out[35]:
a b c d e
0 a b 13.00 13 13
1 a dummy 12.30 233 12
2 b a 123.23 123 1

In [36]: df2.pivot_table(rows=['a', 'b'], values=['c', 'd', 'e'], aggfunc=sum).replace('dummy',np.nan)
Out[36]:
a b c d e
0 a b 13.00 13 13
1 a NaN 12.30 233 12
2 b a 123.23 123 1
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce/21728/

Failed: [k8s.io] V1Job should scale a job up {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:127
Aug 16 08:11:16.645: Couldn't delete ns "e2e-tests-v1job-gmj3l": namespace e2e-tests-v1job-gmj3l was not deleted within limit: timed out waiting for the condition, pods remaining: []
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:265

Previous issues for this test: #29976 #30464

Issue 2:
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:127

Aug 16 08:11:16.645: Couldn't delete ns "e2e-tests-v1job-gmj3l": namespace e2e-tests-v1job-gmj3l was not deleted within limit: timed out waiting for the condition, pods remaining: []

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:265
Issue 1:
Forked from #4396 and probably other issues.

Nodes and other infrastructure resources (e.g., persistent volumes) should go into a namespace, such as kubernetes. Not putting them into a namespaces, creates special cases everywhere.

@derekwaynecarr @smarterclayton @lavalamp @thockin @erictune @markturansky

Issue 2:
See issue #6079 as the roll-up for node upgrades.

This issue is to do an in-place upgrade of the kubelet and kube-proxy binaries while a node is running. Docker and the kernel/OS are not changed. This upgrade can only be performed if the requested new version of kubelet and kube-proxy are compatible with the existing Docker and kernel/OS version; see #4855 for more details on versioning.

We simply want to download the new (kube*) node binaries, stop the old ones, and start the new ones (#1573). That way, the pods continue to run, and we don't have to migrate any storage. Possible complications include:

#3333 leftover state or configuration of the VM will cause unwanted side effects after the upgrade is complete

the configuration of the node (environment variables, flags passed to kube_, something salt does) might change between kube_ versions

when kube* binaries are stopped, the master might think the pods are all gone, and schedule new copies of the pods elsewhere throughout the cluster

The following requirements follow:

smart salt stanzas: idempotency, can run on a previously salted node

must have an upgrade grace period where the pods are considered alive even if they cannot be health-checked by kubernetes

The tests for this feature are tracked in #7256.

References:

#4855 cluster versioning

#3333 lively debate about kubelet & kube-proxy upgrades, specifically in-place vs fresh-node

#1573 online kubelet upgrades; the original issue for this work item
Issue 1:
When renaming a file the file explorer becomes grey. After hitting ENTER to confirm the changed name, the explorer view (file names) stays grey instead of becoming white. Does appear randomly. The working files view works as expected.

Using vs code v0.10.10-insider (5b5f4db)

Max OSX 10.11.3

Issue 2:
VSCode Version: 1.2.0

OS Version: OS X 10.11.5 (15F34)

Kudos:

I love the new integrated terminal feature!

Task I am trying to do:

Clear the screen after typing a series of terminal commands.

Steps to Reproduce:

On a Mac, open the integrated terminal (e.g. Ctrl-`)

Type in a few commands.

Clear the screen by pressing Cmd-K. (Cmd-K is a standard key for clearing the screen in apps like Console, Terminal, the Safari and Chrome Web Inspectors, etc.)

It works, but VSCode thinks that is the first key of a multi-key command and waits for and swallows the next keypress. It should recognize Cmd-K in the context of the integrated terminal.

Other things I tried:

Using the Unix clear command partly works. If you close and re-open the terminal, the previously “cleared” text reappears.
Issue 1:
Electron version: 3.1.1

Operating system: Mac 10.12.2

Expected behavior

When I refresh the app by pressing command+r the page should refresh and the vibrancy effect should not be removed.

Actual behavior

When I actually refresh the page, the vibrancy effect is removed and I only get a white background.

How to reproduce

Here is my main code

function createWindow() {
var bounds = getBounds();
var options = {
vibrancy: 'light',
width: bounds.width,
height: bounds.height,
x: bounds.x,
y: bounds.y,
titleBarStyle: 'hidden'
}

mainWindow = new BrowserWindow(options);

mainWindow.loadURL(viewFile);

mainWindow.on('close', () => {
saveBounds();
});
mainWindow.on('closed', () => {
mainWindow = null;
});

return mainWindow;
}

getBounds just loads the bounds from a json file.

Issue 2:
Electron version: 1.4.13 (currently the latest)

Operating system: OS X El Capitan (10.11.4)

Expected behavior

When the web page reloads the vibrancy set on the BrowserWindow should remain active.

Actual behavior

When the web page reloads (either using [Cmd+R], or in my case, due to Create React App) the vibrancy which was active prior to the reload is lost.

How to reproduce

If you use the sample code on the Quick Start page, and replace the BrowserWindow creation code with the following...

// ...

win = new BrowserWindow({
width: 800,
height: 600,
vibrancy: 'light'
});

// ...

Then load up the app and press [Cmd+R] on your keyboard. The vibrancy is lost, and the page background goes back to white (web page default).