WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hi!

I have the following plotting code:

for idx, signal in enumerate(LIST_OF_SIGNALS):
df_ftrs_tmp = df_ftrs.copy()
df_ftrs_tmp.index = encode_meta(df_ftrs_tmp)
df_ftrs_tmp = df_ftrs_tmp.filter(like=signal)

for df_tmp_idx, df_tmp in df_ftrs_tmp.iterrows():
label = decode_meta(df_tmp_idx)

axes[idx].errorbar(
list(range(5)),
df_tmp.filter(like='[median]'),
yerr=df_tmp.filter(like='[std]'),
capsize=3, marker='o',
color=colors[df_tmp_idx], label='txt{}'.format(df_tmp_idx))

The issue is when I'm trying to generate plots this way, legend gets 2 records for each df_tmp_idx.

If I cast as_matrix() on vectors (y and yerr) before plotting, everything works as expected.

So, I suppose the Name-field of dataframe row (df_tmp in this case) is being processed in any case and not correctly overwritten by label=... casting.

Here are the pictures representing issue:

Returned by example above:

Returned by example with .as_matrix() applied on vectors:

Sorry for poorly prepared example, will rework it soon.

Issue 2:
When I make an errorbar plot from pandas Series, the names of the series appear twice in the legend. Once as a solid line, and once as a solid line with error bars. Explicitly setting the label argument replaces the label text for the solid line with errorbars.

%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.DataFrame(data = np.random.rand(10,3),index=pd.Series(np.arange(0,20,2),name="number"),columns="A B C".split())
plt.errorbar(df.index,df.A,df.B)
plt.legend()
Issue 1:
While viewing the component demos on the website chrome shows ink effects when pressing button and such but firefox does not

Issue 2:
I am using Firefox 45 on Linux, and the demo app at http://www.material-ui.com/#/customization/themes (version 0.14.4) shows that the ripple effect works well for everything but the buttons.

That includes the Tab headers, which I suspect are buttons as well.

The problem is present with alphas for 0.15 as well
Issue 1:
$form->add('postage_option', 'entity', array(
'class' => 'AcmeBundle:PostageOption',
'property' => 'name',
'multiple' => false,
'expanded' => true
));

Template:

{% for option in form.postage_option %}

<div>
{{ dump(option.vars.data) }}
{{ form_widget(option) }}
</div>

{% endfor %}

The dump returns false, what is wrong with this?

Using Symfony 2.2

Issue 2:
Hi

We're experiencing a problem that we have workarounded but would like to know if this is an expected behavior. We're using Symfony 2.1.4.

We have a controller action with defaults: {"_format" => "json"} that makes a sub-request to another controller action also with same defaults: {"_format" => "json"}.

The thing is that when the subrequest is done, in the second action we're receiving a "format" => "html" (which i guess is some kind of fallback) and of course, the controller returns json format, not html

We've workarounded it with

$this->forward('Controller:whatever', array('_format' => 'json')) and this way, the subrequest returns a json

After some investigation, we've seen that inside HttpFoundation/Request.php -> duplicate

$dup->format is set to null

So it seems that it is reset when duplicated

Is this a bug or an expected behavior? (and what I am calling workaround is the proper way to go)

We expected the subrequest to be called with the format from the master request, but maybe we're wrong

Any thoughts and replies will be much appreciated
Issue 1:
We currently have two jsx modes, preserve and react. Using preserve leaves the <Something /> for an additional compilation step, and react ties you into using the React library. I want to propose a compiler option which allows you to define the emitted types. For example setting:

"jsx": {createElement: "el"}

Which would transform this code:

let test = <div><span /><span /></div>;

Into this result:

var test = el("div", null, el("span", null), el("span", null));

Essentially, replacing React.createElement with el. Now I can define an el function like:

(name: string, properties: {[key: string]: string}, ...children: MyElement[]) => MyElement

To implement an own library. Why? Because some of us don't like being forced into using React, and this would allow us to either create our own libraries or use an existing DSL such as virtual-hyperscript (perhaps with some minor modifications there).

Issue 2:
Seems like Babel supports other JSX factories other than React.createElement(...):

