WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report

Bug summary

The horizontalalignment keyword in suptitle() produces title alignment which is opposite to what I expect from it. Setting horizontalalignment='left' puts the alignment right, and vice versa.

Code for reproduction

import matplotlib.pyplot as plt

for direction in ['left', 'center', 'right']:
fig = plt.figure()
fig.suptitle('This is a test title', horizontalalignment=direction)
plt.subplot(1,1,1)
plt.plot(range(5),range(5))
plt.savefig('halign-' + direction + '.png')

Actual outcome

horizontalalignment='left':

horizontalalignment='center':

horizontalalignment='right':

Expected outcome

horizontalalignment='left':

horizontalalignment='center':

horizontalalignment='right':

Matplotlib version

Operating system: Tested on OpenBSD (6.6) and Void Linux (x86_64, glibc)

Matplotlib version: Tested on 2.2.4, 3.1.0, 3.1.1, 3.1.2

Matplotlib backend (print(matplotlib.get_backend())): GTK3Agg and agg

Python version: Tested on 3.7.4 and 3.6.9

Jupyter version (if applicable): N/A

Other libraries: N/A

Matplotlib and Python are installed through the Void linux and OpenBSD distribution packages.

Issue 2:
Bug report

Bug summary

horizontalalignment = 'left' aligns the title on the right, horizontalalignment = 'right' aligns a short title on the left, horizontalalignment = 'right' displaces a longer title on the far left

Code for reproduction

# Left alignment test, short title
fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle should be on the left', horizontalalignment = 'left')
ax.set_title('This axis title should be on the left', loc='left');
fig.savefig('left_align.png')

# Right alignment test, short title
fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle should be on the right', horizontalalignment = 'right')
ax.set_title('This axis title should be on the right', loc='right');
fig.savefig('right_align.png')

# Right alignment test, longer title
fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle should be on the right but it is far left', horizontalalignment = 'right')
ax.set_title('This axis title should be on the left', loc='left')
fig.savefig('far_left.png');

Actual outcome

Left alignment test, short title

Right alignment test, short title

Right alignment test, longer title

Expected outcome

The following code manually sets the figure title at the expected position:

fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle is long but it is manually positioned', x = 0.38)
ax.set_title('This axis title should be on the left', loc='left')
fig.savefig('manual_pos.png');

Which gives:

Matplotlib version

Operating system: Windows

Matplotlib version: 2.1.2 and 2.2.3

Matplotlib backend: agg

Python version: 3.6.4

Jupyter version: 4.4.0
Issue 1:
Bug Report

Current Behavior

x += y doesn't evaluate the x value before awaiting.

Input Code

let x = 0;
async function test() {
x += await 1;
console.log(x);
}
test();
x += 1;

Expected behavior/code

1 should be logged.

However, 2 is being logged.

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

Preset 2015 and 2017.

Environment

The website.

Possible Solution

Convert x += await y into x = x + await y as a first step.

Additional context/Screenshots

Issue 2:
Input Code

result = { __proto__: x, __proto__: y } = value;

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

presets - latest

Expected Behavior

No error

Current Behavior

Error: Redefinition of __proto__ property

Possible Solution

Context

Your Environment

software
version

Babel

node

npm

Operating System
Issue 1:
Any plan about DOMParser? right now I've to switch back to Node.js and using jsdom.

I've seen DOM feature request in the Issues column and someone said might release on v1.0?

Issue 2:
It would be pretty awesome if I could use Deno for parsing, transforming, and serializing XML without a third-party module, just like I can in the browser:

https://gistpreview.github.io/?a27f7e83972e7af2aa0edbb242ae8ef7

https://gist.github.com/MarkTiedemann/a27f7e83972e7af2aa0edbb242ae8ef7
Issue 1:
from mailing list

Hi,

I'm using pandas to read in a set of tab delimited files into DataFrames. Each file has only 3-5 columns and roughly 20,000 rows. The files have a column that I'd like to index by, but some of the entries are duplicates. I find that it takes roughly 5 seconds to read a set of three such files into memory, drop duplicates, and index using "read_table". I.e. to do:

dict_of_dfs = {}
for filename in three_filenames:
df = pandas.read_table(filename, sep="\t")
# drop duplicates: use "entry_id" field
df = df.drop_duplicates("entry_id")
df = df.set_index("entry_id")
dict_of_dfs[filename] = df

So to do the above loop body three times takes 5 seconds, which seems slow to me, unless I am missing something. I'm wondering if this is the expected performance for dataframes of this size, or if I'm misusing something. It seems like IO should not be a bottleneck with files that are this small (keep in mind the max number of entries is less than 30k).

Any advice on how to optimize this would be greatly appreciated! Thanks.

Issue 2:
Code Sample, a copy-pastable example if possible

o = pd.Series(['test', np.nan, np.nan])
print 'Original has dupes: ', o.duplicated().any()

# Save and reload via msgpack
o.to_msgpack('/tmp/test.msgpack')
r = pd.read_msgpack('/tmp/test.msgpack')

print 'Reloaded has dupes: ', r.duplicated().any()

pd.testing.assert_series_equal(o, r)
print o.duplicated()
print r.duplicated()

Problem description

Current output:

Original has dupes: True
Reloaded has dupes: False
0 False
1 False
2 True
dtype: bool
0 False
1 False
2 False
dtype: bool

The series correctly has duplicates before sending to messagepack. Afterwards, the duplicated NaNs are not considered duplicates for some reason.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.6.final.0

python-bits: 64

OS: Linux

OS-release: 4.9.0-6-amd64

machine: x86_64

processor:

byteorder: little

LC_ALL: en_US.UTF-8

LANG: en_US.UTF-8

LOCALE: None.None

pandas: 0.22.0

pytest: None

pip: None

setuptools: None

Cython: None

numpy: 1.13.3

scipy: 1.0.0

pyarrow: None

xarray: None

IPython: 2.0.0

sphinx: None

patsy: None

dateutil: 2.6.0

pytz: 2018.5

blosc: None

bottleneck: None

tables: None

numexpr: 2.5

feather: None

matplotlib: 1.5.2

openpyxl: None

xlrd: 0.9.3

xlwt: None

xlsxwriter: None

lxml: 3.4.4

bs4: None

html5lib: 1.0b8

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.8

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: 0.2.0
Issue 1:
Related to #1029.

It would be useful if we can get total number of unique terms for a particular facet.

One use case is that we store "id" to a field. If we get number of unique terms on the field, we know how many duplicates are included in result set.

Issue 2:
Hi all,

I'd like to ask for 2 features for the terms facet that sound not too difficult to implement to me:

Adding a count / total field to the result of a terms facet, that gives the number of different terms the facet returns. For the moment I ask for maxint results to be sure I have the correct number...

Adding something equivalent to the from / size of the query DSL. It would really help me to be able to say that I want results from 1000, with a size of 50, instead of saying I want the 1050 firsts and then have to use only the last 50 client-side.

Please tell me if this is not clear.

Thanks for your great work, we really enjoy ElasticSearch here at Mozilla!

Adrian
Issue 1:
Please make sure that the boxes below are checked before you submit your issue.

If your issue is an implementation question, please ask your question on StackOverflow or on the Keras Slack channel instead of opening a GitHub issue.

Thank you!

Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

Check that your version of TensorFlow is up-to-date. The installation instructions can be found here.

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

Issue 2:
Please make sure that the boxes below are checked before you submit your issue.

If your issue is an implementation question, please ask your question on StackOverflow or on the Keras Slack channel instead of opening a GitHub issue.

Thank you!

Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

Check that your version of TensorFlow is up-to-date. The installation instructions can be found here.

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).
Issue 1:

Issue 2:
Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.4.2382.0

Any other software? wsl + emacs

Steps to reproduce

Open emacs within wsl in Windows Terminal.

Type either of the following:

M-> (alt + greater than) to move to the end of the file

M-< (alt + less than) to move to the beginning of the file

Verify the key emacs is seeing, by typing C-h k (Ctrl+h, k) for describe key - then type either of the above key combinations.

Expected behavior

