WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
import sklearn.tree
import numpy as np

clf = sklearn.tree.DecisionTreeClassifier()
X = np.array([[1],[10]])
y = np.array([1000,2000])
clf = clf.fit(X,y)

X2 = np.array([[1]]) # right shape
clf.predict(X2)
clf.predict_proba(X2)

X3 = np.array([1]) # wrong shape
clf.predict(X3)
clf.predict_proba(X3)

X4 = np.array([[np.nan]]) # nan inputs
clf.predict(X4)
clf.predict_proba(X4)

Probably should throw an exception if the shape is wrong or np.nan is in the input.

Issue 2:
And add a test in the common tests.
Issue 1:
While testing some playbooks with rpm_key module I have noticed that each time I run it it imports the same key. It would be good to have an native ansible option which would prevent importing already imported key.

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

ansible/lib/ansible/playbook/role/init.py

ansible/lib/ansible/executor/play_iterator.py

ANSIBLE VERSION

ansible 2.1.0.0

CONFIGURATION

No change

OS / ENVIRONMENT

N/A

SUMMARY

In official ansible document site,

http://docs.ansible.com/ansible/playbooks_roles.html

It said,

Roles dependencies are always executed before the role that includes them, and are recursive. By default, roles can also only be added as a dependency once - if another role also lists it as a dependency it will not be run again.

but sometimes, it doesn't work as expected, the same role were executed multiple times. Maybe we need consider what role object is? the same role definition with different variable input may be considered different role object, but if we add conditional dependency for a role, that is we use "when", is the role with "when" different with role without "when"?

STEPS TO REPRODUCE

Suppose we have a playbook, which has a role named csf that depends on csfA/csfB/csfC, and csfB and csfA depends on csfC in some condition,

# main playbook
#ls.yml

---
- name: play1
hosts: SSHproxy
remote_user: root
gather_facts: false
roles:
- {role: csf, taskN: task1 }

#csf role definition
#roles/csf/meta/main.yml

---
dependencies:
- role: csfC
- role: csfA
- role: csfB

# csfA role defintion
#roles/csfA/meta/main.yml

---
dependencies:
- {role: csfC, when: taskN=='task1'}

#roles/csfA/tasks/main.yml
- shell: ls

# csfB role definition
#roles/csfB/meta/main.yml

---
dependencies:
- {role: csfC, when: taskN=='task1'}

#roles/csfB/tasks/main.yml
- shell: ls

EXPECTED RESULTS

<!--- What did you expect to happen when running the steps above? -->
role csfC will be executed just one time

PLAY [play1] *******************************************************************

TASK [csfC : command] **********************************************************
changed: [SSHproxy]

TASK [csfA : command] **********************************************************
changed: [SSHproxy]

TASK [csfB : command] **********************************************************
changed: [SSHproxy]

PLAY RECAP *********************************************************************
SSHproxy : ok=3 changed=3 unreachable=0 failed=0

ACTUAL RESULTS

role csfC were executed two times.

PLAY [play1] *******************************************************************

TASK [csfC : command] **********************************************************
changed: [SSHproxy]

TASK [csfC : command] **********************************************************
changed: [SSHproxy]

TASK [csfA : command] **********************************************************
changed: [SSHproxy]

TASK [csfB : command] **********************************************************
changed: [SSHproxy]

PLAY RECAP *********************************************************************
SSHproxy : ok=4 changed=4 unreachable=0 failed=0
Issue 1:
The pluralization of rest resource names in URL paths is mostly human conceit that complicates every interaction from clients and leads to little practical benefit for end users. In addition, it's an arbitrary transformation that cannot lead to predictable results.

The use of pluralization is entirely historical, and is not based on any pattern other than making readable urls for bookmarking in a web browser. That is not the same use case as a well constructed API - the set of end users who create urls against our API are extremely limited.

I believe for v2 versions of our APIs and new API resources we should abandon pluralization in our URL paths. We can continue to support the old paths as aliases throughout each published API version, but removing the arbitrary process of generating a plurals will allow future api logic to be simpler.

Ie:

/api/v1/namespace/foo/pod/bar/subresource

Issue 2:
Today the resync interval on a controller forces a LIST, and then as a consequence sends all objects down the reflector. However, for most controllers LIST is necessary because

Watch is reliable