Here is docs from deku another JSX framework from Segment.io

Using .babelrc:

{
"jsxPragma": "element"
}

Source: https://github.com/dekujs/deku/blob/master/docs/guides/jsx.md#babelrc

I propose we add something similar to the TS compiler options. Letting people to do a post build of preserved JSX element is not the nicest solution.
Issue 1:
In the "Waypoint: Iterate with JavaScript While Loops" you're told to use a for loop.

This is what the text says:

"Let's try getting a for loop to work by pushing values to an array."

It should be:

"Let's try getting a while loop to work by pushing values to an array."

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops has an issue.

Text reads, "Let's try getting a for loop to work by pushing values to an array." It should instead read, "Let's try getting a while loop to work by pushing values to an array."
Issue 1:
Electron version: ^1.4.1

Operating system: Linux (ubuntu 16.04 gnome, kde ). 2 monitors

Expected behavior

When using 2 monitors, On Windows or macOS, the window of app started is centered

Actual behavior

When using 2 monitors, on Linux, window is not centered

How to reproduce

run https://github.com/electron/electron-quick-start

So this is basic problem. Another interesting thing:

if I change mainWindow = new BrowserWindow({width: 800, height: 600}) to mainWindow = new BrowserWindow({width: 800, height: 600, center: true}) It has no effect. Window position is same.

If I do however

mainWindow.webContents.on('did-finish-load', () => {
mainWindow.center()
})

the window will be moved one half on one monitor, second half at the other monitor , after the did-finish-load.

Issue 2:
When you have multi monitor set-up and you start BrowserWindow with option center:

new BrowserWindow({width: 800, height: 600, center: true});

The new window is opened in the center of all the monitors, instead of the center of primary one. Basically it counts width of all monitors and put the window in the center of it.

OS: Linux only.

Windows, OS X are fine ( window is opened in the center of main monitor)

Tested with: Electron 0.35.0, Ubuntu 14.04, Linux Mint 17.2

This is pretty annoying when you are showing just a little window.

Thanks
Issue 1:
Using pandas 0.13.1

I have a dataframe with three columns. The first two contain datetimes and the third floats (the entire data frame originates from df = pandas.io.sql.frame_query(...,...) ).

I need to remove rows for which dates in the first two columns are duplicated. So something like the following would seem to be appropriate:

df = df.groupby(['col1','col2']).first()
df.reset_index(inplace = True)

However, this doesn't work: it executes without error, but returns df unmodified.

I can get the functionality I need by first converting the datetimes to strings:

df['col1'] = [date.strftime('%Y-%m-%d') for date in df['col1']]
df['col2'] = [date.strftime('%Y-%m-%d') for date in df['col2']]

Only after this, it seems, do the original commands work:

df = df.groupby(['col1','col2']).first()
df.reset_index(inplace = True)

Then to get back to the dataframe format I need, I have to revert back to datetimes:

df['col1'] = to_datetime(df['col1'])
df['col2'] = to_datetime(df['col2'])

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

from StringIO import StringIO
import pandas as pd
import numpy as np

data = "some_id,other_id,some_int\n1,234,0\n2,324,1"
dtypes = {'some_id': np.uint32, 'other_id': np.uint32, 'some_int': np.int8}
train = pd.read_csv(StringIO(data), dtype=dtypes)

print(train.dtypes) # dtypes is respected
grouped = train.groupby('some_id').some_int.agg(['sum'])
print(grouped.index.dtype) # dtype('int64')

Problem description

I am explicitly asking for uint32 but pandas coerces "some_id" column to int64 after using groupby. Is this intended? Possible duplicate of #14423 ?

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-57-generic
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: 8.1.2

setuptools: 27.2.0

Cython: 0.24.1

numpy: 1.11.1

scipy: 0.18.1

statsmodels: 0.6.1

xarray: None

IPython: 5.1.0

sphinx: 1.4.6

patsy: 0.4.1

dateutil: 2.5.3

pytz: 2016.6.1

blosc: None

bottleneck: 1.1.0

tables: 3.2.3.1

numexpr: 2.6.1

matplotlib: 1.5.3

openpyxl: 2.3.2

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.3