M-> moves to the end of the file.

M-< moves to the beginning of the file.

C-h k M-> displays M-> as the command run.

C-h k M-< displays M-< as the command run.

Actual behavior

M-> does not move to the end of the file.

M-< does not move to the beginning of the file.

C-h k M-> displays M-. as the command run.

C-h k M-< displays M-, as the command run.
Issue 1:
I'm submitting a ... (check one with "x")

[x ] bug report
[ ] 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

Consider this template:

<form [formGroup]="form">
<input type="text" formControlName="control"/>
<input type="text" formControlName="control"/>
...

I have 2 inputs bound to the same FormControl.

I'm not using ngModel input of formControlName directive.

When I enter something in one control, another control is not updated and debugging shows that

viewModel property of the second FormControlName is never updated.

I suppose this happens because viewModel is updated only when ngModel is changed

https://github.com/angular/angular/blob/master/modules/%40angular/forms/src/directives/reactive_directives/form_control_directive.ts#L98

and not when control.valueChanges fires.

Expected/desired behavior

Expected both inputs to always have the same value.

Reproduction of the problem

http://plnkr.co/edit/g7P37ipoQXc9Pe0hDgOy

Issue 2:
Hey guys,

I just updated to angular/compiler 2.2.4 and my ngc is no longer creating my application ngFactory files in the specified outGen folder. The last working version of angular/compiler on my stack was 2.1.2. I'm currently on node 6.9.1 and angular 2.2.4. You can check out my stack here and follow the instructions below to reproduce the process

Thanks in advance!

JT

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] 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

initial angular/compiler compilation; app.module.ngFactory file not being created

Expected behavior

app.module.ngFactory file would be created along with component factories

Minimal reproduction of the problem with instructions

clone https://github.com/projectSHAI/GOAT-stack

run commands

npm install

gulp prod

ngc-aot folder should have node_module factories and app factories

app factories missing!!

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

cannot compile AoT

Please tell us about your environment:

MEAN stack

Angular version: 2.2.4

Browser: [all]

(not a dom issue)

Language: [TypeScript 2.1.1]

Node (for AoT issues): node --version = 6.9.1
Issue 1:
Deno panics when running deno run --v8-flags=--disallow-code-generation-from-strings index.ts

index.ts:

console.log("Hello World!");

The error:

Platform: windows x86_64
Version: 1.29.2
Args: ["deno", "run", "--v8-flags=--disallow-code-generation-from-strings", "TestFlags.ts"]

thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context
at new Function (<anonymous>)
at genAsyncOp (deno:core/01_core.js:176:14)
at Object.initializeAsyncOps (deno:core/01_core.js:220:19)
at Object.bootstrapMainRuntime [as mainRuntime] (deno:runtime/js/99_main.js:398:10)
at [deno:runtime\worker.rs:327:24]:1:11', runtime\worker.rs:328:8

Issue 2:
Me and at least one other using Netlify edge functions are seeing

thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context

I tried downgrading to 1.27.0 and the panic went away.