They do not mutate the store themselves and thus might have data out of sync with etcd

They do not "drop" events when failures happen (instead they requeue)

Their source of data is relatively up to date, or isn't vulnerable to event reordering (B happens before A and is therefore ignored).

We should split "sync" into "sync" (send all events to listeners) and "list" (clear the cache and fetch from etcd).

All reflectors against etcd should have long "list" intervals (12-24h). Controllers that don't mutate the store or drop events should have long relist intervals AND resync intervals. For controllers that drop events or mutate the store in a potentially inconsistent way, we should relist infrequently and resync frequently.

The following reflectors are "fast" - every 30s

*api.Service from controller/endpoint/endpoints_controller.go:129
*extensions.Job from controller/job/controller.go:140
*api.ReplicationController from controller/replication/replication_controller.go:209
*extensions.DaemonSet from controller/daemon/controller.go:210
*extensions.HorizontalPodAutoscaler from controller/podautoscaler/horizontal.go:121

These reflectors should have a 24h relist. We should separate resync, then tune each appropriately.
Issue 1:
In 0.16 I am seeing that my components that are set to change detection onPush not updating the UI upon mouse clicks... is anyone else seeing the same issue?

FYI

I am using Redux and my updates come from the store using Immutable.js models

Up to 0.15 all was great!

regards

Sean.

Issue 2:
Steps to reproduce and a minimal demo of the problem

http://plnkr.co/edit/hDagJbhXpwI8213PmCva?p=preview

Click on a page number (1..10) and observe that a highlighted page doesn't change

Expected/desired behavior

Click on a page number (1..10) should change active page.

Other information

used to work in beta.15

observe that clicking on prev / next changes an active page

the only difference between page no links and prev / next links is that page no links are generated using ngFor

problem doesn't show up if we remove changeDetection: ChangeDetectionStrategy.OnPush,

switching dev / prod mode doesn't make any difference
Issue 1:
Currently you can parametrize a container via environment variables passed in the Pod spec. Some applications expect their configuration in the form of config files. The gap can be bridged by a helper script in the container that reads the config from an environment variable and writes it to a file before executing the app, but this is somewhat hackish for large configs. While Linux support very large environment variables, it would be more natural to pass the config to the container via a file, as the app expects.

I propose a new mechanism that would allow you to specify a config file within the spec and have the file mounted at the specified location within the container. This would work similar to a hostPath volume, but it would not require that the file pre-exist in the node the Pod executes in, and would delete the file once the Pod no longer runs.

Maybe something like:

apiVersion: v1
kind: Pod
metadata:
name: test
spec:
containers:
- image: gcr.io/google_containers/test-webserver
name: test-container
volumeMounts:
- mountPath: /etc/some.config
name: config-file
volumes:
- name: config-file
inlineFile:
content: |
foo = bar
x = y

Issue 2:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): No

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): pod status failed volume

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Kubernetes version (use kubectl version): 1.3.5

Environment:

Cloud provider or hardware configuration: AWS

OS (e.g. from /etc/os-release): CoreOS

Kernel (e.g. uname -a): Linux ip-10-20-8-69.us-west-2.compute.internal 4.3.3-coreos #2 SMP Thu Dec 17 23:57:55 UTC 2015 x86_64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz GenuineIntel GNU/Linux

Install tools: Custom

Others:

What happened:

A pod entered the "Failed" status because the node ran out of disk:

status:
message: Pod cannot be started due to lack of disk space.
phase: Failed
reason: OutOfDisk
startTime: 2016-09-27T21:23:04Z

A new pod was started (it is part of a deployment), but the failed pod was still holding on to the EBS volume, which the kubelet didn't release until I explicitly deleted the failed pod with kubectl delete.

What you expected to happen:

The failed pod should not hold on to the volume or otherwise prevent the new pod from running in any way.

How to reproduce it (as minimally and precisely as possible):

I have not tried to reproduce it.

Anything else do we need to know:
Issue 1:
using Michael's idea to create nodes uniquely,

def prepare_add_user(id)
# returns 0 when created and 1 if it was already there
{:query=>
"start n=node:node_auto_index(name={id})
with count(*) as c
where c=0
create x={name:{id}}
return c",
:params => {:id => id}}
end

If you run this fast enough, you can manage to occasionally create two nodes with the same id. This is not supposed to happen, right?