lxml: 3.6.4

bs4: 4.5.1

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: 1.0.13

pymysql: None

psycopg2: None

jinja2: 2.8

boto: 2.42.0

pandas_datareader: None
Issue 1:
I recently updated to the new version of code (0.10.10) on OS X, and I was asked to remove an existing code alias I had set up in bash. I did so by modifying my .bashrc and then allowed code to apply its own. But the new one doesn't work after restarting code and bash:

$ code
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

Issue 2:
Just installed 0.10.10 and installed the code shell command:

$ code --help
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

VS Code itself works fine if I launch it via Spotlight.

I believe the problem is that I had a Python virtual environment active, and python points to Python 3. If I try code outside of that virtualenv, where python means Python 2, everything works fine.

I guess the options are:

Make the launch script Python 2/3 compatible. (Step one would probably be to add from __future__ import print_function and update the print statements accordingly.)

Do some extra work to guarantee that you launch the system Python and not the user's configured Python, though this is probably not a viable long-term approach since distributions like Fedora now default to Python 3 and don't even install Python 2 by default.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.5-SNAPSHOT

Operating System version: macos

Java version: 1.8.0_131

Steps to reproduce this issue

We could run the following UT, then we could find the issue:

ApplicationConfig application = new ApplicationConfig("provider");

ServiceConfig<DemoService> service = new ServiceConfig<DemoService>();
service.setProtocol(new ProtocolConfig("dubbo", 20880));
service.setRegistry(new RegistryConfig(RegistryConfig.NO_AVAILABLE));
service.setInterface(DemoService.class);
service.setRef(new DemoServiceImpl());

ConsumerConfig consumer = new ConsumerConfig();
consumer.setLazy(true);

ReferenceConfig<DemoService> reference = new ReferenceConfig<DemoService>();
reference.setConsumer(consumer);
reference.setRegistry(new RegistryConfig(RegistryConfig.NO_AVAILABLE));
reference.setInterface(DemoService.class);
reference.setUrl("dubbo://" + NetUtils.getLocalHost() + ":20880?" + DemoService.class.getName());

DubboBootstrap bootstrap = DubboBootstrap.getInstance()
.application(application)
.service(service)
.reference(reference)
.start();

Assert.assertEquals("true", reference.toUrls().get(0).getParameter("lazy"));

Expected Result

Expected "lazy" : true

Actual Result

Actual "lazy": false

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.0

Operating System version: macOS Sierra 10.12

Java version: 1.8.0_111

Steps to reproduce this issue

start provider and specific async as true, <dubbo:service interface="" async="true">

start consumer without async specific.

send a request

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

We are able to get the value from the CompletableFuture.

service.sayHello(input);

CompletableFuture future = RpcContext.getContext().getCompletableFuture();

future.whenComplete((retValue, error) -> {

System.out.println(retValue);

});

Actual Result

What actually happens?

It throws NPE exception as following, as we are not able to get the future.

Exception in thread "main" java.lang.NullPointerException

With investigation, it's an issue in RegistryDirectory.

Also, we are able to get async=true from providerUrl, but the querymap's async is false from consumer side. It changed the async from true to false, and caused the issue.

private URL mergeUrl(URL providerUrl) {

providerUrl = ClusterUtils.mergeUrl(providerUrl, queryMap);

}

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
Summary of the new feature/enhancement

It would be a nice feature to exclude some programs to show up in the list. To give you a concrete case, I write "steam" and two applications with the same name appear. The first one doesn't seem to work, but the second one works.

Proposed technical implementation details (optional)

The main idea is to have some "remove from search" button that will never show again that result.

Or to show it in a separate "show more (x) hidden results" list.

Sorry if I didn't explain it very well. I hope you got the idea.

Issue 2:
Summary of the new feature/enhancement

The run command would be truly ubiquitous if it translated URLs to an action to open the user's default browser.

'www.microsoft.com' should navigate to https://www.microsoft.com. Entries which start with www denote a url. Assume navigation with the https protocol.
Issue 1:
A require hook, when installed, will hook into the require-function, replace the current functionality, to make TypeScript compiler transpile files on-the-fly (through Node.js) when required.

