WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm submitting a ...

bug report

feature request

support request => Please do not submit support request here, see note at the top of this template.

Current behavior

<script> and <style> tags are stripped from templates, but they are listed in the DOM element registry as supported, complete with DOM properties, etc.: https://github.com/angular/angular/blob/master/modules/%40angular/compiler/src/schema/dom_element_schema_registry.ts

Expected/desired behavior

They should be at least removed from the registry. Even better, they could be marked as forbidden in the registry so that it's clear that they don't fall in the 'unknown' tag category.

Angular version: GitHub repo, master branch

@mprobst advised me to CC @tbosch and @mhevery for this issue, thanks for taking a look at it!

Issue 2:
I'm submitting a...

[x] Bug report
[x] Feature request

Background

Imagine you have the following webcomponent:

<expression>
<script type='text/plain'>
If(var1 < var2,
Sum([Field 1])
,
Sum([Field 2])
)
</script>
</expression>

The component reads the text inside the script tag and sends it to a server which evaluates the result.

The webcomponent should be embedded in an Angular App. It is no Angular component and should just rendered as is.

It has to contain a script tag because 'text/plain' allows it not to be parsed as HTML and like this, it is possible for expressions to contain characters like < as in var1 < var2 without being recognized as the beginning of a html tag.

Current behavior

Angular deletes all script tags inside templates, also those with text/plain. I read, that this is because you shouldn't mix JavaScript with Angular Templates, but this is just plain text.

Expected behavior

<script type="text/plain" should not be deleted. It is the only way to integrate text without having to escape all html characters.

Minimal reproduction of the problem with instructions

Insert the following code into a template and see if it will be deleted.

<script type='text/plain'>
If(var1 < var2,
Sum([Field 1])
,
Sum([Field 2])
)
</script>

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

If <script type="text/plain" would not be deleted it is possible to insert everything which is not html without having to escape it. HTML 5 supports it and as far as I know there is no alternative. Also it isn't a security vulnerability.

Environment

Angular version: 6.1.0
Browser:
- [x] Chrome (desktop) version 69
Issue 1:
Firstly, show the code:

km = joblib.load(filename)
cluster_labels = km.predict(X)
silhouette_avg = silhouette_score(X, cluster_labels)
# Compute the silhouette scores for each sample
sample_silhouette_values = silhouette_samples(X, cluster_labels)

‘km’ is the model that I trained using training data. see details:

km = KMeans(n_clusters=num_k, init='k-means++', max_iter=300, n_init=1, verbose=False)
km.fit(X)

When the amount of X less than 30 thousands rows, both of silhouette_score and silhouette_samples are OK and can get expected results. But when the amount of X more than 100 thousands, the program crashed and get "Segmentation fault (core dumped)". See the detail error information:

Traceback (most recent call last):
File "test19_statistic_silhouette_score.py", line 87, in <module> out()
File "test19_statistic_silhouette_score.py", line 63, in out sample_silhouette_values = silhouette_samples(X, cluster_labels)
File "/home/supermicro/.local/lib/python2.7/site-packages/sklearn/metrics/cluster/unsupervised.py", line 153, in silhouette_samples
distances = pairwise_distances(X, metric=metric, **kwds)
File "/home/supermicro/.local/lib/python2.7/site-packages/sklearn/metrics/pairwise.py", line 1112, in pairwise_distances
return _parallel_pairwise(X, Y, func, n_jobs, **kwds)
File "/home/supermicro/.local/lib/python2.7/site-packages/sklearn/metrics/pairwise.py", line 962, in _parallel_pairwise
return func(X, Y, **kwds)
File "/home/supermicro/.local/lib/python2.7/site-packages/sklearn/metrics/pairwise.py", line 207, in euclidean_distances
distances = safe_sparse_dot(X, Y.T, dense_output=True)
File "/home/supermicro/.local/lib/python2.7/site-packages/sklearn/utils/extmath.py", line 178, in safe_sparse_dot
ret = a * b
File "/usr/lib/python2.7/dist-packages/scipy/sparse/base.py", line 303, in __mul__
return self._mul_sparse_matrix(other)
File "/usr/lib/python2.7/dist-packages/scipy/sparse/compressed.py", line 528, in _mul_sparse_matrix
return self.__class__((data,indices,indptr),shape=(M,N))
File "/usr/lib/python2.7/dist-packages/scipy/sparse/compressed.py", line 84, in __init__
self.check_format(full_check=False)
File "/usr/lib/python2.7/dist-packages/scipy/sparse/compressed.py", line 144, in check_format raise ValueError("Last value of index pointer should be less than "
ValueError: Last value of index pointer should be less than the size of index and data arrays
*** Error in `python': munmap_chunk(): invalid pointer: 0x00007f9249d68010 ***
Aborted (core dumped)

Issue 2:
With scikit-learn 0.15.2, numpy 1.9.1, python 2.7.8 (on OS X), the following code segfaults:

import numpy
import sklearn.cluster

numpy.random.seed(1)
X = numpy.random.random((50000, 100))
model = sklearn.cluster.KMeans(n_clusters=3, random_state=1)
model.fit_predict(X)
print sklearn.metrics.silhouette_score(X, model.labels_, metric='euclidean')

Results in:

Segmentation fault: 11

Dropping the rows down to 30000, and the above completes fine. Dropping rows to 40000, and the script takes a very long amount of time, but didn't appear to segfault.
Issue 1:
paramiko has a helper class SSHConfig() which can read in ~/.ssh/config.

This might be helpful if special configuration is done to hop to a second

host, hardcode ports or other special configuration, so that the config does

not need to get duplicated for ansible.

best regards,

Florian La Roche

Issue 2:
Issue Type:

Bug Report

Ansible Version:

Introduced in v2.0.0-0.3.beta1, bug not present in v2.0.0-0.2.alpha2.

Ansible Configuration:

in ansible.cfg, use a directory as inventory

inventory = hosts/

Debian Jessie.

Summary:

I've configured 2 host files in hosts/ directory: hosts/a and hosts/b. Both contains groups, and one host is configured into 2 groups in 2 host files, with one host var for each.

hosts/a :

[groupA]
test datacenter=PA3

hosts/b :

[groupB]
test bay=202

playbook test.yml:

- name: TEST
hosts: test
gather_facts: yes

tasks:
- name: debug
debug: var=hostvars[inventory_hostname].datacenter
ignore_errors: True

- name: debug
debug: var=hostvars[inventory_hostname].bay
ignore_errors: True

With Ansible v1.9 or previous to v2.0.0-0.3.beta1, both host vars are accessible, but since this version only one random host vars (datacenter or bay) is accessible.

Tried with both hash_behaviour merge and replace.

Expected Results:

PLAY [TEST] ********************************************************************

TASK [setup] *******************************************************************
ok: [test]

TASK [debug] *******************************************************************
ok: [test] => {
"changed": false,
"hostvars[inventory_hostname].datacenter": "PA3"
}

TASK [debug] *******************************************************************
ok: [test] => {
"changed": false,
"hostvars[inventory_hostname].bay": "202"
}

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

Actual Results:

PLAY [TEST] ********************************************************************

TASK [setup] *******************************************************************
ok: [test]

TASK [debug] *******************************************************************
ok: [test] => {
"changed": false,
"hostvars[inventory_hostname].datacenter": "PA3"
}

TASK [debug] *******************************************************************
fatal: [test]: FAILED! => {"failed": true, "msg": "ERROR! 'dict object' has no attribute 'bay'"}
...ignoring

PLAY RECAP *********************************************************************
test : ok=3 changed=0 unreachable=0 failed=0
Issue 1:
* Electron version: v0.3.75

Operating system:win7 x64

example:

then i change the html in the span through javascript

when the frame equal true,it's normal,but the frame equal false,then

0,1,2 they are show...

there is another example about form file upload

before select the file :

after select the file:

so,i think it is a bug,and this cause that i can't choose electron to ,plase development

Issue 2:
Found this issue on a project, tested against the electron-quick-start and found the problem still exists.

Simply adding "frame: false" to the new BrowserWindow() call will cause it.

Electron version: 0.37.5

Operating system: Windows
Issue 1:
Code Sample, a copy-pastable example if possible

# Your code here
import pandas as pd
df =pd.read_excel('Financial Sample1.xlsx')
print (df)

Problem description

I have already posted my issue before. The read_excel function is not able to read the excel sheet is only reading a part of the cells which has more than 45 characters in it. for example if the excel cell has the data : " this is github and i am posting an issue here about pandas so i want the solution" then it reads as follows: "his is github and i am posting an issue here about pandas . . . ". so the data in the cells which has lot of characters is getting trimmed.

sample.xlsx.

I am attaching the excel file which i used for extracting data in which many cells have data more than 45 characters.

[this should explain why the current behaviour is a problem and why the expected output is a better solution.]

Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

Note: Many problems can be resolved by simply upgrading pandas to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if master addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on master here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

Expected Output

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]

Issue 2:
we need to make the API's more explicit/consistent.

create_table
delete_table
table_exists

should these be

table_create
table_delete
table_exists

cc @parthea
Issue 1:
This code example

<label [class.has-error]="!username.valid">
<div>Login</div>
<input type="text" ngControl="username" #username="ngForm" class="form-control" placeholder="Login" required/>
</label>

Error: Uncaught (in promise): No provider for ControlContainer! (NgControlName -> ControlContainer)

but when i use

[ngClass]="{'has-error':!username.valid}"

or simply add ngClass

[ngClass] [class.has-error]="!username.valid"

works as expected, but in docs no any word about ngClass requirement

Issue 2:
I've come across a really weird error right after upgrading to Beta 1: Every time I drop a [class.whatever] or any other attribute binding within a nested DOM element wrapped by a ngForm element I get the infamous No provider for ControlContainer! (NgControlName -> ControlContainer) exception.

I've put together a tiny sample component to replicate the error:

import { bootstrap } from 'angular2/platform/browser';
import { Component } from 'angular2/core';
import { FormBuilder, ControlGroup, Control, Validators, FORM_PROVIDERS, FORM_DIRECTIVES } from 'angular2/common';

@Component({
selector: 'test-form',
directives: [FORM_DIRECTIVES],
template: `
<form [ngFormModel]="testForm">
<p *ngIf="!testControl.valid">Form is empty and hence not valid</p>

<!-- This little guy below will make Angular 2 complain -->
<div [class.error]="!testControl.valid">
<input type="text" ngControl="testControl">
</div>

</form>
`
})
class TestForm {
testForm: ControlGroup;
testControl: Control;

constructor(private formBuilder: FormBuilder) {
this.testControl = new Control('', Validators.required);
this.testForm = this.formBuilder.group({
testControl: this.testControl
});
}
}

bootstrap(TestForm, [FORM_PROVIDERS]);

Apparently this only occurs when attaching class or attribute bindings to nested elements. Whenever I bind class names by means of ngClass instead, the issue simply does not occur.
Issue 1:
Challenge Name

Any challenge, both beta and production

Issue Description

The exact same code works in Chrome but not in Firefox. In Firefox, the output just above the tests says that the tests were completed, but tests that had to be run in the iframed phone-view never passes.

According to this message from the console, there's some problem with CSP which prevents some tests from running properly.

Content Security Policy: Directive ‘frame-src’ has been deprecated. Please use directive ‘child-src’ instead.

According to This Stack Overflow-thread, the spec for CSP in iframes is confusing at the moment.

I guess we either should use the, according to the SO-thread above, now deprecated child-src temporarily until Firefox implements the new spec with frame-src again.

Alternatively, we drop firefox support temporarily and hope they fix this soon.

@freeCodeCamp/moderators Any ideas on how to solve this?

Browser Information

Browser Name, Version: Firefox 50.1.0

Operating System: Ubuntu 16.04

Mobile, Desktop, or Tablet: Desktop

Your Code

<style>
h2 {
color: blue;
}
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Screenshot

Notice the error message in the console at the bottom of the screen.

The exact same code works just fine in the latest version of Chrome for Ubuntu 16.04.

Issue 2:
Trying to complete lessons, but code is becoming unmanageable:

flags auto duplicate themselves, so instead of <p> I get <pp>

same with content, hello paragraph becomes hello world hello world

it is undeleteable as every time I move the cursor it repeats again.

Browser Information

Mozilla Firefox for Mobile, Version 44 (I believe)

Android 5.1.1

Your Code

If relevant(it's not)

Screenshot

Edited format for readability ~ @raisedadead
Issue 1:
Problem

I'm trying to create a plot which "zooms in" on a subset of a large dataset (I am plotting the entire dataset because it's much more convenient than clipping the underlying dataset). I can do this pretty easily for the x-axis with ax.set_xlim(), because I know what the x-limits of my data should be. However, I don't know what the y-limits should be, and I can't use ax.set_ymargin() because it computes the y-margin for the entire dataset, not the zoomed portion of the dataset. I don't know ahead of time what the min/max values of my dataset will be, so I'm stuck.

Proposed Solution

Add an option to ax.set_ymargin specifying a subset of the x-data range over which to apply the margin. For example:

ax.set_ymargin(0.1, xlim=(0, 1))

would "zoom in" in y on the portion of the data that exists in the x-range [0, 1], and apply a 10% margin to the data that exists over that range.

Issue 2:
I filed a matplotlib bug report via GitHub: When x-axis limits are overridden via pyplot.xlim, the default y-axis limits may no longer be sensible. If limits are overridden for one axis, new limits should be calculated for the remaining axes. The image at the following URL demonstrates the problem:

http://phillipmfeldman.org/Python/axis_scaling_bug.png

Phillip
Issue 1:
The ReactTransistionGroup assumes that children should be prepended to their siblings when inserted into the parent. I think we should add an optional prop that allows configuration to prepend or append children. I have working code I can submit a pull request I just wanted to make sure I wasn't missing something.

childrenToRender.push(React.cloneElement(
this.props.childFactory(child),
{ref: key, key: key}
));

https://github.com/facebook/react/blob/master/src/addons/transitions/ReactTransitionGroup.js#L215-L218

Issue 2:
In ReactTransitionGroup given a dynamic array of children e.g. first ['A', 'B'] then ['B', 'C'] while ReactTransitionGroup holds on to the exiting DOM nodes we see ['A', 'B', 'C'] in the DOM before done() is called. Then we see ['B', 'C']. This is all fine. However if we then transition to an entirely new array ['D'] in the DOM we see ['D', 'B', 'C'] instead of ['B', 'C', 'D'].

See the following fiddle: https://jsfiddle.net/92he8jge/1/

This seems to be because in ReactTransitionGroup next child mappings are merged with previous child mappings in that order. This is probably fine in most cases but it would be great if we could control the order.

I've got a version of this working locally by adding an appendNextChildMapping prop of type boolean which defaults to false. I'd be happy to turn this into a PR. Or perhaps there is another way to achieve this that I'm missing?

EDIT: Looking at this some more, it's not clear to me if how it currently works is actually intended behaviour.

https://github.com/facebook/react/blob/master/src/addons/transitions/ReactTransitionChildMapping.js#L90

It looks from this comment like it is in fact trying to add the new item after the existing ones but that the object is not preserving intended source order? Is this a bug in the implementation of mergeChildMappings?
Issue 1:
Summary.

When REQUESTS_CA_BUNDLE has been set as an environment variable, the verify property in a requests.Session() will always be ignored.

Expected Result

requests.Session always uses REQUESTS_CA_BUNDLE unless a certificate bundle has been assigned

Actual Result

requests.Session always uses REQUESTS_CA_BUNDLE and overides any certificate bundle set on the Session object.

Reproduction Steps

REQUESTS_CA_BUNDLE="/lib/python3.6/site-packages/pip/_vendor/certifi/cacert.pem"

import requests
s = requests.Session()
s.verify = "/non_existing_bundle"
s.get("https://google.com")

Expected result:

OSError: Could not find a suitable TLS CA certificate bundle, invalid path: /non_existing_bundle

Actual result:

<Response [200]>

System Information

$ python -m requests.help

{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "3.10.0-693.11.6.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}

Not sure if this is a bug, but I now need to unset the environment variable first before I can use a different certificate bundle in a session object or use the following workaround.

sessions.py:

#if verify is True or verify is None:
if verify is True or verify is None and not isinstance(self.verify, str):
verify = (os.environ.get('REQUESTS_CA_BUNDLE') or
os.environ.get('CURL_CA_BUNDLE'))

Issue 2:
One would expect that when the caller explicitly asks to make unverified requests, then the REQUESTS_CA_BUNDLE environment variable doesn't affect it. The reality is different, however.

import os
import requests

os.environ['REQUESTS_CA_BUNDLE'] = 'asd.pem' # Must be an existing file

r = requests.get('https://self-signed.badssl.com/', verify=False)
print(r)
# Prints: <Response [200]>

session = requests.Session()
session.verify = False

r = session.get('https://self-signed.badssl.com/')
print(r)
# Fails: requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
Issue 1:
Challenge Waypoint: Assignment with Minus Equals has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var a = 11;
var b = 9;
var c = 3;

// Only modify code below this line

a -= 6;
b -= 15;
c -= 1;

The code and test is okay, but where the result of the test is shown, c is shown to have a value of '2' instead of just 2, making the result seem like it's a string when it's most definitely a number.

Issue 2:
Thanks to Thad for reporting. His words:

I have a question about the code output area. I'm referring to the area just under the Reset, Help and Bug buttons on the left side of the page at FCC. It seems that there was a change to how that functions in the past few days.

In the past, when it was dictated that an array should show up in the code output area, it was displayed just like an array...["Split", "me", "into", "an", "array"]. Now, since the change a few days ago, it displays like...Split, me, into, an, array. I've attached a screenshot.

Is this the desired output or is it a bug? If it's the desired output, it doesn't seem very useful. If the answer is supposed to be an array, it's reasonable to expect to see an array (not just the array items) displayed there.
Issue 1:
Bug report

Describe the bug

When upgrade to v9.0.7. css-loader throw an API schema error. It won't happens in v9.0.6. Seems minimize has been removed from the options of css-loader (see here)

To Reproduce

yarn upgrade next.js@^9.0.7

yarn dev

Expected behavior

app compiled success

Screenshots

System information

OS: macOS

Browser: chrome

Version of Next.js: 9.0.7

Issue 2:
I did correct by document and I import ./style.scss file in my js file

but i have this error i asked in stackoverflow but i dont get answer

please help me to fix it

package.json

dependencies{

"@zeit/next-sass": "^1.0.1",

"next": "^9.0.6",

"node-sass": "^4.12.0",

"react": "^16.9.0",

"react-dom": "^16.9.0",

}

next.config.js

const withSass = require('@zeit/next-sass')
module.exports = withSass({
/* config options here */
})
Issue 1:
Hi, allow me to ask for a question about Tensorflow feature:

Firstly, I uses the nearly-latest Tensorflow version v1.10 and the system has NCCL 2.0 installed.

As is known that NCCL 2.0 has already supported Cross-Node multiple GPU training with fully NCCL management, but I found that Tensorflow benchmark script doesn't support NCCL in Tensorflow distributed mode, and it said NCCL mode is only allowed and designed for in single-node mode, so I don't know whether it is not supported by Tensorflow engine, or just not supported by the Tensorflow benchmark script? If it is just not implemented by the Tensorflow benchmark script, is there documentation or example to enable Distributed Tensorflow to use NCCL 2.0 to manage cross-node Multi GPUs? Thanks.

The official Tensorflow benchmark:

https://github.com/tensorflow/benchmarks

Issue 2:
I have built tensorflow from scratch for the Knights Landing and it seems to give only 4-5images/sec. Can someone give a procedure to run these standard benchmarks?