Issue 2:
A relatively simple query is causing me some major headaches! It's easy enough to rewrite this query to get it to work, but I cannot figure out why it's returning the wrong results in the first place.

Neo4j version: 3.0.1-enterprise (via Docker)

Ubuntu 14.04

cypher query via browser interface

Steps to reproduce

Unfortunately, this doesn't actually reproduce the issue :( I have no clue why not

CREATE p=(n:Titled {matchable_title: "left"})-[:of_group]->(g:Group)<-[:of_group]-(m:Titled {matchable_title: "right"})
RETURN p;

CREATE p=(n:Titled {matchable_title: "same"})-[:of_group]->(g:Group)<-[:of_group]-(m:Titled {matchable_title: "same"})
RETURN p;

CREATE INDEX ON :Titled(matchable_title);

MATCH p=(n:Titled)-[:of_group]-(g)-[:of_group]-(m:Titled)
WHERE m.matchable_title = n.matchable_title
RETURN m.matchable_title, n.matchable_title, p LIMIT 25;

Expected behavior

For each row of results, m.matchable_title will be the same as n.matchable_title

Actual behavior

n.matchable_title and m.matchable_title do not match. According to PROFILE, the query starts with a NodeIndexScan to find m. There are multiple different values for m.matchable_title across different rows (as expected). Some of the returned nodes should be in the result set (although the row is wrong, n/m should appear in rows in the correct results) but some m/n nodes would not appear in the correct results.

Interestingly, although the query plan is not the same, the rows are returned in the same order as when the WHERE clause is removed.

It seems like n is found by an index scan, but the index values are not being checked, or something like that. If I remove the index on matchable_title, then the query starts with a NodeByLabelScan and then proceeds correctly. Adding the index back again results in incorrect rows. If I try to specify to use the matchable_title index, neo4j complains that this is not allowed.

The query can be corrected in many different ways. One example is to add a WITH clause:

MATCH p=(n:Titled)-[:of_group]-(g)-[:of_group]-(m:Titled)
WITH p, n, m
WHERE m.matchable_title = n.matchable_title
RETURN m.matchable_title, n.matchable_title, p LIMIT 25;

This causes the query plan to change, starting with NodeByLabelScan, then expanding and filtering. This query produces correct results.
Issue 1:
It would be great to see the Canny edge detector available in scipy.ndimage.

Implementations exist in