Should be configurable.

Babel (formerly e6to5) has this feature: https://babeljs.io/docs/usage/require/

Required for a Node CLI #2231.

Issue 2:
Proposal

You simply do require('typescript').register() and then all require calls e.g. var foo = require('./foo') would load foo.ts if foo.js/json/etc are not found.

This would mean we would compile in-memory and completely skip all type checking and do a fast emit. This would however greatly help increase .ts adaption IMHO.

Currently there is a userland maintained : https://github.com/TypeStrong/ts-node

Motivation

CoffeeScript supports this via require('coffee-script').register(); (synonym for require('coffee-script/register');) so that once you call this function it patches require to support .coffee files.

E.g.

Atom does this for coffee : here and here

Grunt does this here

The implementation for coffeescript can be found here : http://coffeescript.org/documentation/docs/register.html

Where in typescript

This can potentially be done in an external NPM package, but:

having it officially support would enhance adaption.

give better statistics for typescript npm package as users would start requireing typescript (coffeescript downloads https://www.npmjs.com/package/coffee-script)
Issue 1:
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.):

openstack swift

openstack swift_server_url

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

BUG REPORT

Kubernetes version (use kubectl version):

v1.4.3

Environment:

Cloud provider or hardware configuration:

OVH / OpenStack

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

NAME="Ubuntu"

VERSION="16.04.1 LTS (Xenial Xerus)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 16.04.1 LTS"

VERSION_ID="16.04"

HOME_URL="http://www.ubuntu.com/"

SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

UBUNTU_CODENAME=xenial

Kernel (e.g. uname -a):

Linux my-laptop 4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Install tools:

Others:

What happened:

Running ./cluster/kube-up.sh raises an error with:

usage: openstack stack create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--noindent]
[--prefix PREFIX] [-e <environment>]
[--timeout <timeout>] [--pre-create <resource>]
[--enable-rollback] [--parameter <key=value>]
[--parameter-file <key=file>] [--wait]
[--tags <tag1,tag2...>] [--dry-run] -t
<template>
<stack-name>
openstack stack create: error: unrecognized arguments: https://storage.sbg1.cloud.ovh.net/v1/AUTH_123456789/kubernetes/kubernetes-salt.tar.gz https://storage.bhs1.cloud.ovh.net/v1/AUTH_123456789 https://storage.sbg1.cloud.ovh.net/v1/AUTH_123456789/kubernetes/kubernetes-server.tar.gz KubernetesStack

What you expected to happen:

The command to succeed!

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

You probably need a setup on OVH which is not very minimal…However see below.

Anything else do we need to know:

I've investigated a bit and found that the bug came from cluster/openstack-heat/util.sh trying to automatically detect swift url as it wasn't specified. For that it uses the command openstack catalog show object-store which, in my case, returns three results. I think a simple fix would be to only get the first one by piping head -n 1

SWIFT_SERVER_URL=$(openstack catalog show object-store --format value | egrep -o "publicURL: (.+)$" | cut -d" " -f2 | head -n 1)

If that sounds good to you, I'll send a PR.

Issue 2:
We have a number of tests which randomize values for API types, and each of them has their own table of functions for "special types" that have limited valid values.

pkg/api/serialization_test.go

pkg/api/validation/schema_test.go

pkg/api/latest/latest_test.go

These should all get folded together.
Issue 1:
The format macros seem to be having some trouble parsing an argument that contains super :: and self :: paths, where the white space is significant. Here's an example:

fn bar() -> int { 5 }

mod foo {
pub fn foo1() { let _ = format!("{}", super :: bar()); }
pub fn foo2() { println!("{}", super :: bar()); }
pub fn foo3() { panic!("{}", super :: bar()); }
pub fn foo4() { 5 }
pub fn foo5() { panic!("{}", self :: foo4()); }
}

fn main() {
foo::foo1();
foo::foo2();
foo::foo3();
println!("{}", foo :: foo4())
}

Errors with:

test.rs:4:43: 4:48 error: expected identifier, found keyword `super`
test.rs:4 pub fn foo1() { let _ = format!("{}", super :: bar()); }
^~~~~
test.rs:5:36: 5:41 error: expected identifier, found keyword `super`
test.rs:5 pub fn foo2() { println!("{}", super :: bar()); }
^~~~~
test.rs:6:34: 6:39 error: expected identifier, found keyword `super`
test.rs:6 pub fn foo3() { panic!("{}", super :: bar()); }
^~~~~
test.rs:8:21: 8:50 error: expected token: `,`
test.rs:8 pub fn foo5() { panic!("{}", self :: foo4()); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Notice that a regular module paths work, but the special super and self tokens do not.

Issue 2:
pub struct A;

mod test {
use super :: A;
}

foo.rs:4:9: 4:14 error: found `super` in ident position
foo.rs:4 use super :: A;
^~~~~
error: aborting due to previous error
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

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

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

Electron Version

12.0.6

What operating system are you using?

Windows

Operating System Version

windows 10

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Hi,

The response header set-cookie is not present in the response. Pls check the below code. you can directly execute the code because url is used in the code has been exposed for public usage.

Code :

const { app, BrowserWindow } = require('electron');

let mainWindow;

app.commandLine.appendSwitch('ignore-certificate-errors', 'true');

app.whenReady().then(() => {

const { net } = require('electron')

var option = {

method: "POST",

uri: "http://testhtml5.vulnweb.com/login",

headers: {

"Content-Type": "application/x-www-form-urlencoded"

},

body: "username=admin&password=",

redirect: "manual",

useSessionCookies: true,

credentials: "include"

}

const request = net.request(option)

request.on('response', (response) => {

console.log(response.statusCode);

response.on('data', (chunk) => {

//console.log(BODY: ${chunk})

})

response.on('end', () => {

})

})

request.on("redirect", (statusCode, method, redirectUrl, responseHeaders) => {

if (option.redirect == "follow") {

request.followRedirect();

} else {

console.log(responseHeaders["Set-Cookie"]);

request.abort();

}

});

request.write(option.body || "");

request.end()

})

Ouptput is undefined. But i can assure you that set-cookie is exposed on response while using browser. I have attached a browser screenshot.

Please let me know if you need further inputs.

Actual Behavior

set-cookie is not exposed on response header.

Testcase Gist URL

No response

Additional Information

No response

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

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

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

Issue Details

Electron Version:

v9.0.0

Operating System:

macOS 10.15.5

Last Known Working Electron version:

5.x.y

Expected Behavior

request.on('redirect', (statusCode, method, redirectUrl, responseHeaders) => {
console.log(responseHeaders['set-cookie']); // should not be undefined
});

Actual Behavior

request.on('redirect', (statusCode, method, redirectUrl, responseHeaders) => {
console.log(responseHeaders['set-cookie']); // is undefined no matter what
});

To Reproduce

I've put together a small proof of concept using the electron-quick-start demo found here.

To run the example:

git clone https://github.com/walmat/electron-quick-start.git && yarn && yarn start

Screenshots

Additional Information
Issue 1:
I'm using Dart 2 and when I try to make an HTTP GET request, This error is shown

[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (21922): type '_BoundSinkStream<dynamic, List<int>>' is not a subtype of type '_HttpIncoming' where
E/flutter (21922): _BoundSinkStream is from dart:async
E/flutter (21922): List is from dart:core
E/flutter (21922): int is from dart:core
E/flutter (21922): List is from dart:core
E/flutter (21922): int is from dart:core
E/flutter (21922): _HttpIncoming is from dart:_http
E/flutter (21922): List is from dart:core
E/flutter (21922): int is from dart:core

this is my code

Future<Stream<Device>> getDevices() async {
var httpClient = HttpClient();
var uri = Uri.http('x.aba.ae', '/x.php');
HttpClientRequest request = await httpClient.getUrl(uri);
HttpClientResponse response = await request.close();

return response
.transform(UTF8.decoder)
.transform(JSON.decoder)
.asyncMap((json) => Device.fromJson(json));
}

Issue 2:
Steps to Reproduce

Add a PopupMenuButton.

Long press and swipe.

A tooltip will be shown instead of opening the menu like it does with native widgets.