More info here
Issue 1:
Currently (pending #8287), libextra will have the following encodings

json

ebml

base64

hex

And in theory we should add these in the future:

xml

base32

ASN.1

(or at least those are the ones I could think of off the top of my head). Right now they're all placed directly inside the libextra folder, but they would probably benefit from a better organization scheme.

Currently all of the "encodings" can generally fall into two categories. One is "bytes to strings and back" and the other is a "generic serialization format".

Right now I believe that the "generic serialization format" is captured nicely via the serialize::{Encoder, Decoder} traits, and it unifies json/ebml. @omasanori has brought up concerns about the naming scheme, and my proposal below might alleviate these concerns.

Otherwise, the "bytes to strings and back" type of encoding isn't very well unified at this point. There should be a trait (in possibly a new extra::encoding module) which unifies base64/base32/hex and whatever else we come across. In my opinion, the trait should look like:

trait Text {
fn encode(&[u8]) -> ~str;
fn decode(&str) -> ~[u8];
}

This makes it clear what the "encode" procedure is and what the "decode" procedure is. Additionally, it's explicitly clear that bytes live on one side, and strings live on the other, there's no intermingling between the two of them.

Finally, I think we should move everything around into:

extra::encoding::base64

extra::encoding::base32

extra::encoding::hex

extra::encoding::json

extra::encoding::ebml

And then encoding/mod.rs would define the traits

Text (is the name too short? if you reference it by encoding::Text I think it's clear but that's not always guaranteed)

Serializer (serialize::Encoder today)

Deserializer (serialize::Decoder today)

What do others think about this? If this looks good, I'd be more than happy to reorganize everything!

Issue 2:
So, I have the following

mod tokenizer {

#[test]
fn test_tokenize_one() {
//Numbers
let string = ~"1";
let string = ~"321";

//Strings
let string = ~"'This is a string'";

//Operators
let string = ~"⍒";
let string = ~"÷";

//Comments
let string = ~"⍝";
let string = ~"⍝ lol";

//Function definition
let string = ~"∇Function";

//Close function
let string = ~"∇";

//Endlines
let string = ~"\n";

//Variables
let string = ~"⍙var";
let string = ~"∆var";
let string = ~"var";
}
}

And for some reason, on both my OSX build of Incoming, and my on my Ubuntu build of it, I get an error:

rust: task failed at 'Assertion bpos == mbc.pos || bpos.to_uint() >= mbc.pos.to_uint() + mbc.bytes failed', /home/tony/Projects/rust/src/libsyntax/codemap.rs:500

When I start using the variables (such as sticking Print statements after each definition of it) it compiles fine. Taking out the weird APL symbols that my interpreter is going to be testing also fixes it.

Is there an issue with having too many unused instances of a variable? Or with trouble with (super obscure) Unicode glyphs?
Issue 1:
The documentation (components) states that the style for small pagination is 'pagination-sm' when in fact it is 'pagination-small'. Also, 'pagination-lg' is actually 'pagination-large' in bootstrap.css.

Issue 2:
To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.
Issue 1:
When using the DecisionTreeClassifier() sample_weight parameter, and weighting examples by class lable such as 2:1 for class A versus class B, the nvalues in the leaves of the tree produced by tree.export_graphviz() shows a duplicate count for the number of examples for the weighted class.

This is misleading because the sum of each classes nvalues should equal the total number of examples in the parent node. It seems that there is a bug where the feature weighting factor is not removed when exporting the decision tree.

Here is the classifier with weighting:

clf = tree.DecisionTreeClassifier(
criterion='gini', splitter='best', max_leaf_nodes=10,
min_samples_split=10, min_samples_leaf=2, max_features=None,
random_state=None).fit(X, y, sample_weight=df.LABEL.map({'A':2, 'B':1}))

Here is the produced tree.dot file with the duplicate values shown in bold:

digraph Tree {

0 [label="X[106] <= 0.0203\ngini = 0.0731494237327\nsamples = 119377", shape="box"] ;

1 [label="X[34] <= 1266.6650\ngini = 0.0661567536396\nsamples = 118307", shape="box"] ;

0 -> 1 ;

3 [label="gini = 0.0578\nsamples = 111941\nvalue = [ 210926. 6478.]", shape="box"] ;

1 -> 3 ;

4 [label="gini = 0.2103\nsamples = 6366\nvalue = [ 10016. 1358.]", shape="box"] ;

1 -> 4 ;

2 [label="X[83] <= 6728.4551\ngini = 0.386307949063\nsamples = 1070", shape="box"] ;

0 -> 2 ;

5 [label="gini = 0.4994\nsamples = 364\nvalue = [ 254. 237.]", shape="box"] ;

2 -> 5 ;

6 [label="gini = 0.1669\nsamples = 706\nvalue = [ 68. 672.]", shape="box"] ;

2 -> 6 ;

}

Here is what the tree looks like with duplicate leaf example counts for the weighted class:

Issue 2:
@jmetzen thank you for contributing the new Gaussian Process module, it is really helpful! I wondered if it is possible to specify the input dimension(s) each kernel should be applied to? For example, if my input is 3-dimensional and I would like a kernel setup like this:

kernel = rational quadratic kernel on input dimension 2
* RBF kernel on input dimension 3
+ periodic kernel on input dimensions 1 and 2

Could this be achieved with the current state of the API?
Issue 1:
For example

> touch empty
> kubectl rolling-update rcname -f empty

panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x19dca80, 0xc82000e0d0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
k8s.io/kubernetes/pkg/kubectl/cmd.RunRollingUpdate(0xc8204c6200, 0x7fda65fb6198, 0xc820090008, 0xc820324800, 0xc8200a4690, 0x1, 0x5, 0xc82029f380, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/rollingupdate.go:220 +0x46ee
k8s.io/kubernetes/pkg/kubectl/cmd.NewCmdRollingUpdate.func1(0xc820324800, 0xc8200a4690, 0x1, 0x5)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/rollingupdate.go:86 +0x7d
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc820324800, 0xc8200a4640, 0x5, 0x5, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:565 +0x85a
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc8200d2000, 0xc820324800, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:651 +0x55c
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc8200d2000, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:610 +0x2d
k8s.io/kubernetes/cmd/kubectl/app.Run(0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/app/kubectl.go:32 +0xf0
main.main()
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/kubectl.go:28 +0x28

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/33587/kubernetes-pull-test-unit-integration/47348/

panic: interface conversion: interface is nil, not *v1.Secret
/usr/local/go/src/runtime/panic.go:481 +0x3ff
/usr/local/go/src/testing/testing.go:467 +0x22a
/usr/local/go/src/runtime/panic.go:443 +0x521
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go:139 +0x70
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go:104 +0x194f
/usr/local/go/src/testing/testing.go:473 +0xdd
/usr/local/go/src/testing/testing.go:582 +0xae3

@kubernetes/sig-cluster-federation
Issue 1:
Date filter is not working on iPhone version of chrome (49.0.2623.73) and safari, it's working on desktop chrome (48.0.2564.116)

Last swipe:{{last | date:'dd MM yyyy'}} Expiry:{{expiry | date:'dd MM yyyy'}}

Issue 2:
Note: This is a duplication of a stackoverflow question i asked a few weeks ago without any answer.

I don't know if it's related to a bug or if it's the desired behavior.

As i did not find answer on stackoverflow, i thought it's was the only place left to find one.

I'm writing a custom validator for a custom form component.

Right now, i can inject dependencies in my custom validator such as services...

But i need to have access from within the validator to informations stored in the Component...

So i'm trying to inject the component in the Validator class, but this does not work..

Maybe i'm missing something with DI ?

Look at this plunker here

When you open it, everything should work fine.

Uncomment everything in the validator constructor, like this:

constructor( private test: TestService, private component: CustomFormControlComponent ) {
test.serviceMethod();
component.componentMethod();
}

And check the log output to see that DI failed to resolve the second parameter ...

Any idea why ?

Thanks a lot !
Issue 1:
According to the docs: https://github.com/atom/atom-shell/blob/master/docs/api/screen.md you can access the primary display but they don't mention anything about managing other screens.

Basically I want to load two BrowserWindows and tell them to appear on the different screens (when a user has more than one screen available).

In Adobe AIR I did something like:

var largestScreen = null;

if(air.Screen.screens.length > 1) {

for( index = 0; index < air.Screen.screens.length; ++index) {
var currentScreen = air.Screen.screens[index];
if( largestScreen == null ){
largestScreen = currentScreen;
}
else{
//Defining largest screen as biggest total area.
var currentArea = currentScreen.bounds.width * currentScreen.bounds.height;
var largestArea = largestScreen.bounds.width * largestScreen.bounds.height;
if(currentArea > largestArea) {
largestScreen = currentScreen;
}
}
}

} else {

// Show error that you need a projector screen
alert('You need more than one screen to run this application.');

}

And then I could target a window bounds for the windows.

Is it possible to achieve something similar in atom-shell?

Issue 2:
It's more and more common to find desktops with two or even three screens. Make Atom Shell be able to detect such cases and allow the developer to show the app in a certain screen.