cv2 (https://github.com/opencv/opencv/blob/master/modules/imgproc/src/canny.cpp)

scikit-image (https://github.com/scikit-image/scikit-image/blob/master/skimage/feature/_canny.py)

Perhaps one of these could be ported here?

Issue 2:
When a wav file contains 24-bit audio, wavfile tries to read it via dtype('<i3'). However, there is no such native integer type, and it ends up trying to read dtype('<i4'), which of course doesn't work as the byte counts don't match.

This should be fixed in wavfile.

http://stackoverflow.com/questions/19780983/scipy-wavfile-music-in-garbage-out
Issue 1:
Original title: "Cosine" affinity type in FeatureAgglomeration somehow casue memory overflow in a particular dataset

Description

Please carefully test the codes below! Using "cosine" affinity type in FeatureAgglomeration, the codes will cause memory overflow with a particular dataset (Download here). It is all right with other affinity types. And this issue cannot be reproduced using simulation data (like using make_classification in sci-kit learn). Not sure why it happened.

Steps/Code to Reproduce

from sklearn.cluster import FeatureAgglomeration
import numpy as np
import time
train_data = np.genfromtxt('fold_2_trainFeatVec.csv', delimiter=',')
train_labels= np.genfromtxt('fold_2_trainLabels.csv', delimiter=',')

fa = FeatureAgglomeration(affinity="cosine", linkage="average") # no matter linage ="average" or "complete"
time_start= time.time()
fa.fit(train_data, train_labels) # memory keeps increasing here
time_end = time.time()
print('Time usage:',time_end-time_start)

Issue 2:
Via #15583:

it would be nice to have sample_weight support in StandardScaler. I don't see how to do that for sparse data right now, though (without touching the Cython code).
Issue 1:
Bootstrap JS 2.3.0 is causing fancybox 2 to stop working.

When I removed bootstrap.js, it started working. So switched back to Bootstrap.js 2.2.2 and issue solved.

Issue 2:
Hi,

I've just noticed that jQuery fancyBox isn't working anymore in conjunction with Bootstrap 2.3.

When reverting back to Bootstrap 2.2.2 everything is fine again.

Here are two jsfiddles to demonstrate the issue:

with Bootstrap 2.3 .js File: http://jsfiddle.net/XmDXJ/ <-- fancyBox doesn't open

without the Bootstrap js file: http://jsfiddle.net/yzJVH/ <-- fancyBox opens as it should
Issue 1:
After update VSC to 0.10.5, it crashed so many times. I use VSC nothing special, like usual.

By the way, the new JavaScript Syntax Highlighting is ...................

Issue 2:
After update 0.10.5, VSCode crashes during startup.

I deleted it once with AppCleaner, and rm -rf ~/.vscode/, it did not recover.

MacOSX:10.11.1

keyboard:JIS
Issue 1:
Summary

It would be great to have a simple way to change the field names for the output.

Motivation

When we define an item class we usually use Python variables for the names of the fields.

However in the output files we'd rather have correctly spelled headers.

But if we use the current approach, we only have the variables names as headers by default:

Describe alternatives you've considered

I wondered if using an init function for the item class would be the recommended way.

Or are there other options?

Issue 2:
Sometimes we may require defining field names that are not valid Python variables (for example containing spaces). I believe the correct way of doing this right now is that the developer needs to add a Pipeline that maps the internal name to the name we wan't to export. Scrapy could ship with a Pipeline (maybe enabled by default) that does this mapping for fields that define a field parameter. For example:

class MyItem(Item):
date_from = Field(export_name='Initial date')

This is a very simple pipeline. However, since this is a very common use case, I think it is something that could be shipped by default. I'm happy to provide a PR for this.
Issue 1:
Steps to Reproduce

Create a static final:

final sampleLocks = [
new Lock("L1", 5.0, "flo"),
new Lock("L2", 2.5, "flo"),
new Lock("L3", 4.0, "chris"),
new Lock("L4", 1.1, "flo"),
new Lock("L5", 4.2, "chris"),
];

Modify it (changing the individual numbers).

Do a hot reload.

Due to limitations of the VM, the value is not updated in the program, and the hot reload "doesn't work".

There should be a warning somewhere, that a static final has been updated and that the hot-reload will not necessarily take these changes into account.

Issue 2:
Add infrastructure to check for program elements changed in the last reload and not executed. Use this facility in flutter tools to figure out situations where the user makes changes that will not be reflected after a hot reload and warn users about the need to do a hot restart for the changes to take effect.
Issue 1:
According to the docs "Autodetecting Gulp, Grunt and Jake Tasks", gulpfile.js at project root is loaded and tasks in that are listed automatically.

gulpfile.js:

var gulp = require('gulp');
gulp.task('gulpfileTASK1', function() {});
gulp.task('gulpfileTASK2', function() {});
gulp.task('gulpfileTASK3', function() {});

VS Code Command >Tasks: Run Task:

gulpfileTASK1
gulpfileTASK2
gulpfileTASK3

This autodetecting is disabled (gulpfile.js is ignored) if tasks are defined in .vscode/tasks.json, right?

tasks.json:

{
"version": "0.1.0",
"command": "something",
"isShellCommand": true,
"tasks": [
{
"taskName": "tasksjsonTASK1",
"args": []
},
{
"taskName": "tasksjsonTASK2",
"args": []
},
{
"taskName": "tasksjsonTASK3",
"args": []
}
]
}

VS Code Command >Tasks: Run Task (tasks in gulpfile.js are not listed):

tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3

It seems that behavior above is right.

But if gulp is specified to the command above ("command": "gulp"), tasks in both files are listed.

VS Code Command >Tasks: Run Task:

gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3

Of course the tasks in tasks.json are gulp tasks because command is gulp. gulpfileTASK* tasks should not be listed.

When --gulpfile is specified, these tasks are listed even if gulpfile.js is another named and it is in outside of project root.

tasks.json:

{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"--gulpfile", "PATH/TO/OUTSIDE/OF/PROJECT/ANOTHER_NAME.js"
],
"tasks": [
{
"taskName": "tasksjsonTASK1",
"args": []
},
{
"taskName": "tasksjsonTASK2",
"args": []
},
{
"taskName": "tasksjsonTASK3",
"args": []
}
]
}

VS Code Command >Tasks: Run Task:

gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3

It seems that the autodetecting is enabled always when command is gulp even if there is not gulpfile.js at project root.

Issue 2:
Testing #2230

Can you try to remove the arrows?
Issue 1:
If I'm not at the right place for this issue, I apologize. Not sure where to get started to solve this error message.

Problem description

a nextjs app which was made from with-material-ui-next, you can find the app having the issue here next-library-starter

a npm package called next-library which depends on material-ui and is a dependency of next-library-starter (see The Goal below)

everything works great, except I'm receiving an error message for each material-ui component.

Error messages

Warning: Failed context type: Invalid context 64a55d578f856d258dc345b094a2a2b3 of type Jss supplied to withStyles(ButtonBase), expected instance of Jss.

Warning: Failed context type: Invalid context d4bd0baacbc52bbd48bbb9eb24344ecd of type SheetsRegistry supplied to withStyles(TouchRipple), expected instance of SheetsRegistry.

The goal

The goal is to have that npm library with material-ui in order to quickly get started with new projects. This stuff is slightly beyond my understanding of npm packages & webpack and I might not be doing it the right way, if so, please kindly advise.

Steps to reproduce

git clone https://github.com/astenmies/next-library-starter.git && cd next-library-starter && yarn && yarn run dev

Versions

Material-UI: next

React: 15.6.1

Browser: Chrome

Issue 2:
Context

According to docs, Material-UI uses the jss-preset-default module. Which is not true since #9129 was merged.

Also, jss-preset-default plugin is listed in package.json - it suggests that all jss-preset-default plugins are supported, which is not true.

My suggestion is to remove jss-preset-default from package.json and add list plugins which are used instead.

Also, docs should be updated and probably examples too (e.g. this one).

I can submit a PR if needed
Issue 1:
Right now i64 unifies with int on 64-bit platforms, etc, and it's a source of errors like in d65df5d. I believe they should be different types.

Issue 2:
Hi,

The following compiler error is not particularly clear or helpful (formatted to show the non-clarity).

error: mismatched types: expected
`core::option::Option<&'r Job>` but found
`core::option::Option<&'r Job>` (lifetime mismatch)

While I understand there's a mismatch here, it's not really helpful in grasping what has to happen in my code to correct the error. In particular, if I passed type "X" but got "X", I'm not led towards a clear solution.

I've included below a fuller scroll, which is an error I have gotten a lot but don't really grok how to avoid yet.

Basically, I'm confused by the errors here and don't find them clarifying, only that I'm doing something vaguely wrong with lifetimes.

newton.rs:211:5: 213:6 note: consider using an explicit lifetime parameter as shown: fn take_job<'r>(&'r mut self, job: &'r Job)
newton.rs:211 fn take_job<'r>(&'r mut self, job: &'r Job) -> () {
newton.rs:212 self.job = Some(job);
newton.rs:213 }
newton.rs:212:20: 212:29 error: cannot infer an appropriate lifetime due to conflicting requirements
newton.rs:212 self.job = Some(job);
^~~~~~~~~
newton.rs:212:20: 212:29 error: mismatched types: expected `core::option::Option<&'r Job>` but found `core::option::Option<&Job>` (lifetime mismatch)
newton.rs:212 self.job = Some(job);
^~~~~~~~~
Issue 1:
I'm new to less but when I try and compile the less files, I get an error on line 578 of the mixins file. Any ideas what might be going wrong?

Thanks,

Andy

Issue 2:
I got this error on line 578 when i try to compile mixins.less file (latestmaster) :

.spanX (@index) when (@index > 0) {
.span{@index} { .span(@index); } // Here is the error
.spanX(@index - 1);
}

I tried to compile with differents tools (http://less2css.org/, lessphp...) but it always return the same error.
Issue 1:
Hello,

please can you add an exclude_from_weight_decay parameter to AdamW? Some parameters during weight decay must be excluded.

For more details please look here.

Thanks a lot.

Have a nice day.

Issue 2:
Hello,

Would be interested to port RectifiedAdam from tensorflow/addon with addding exclude_from_weight_decay extension?

For more details tensorflow/addons#2681

Thanks a lot.

Have a nice day.