WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Code Sample, a copy-pastable example if possible

# Your code here

Problem description

[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:
Here's my code

import numpy as np
import pandas as pd
from numpy.random import randn

az = pd.DataFrame({
'A' : ['a1', 'a1', 'a2', 'a3']
, 'B' : ['b1', 'b2', 'b3', 'b4']
, 'Vals' : randn(4)
}).groupby(['A', 'B']).sum()

def add_zero(row) :
name = row.name
row.loc[name,'b0'] = 0
return row

az['Vals'].groupby(level='A').apply(lambda s : add_zero(s))

>>> A A B
>>> a1 a1 b1 1.238985
>>> b2 0.686438
>>> b0 0.000000
>>> a2 a2 b3 -0.503039
>>> b0 0.000000
>>> a3 a3 b4 -0.083150
>>> b0 0.000000
>>> Name: Vals, dtype: float64

Expected Output

>>> A B
>>> a1 b1 1.238985
>>> b2 0.686438
>>> b0 0.000000
>>> a2 b3 -0.503039
>>> b0 0.000000
>>> a3 b4 -0.083150
>>> b0 0.000000
>>> Name: Vals, dtype: float64

Problem description

I would like to add rows with new index in a grouped by Dataframe, it seems to work, yet it duplicates an index/level column, and I can't figure why it does.

Is there any way around ?

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.13.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.19.2

nose: 1.3.7

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.25.2

numpy: 1.11.3

scipy: 0.18.1

statsmodels: 0.6.1

xarray: None

IPython: 5.1.0

sphinx: 1.5.1

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2016.10

blosc: None

bottleneck: 1.2.0

tables: 3.2.2

numexpr: 2.6.1

matplotlib: 2.0.0

openpyxl: 2.4.1

xlrd: 1.0.0

xlwt: 1.2.0

xlsxwriter: 0.9.6

lxml: 3.7.2

bs4: 4.5.3

html5lib: None

httplib2: 0.10.3

apiclient: 1.6.2

sqlalchemy: 1.1.5

pymysql: None

psycopg2: None

jinja2: 2.9.4

boto: 2.45.0

pandas_datareader: None
Issue 1:
Vue.js version

2.0.3

Reproduction Link

https://jsfiddle.net/xereda/zbt6sn1h/42/

Steps to reproduce

Change the values for latitude and longitude. No reactivity.

What is Expected?

The Geolocation fields update the data object.

What is actually happening?

The array that deals with geolocation information (MongoDB GeoJSON Object) are not reactive.

Note the following example:

local: { name: 'Empresa XYZ', address: 'Rua Fulano da Veiga, 888', number: 9888, geoLocation: { coordinates: [ 65.234902, 75.349902 ], type: 'Pointer' } }

The only fields that are not reactives are based on the internal array of the Geolocation object. Note this:

Nome:

Endereço:

Número:

Geolocalização (long):

Geolocalização (lat):

Geolocalização (type):

Issue 2:
I'm in process migrating an application from Vue 1.x to 2.0.3. In this application I'm having several selects where each v-model binds to an individual index of an array . This is without problems in Vue 1.x but in version 2 it does not update. I believe this is a potential bug.

I have reproduced the problem here:

https://jsfiddle.net/peterkorgaard/a7vvz753/18/

Vue.js version

2.0.3

Reproduction Link

https://jsfiddle.net/peterkorgaard/a7vvz753/18/

Steps to reproduce

What is Expected?

What is actually happening?
Issue 1:
Requiring the user to ensure that only one instance of celerybeat exists across their cluster creates a substantial implementation burden (either creating a single point-of-failure or encouraging users to roll their own distributed mutex).

celerybeat should either provide a mechanism to prevent inadvertent concurrency, or the documentation should suggest a best-practice approach.

Issue 2:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

the part of the documentation describing celery_app and celery_worker fixtures has a test example that doesn't pass:

https://github.com/celery/celery/blame/master/docs/userguide/testing.rst#L152

if we use this test as it is, it will fail because the task does not get registered in the worker:

celery.exceptions.NotRegistered: 'test_create_task.mul'

Suggestions

the problem is that executed this way, the tasks are not registered in the worker. The way I found working is to override the celery_app fixture:

from celery import Celery
from celery.contrib.testing.worker import TestWorkController
from celery.result import AsyncResult
import pytest

@pytest.fixture
def celery_app(celery_app: Celery):

@celery_app.task(name='xyz')
def mul(x, y):
"""register a task named 'test_create_task.mul'"""
return x * y

return celery_app

def test_create_task(celery_app: Celery, celery_worker: TestWorkController):
result: AsyncResult = celery_app.send_task('xyz', kwargs = {"x": 2, "y": 2})
result.wait()
assert result.get() == 4
Issue 1:
Compiling dprint-plugin-typescript v0.29.1

error[E0308]: mismatched types

--> /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/main.rs:554:7

|

554 | syntax,

| ^^^^^^ expected enum swc_ecma_parser::Syntax, found a different enum swc_ecma_parser::Syntax

|

= note: perhaps two different versions of crate swc_ecma_parser are being used?

error[E0308]: mismatched types

--> /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/main.rs:561:60

|

561 | .parse_with_reexports(&module_specifier.to_string(), syntax)

| ^^^^^^ expected enum swc_ecma_parser::Syntax, found a different enum swc_ecma_parser::Syntax

|

= note: perhaps two different versions of crate swc_ecma_parser are being used?

error[E0308]: mismatched types

--> /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/lint.rs:173:13

|

173 | .syntax(syntax)

| ^^^^^^ expected enum swc_ecma_parser::Syntax, found a different enum swc_ecma_parser::Syntax

|

= note: perhaps two different versions of crate swc_ecma_parser are being used?

error[E0609]: no field filename on type deno_lint::diagnostic::Location

--> /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/lint.rs:228:21

|

228 | &d.location.filename,

| ^^^^^^^^ unknown field

|

= note: available fields are: line, col

error[E0609]: no field filename on type &deno_lint::diagnostic::Location

--> /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/lint.rs:291:39

|

291 | return format!("{}:{}:{}", location.filename, location.line, location.col);

| ^^^^^^^^ unknown field

|

= note: available fields are: line, col

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0308, E0609.

For more information about an error, try rustc --explain E0308.

error: failed to compile deno v1.3.1, intermediate artifacts can be found at /tmp/cargo-installzzCTFN

Caused by:

could not compile deno.

Issue 2:
I'm getting a compilation error when importing fromFileUrl from "https://deno.land/std@0.51.0/path/posix.ts"

My trivial test case is:

import { fromFileUrl } from "https://deno.land/std@0.51.0/path/posix.ts";

import { CHAR_FORM_FEED } from "./deno_cache/deps/https/deno.land/deca9362afe2080ad38d09cee2792ec9c8b8acc7ed9b0ceeee1049a441ad0dd4"

let u: URL = new URL("");

console.log(fromFileUrl(u));

posix.ts does not build and gets error

TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.

Type 'URL' is not assignable to type 'string'.

return new URL(url).pathname;

~~~

at https://deno.land/std@0.51.0/path/posix.ts:433:18

what am I doing wrong. Is there a Deno discussion group I could use to discuss such problems before filing an issue like this?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I would like to be able to customize the icon in the stepper, instead of only being able to use the index of the step.

I've tried using the StepIcon but it doesn't work, here my attempt.

https://codesandbox.io/embed/n0zy0m04zm

Your Environment

Tech
Version

"material-ui": "^1.0.0-beta.33",

"preact": "^8.2.7"

Issue 2:
I let a fullscreen dialog appear in my web application and have a TextField being automatically focused. The field is kind of focused, but the blinking | is not displayed.

If you tab on the same TextField again, it'll blink one line under the text field.

Again on the same: TextField is unfocused.

Again on the same, the correct TextField is finally focused with |.

[ x] I have searched the issues of this repository and believe that this is not a duplicate.

This is my dialog content:

<DialogContent style={{ textAlign: 'center' }}>
<DialogTitle>
Enter your lorem link
</DialogTitle>
<DialogContentText>
Lorem ipsum.
</DialogContentText>
<TextField
required
autoFocus
inputRef={el => this.TitleInput = el}
margin="normal"
label="Enter your course title"
type="text"
style={{ width: '60%', minWidth: '250px' }}
inputProps={{ maxLength: 10 }}
/>
<TextField
required
inputRef={el => this.LinkInput = el}
margin="normal"
label="Enter your link"
type="text"
style={{ width: '60%', minWidth: '250px' }}
/>
</DialogContent>

Environment

This bug only happens on iOS devices.

Tech
Version

Material-UI
1.0.0-beta.19

React
16.0.0

browser
iOS Safari

etc
iPhone 7, iPad Pro 9"
Issue 1:
Problem

rcParams["savefig.directory"] sets the default directory used by the figure-saving dialog. It is either a fixed firectory (defaulting to $HOME), or, if an empty string, uses the current directory of the process. After saving a figure, its value gets updated to the directory where that figure was saved (so if it starts at /foo/bar but you interactively select to save a figure as /quux/baz.png, next time you click on the figure-saving icon the dialog will start at /quux)... except if the initial value is the empty string (i.e., the current directory) in which case later dialogs will still start at the current directory.

I have indeed set savefig.directory to be empty, as I quite often want to save figures "close" to the script directory; however, if I want e.g. to put multiple figures in the same subdirectory or sibling directory, then I need to interactively do so for each figure, which is a lot of clicking.

Proposed Solution

Hence, at least for this use case, it would be reasonable to always update savefig.directory after an interactive save, even if its initial value is empty. I guess this may (like always) break some workflows(?!) -- although that seems slightly unlikely to me --, so we may possibly just put the decision of whether to ever update that rcParam into yet another separate rcParam (savefig.update_directory_after_save)... or we may decide it's not worth that additional complexity unless someone actually complains ;-)

Additional context and prior art

Issue 2:
Problem

rcParams["savefig.directory"] sets the default directory used by the figure-saving dialog. It is either a fixed firectory (defaulting to $HOME), or, if an empty string, uses the current directory of the process. After saving a figure, its value gets updated to the directory where that figure was saved (so if it starts at /foo/bar but you interactively select to save a figure as /quux/baz.png, next time you click on the figure-saving icon the dialog will start at /quux)... except if the initial value is the empty string (i.e., the current directory) in which case later dialogs will still start at the current directory.

I have indeed set savefig.directory to be empty, as I quite often want to save figures "close" to the script directory; however, if I want e.g. to put multiple figures in the same subdirectory or sibling directory, then I need to interactively do so for each figure, which is a lot of clicking.

Proposed Solution

Hence, at least for this use case, it would be reasonable to always update savefig.directory after an interactive save, even if its initial value is empty. I guess this may (like always) break some workflows(?!) -- although that seems slightly unlikely to me --, so we may possibly just put the decision of whether to ever update that rcParam into yet another separate rcParam (savefig.update_directory_after_save)... or we may decide it's not worth that additional complexity unless someone actually complains ;-)

Additional context and prior art
Issue 1:
I do a fair bit of editing in Markdown, and I like to hard-wrap blocks of text at column 120 (as opposed to the visual wrapping that happens in VSCode based on the editor.wrappingColumn setting).

It would be really helpful to have a visual guide at a user-defined column number. This visual guide would affect nothing, it would merely appear as a faintly visible vertical line that shows where the specified column is, such as column 120. That way, when I'm writing large blocks of text, I don't have to constantly look down to the column number indicator to see where I should be hard-wrapping the text.

Issue 2:
Ruler settings would be helpful for showing end of row text.

Sublime text:
Issue 1:
I am using the Chart.js library which does auto-sizing of the chart on window resize. It does that by using setTimeout() and clearTimeout() when the event is triggered.

The clearTimeout is tripping zone.js

Plunkr: http://plnkr.co/edit/JZMytm59PPlYq3bdSoHy

Not sure if this is an issue with Angular or Zone or Chart.js. I tested chart.js independently and it works fine for window resize, when not inside an Angular component.

Issue 2:
[x] bug report

Either of these will crash zones

var timerId = 42; // anything that isn't actually a handle
clearInterval(timerId);
// Error: cannot read property 'cancelTask' of undefined

and try this

var timerId = setInterval(()=>{},1000);
clearInterval(timerId); // clears the first timer
clearInterval(timerId); // called twice ... boom!
// Uncaught Error: Task does not support cancellation, or is already canceled.

clearInterval is supposed to be safe in both cases`. It worked in beta.9

Here it is in a plunker:

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

Discovered while testing the docs "Cookbook Component Communication" sample. Here it is in the context of that cutdown sample:

http://plnkr.co/edit/pYlQdKk6qLOGhQwSreoG?p=preview
Issue 1:
For the datepicker & the timepicker components, it'd be very cool to have the option to make certain days/times unavailable, say for a booking app for instance.

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

Issue 2:
Material-UI was designed with the Roboto font in mind. So be sure to include it in your project. Here are some instructions on how to do so.

The "some instructions" link is redirecting back to the fonts preview page.
Issue 1:
https://github.com/golang/go/blob/master/src/net/ipsock.go#L204

type addrList []Addr
func internetAddrList(net, addr string, deadline time.Time) (addrList, error)

However the internetAddrList only return one valid address.

I proposal split addr string by "," and return REAL addrList.

Issue 2:
The following example program:

package main

import (
"net"
)

func main() {
net.Listen("tcp", "localhost:8080")
select{}
}

Currently yields this result:

$ netstat -nl | grep 8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN

While the following result would be optimal:

$ netstat -nl | grep 8080
tcp6 0 0 127.0.0.1:8080 :::* LISTEN
tcp6 0 0 ::1:8080 :::* LISTEN

(Note that the first socket is actually dualstack, and bound to ::ffff:127.0.0.1, but that's less critical than adding the second socket bound to ::1.)

More generally, when you call net.Listen() on a hostname which resolves to multiple IPv4/IPv6 addresses, only the first IPv4 address is selected. An analogous problem occurs if you Listen("tcp", ":8080") on an operating system that doesn't support dualstack sockets: instead of returning a pair of sockets bound to [::]:8080 and 0.0.0.0:80, you only get IPv4.

The fundamental flaw is that Listen() assumes a single socket, which is a leaky abstraction that's inappropriate for high-level things like example servers, e.g.:

http://golang.org/pkg/net/#pkg-overview

Go should either adapt the Listen() API to support multiple sockets, or if that's not feasible, a new multi-socket API should be introduced, which deprecates Listen() for all cases except simple non-wildcard addresses.
Issue 1:
Calling the pd.Series interpolate with method='time' returns inconsistent results when the first or the last value is NaN.

When the first value is NaN, interpolation is not performed on the first value. This is, for me, the expected behaviour since interpolation is not possible.

pd.Series(index=[datetime(2017,1,1), datetime(2017,1,2), datetime(2017,1,7)], data=[float('nan'), float('nan'), 3]).interpolate(method='time')

2017-01-01 NaN

2017-01-02 NaN

2017-01-07 3.0

dtype: float64

When the last value is a NaN, 'interpolation' is performed (like a forward-fill). I was expecting to keep the NaN values

pd.Series(index=[datetime(2017,1,1), datetime(2017,1,2), datetime(2017,1,7)], data=[1, float('nan'), float('nan')]).interpolate(method='time')

2017-01-01 1.0

2017-01-02 1.0

2017-01-07 1.0

dtype: float64

pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.5.2.final.0

python-bits: 64

OS: Linux

OS-release: 4.4.0-53-generic

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

LOCALE: en_US.UTF-8

pandas: 0.19.1

nose: None

pip: 9.0.1

setuptools: 27.2.0

Cython: None

numpy: 1.11.3

scipy: 0.18.1

statsmodels: None

xarray: None

IPython: None

sphinx: None

patsy: None

dateutil: 2.6.0

pytz: 2016.7

blosc: None

bottleneck: None

tables: None

numexpr: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.8

boto: None

pandas_datareader: None

Issue 2:
See also the discussion at StackOverflow.

Linear interpolation on a series with missing data at the end of the array will overwrite trailing missing values with the last non-missing value. In effect, the function extrapolates rather than strictly interpolating.

Example:

import pandas as pd
import numpy as np

a = pd.Series([np.nan, 1, np.nan, 3, np.nan])
a.interpolate()

Yields (note the extrapolated 4):

0 NaN
1 1
2 2
3 3
4 4
5 4
dtype: float64

not

0 NaN
1 1
2 2
3 3
4 4
5 NaN
dtype: float64

I believe the fix is something along the lines of changing lines 1545:1546 in core/common.py from

result[firstIndex:][invalid] = np.interp(inds[invalid], inds[valid], yvalues[firstIndex:][valid])

to

result[firstIndex:][invalid] = np.interp(inds[invalid], inds[valid], yvalues[firstIndex:][valid], np.nan, np.nan)
Issue 1:
Matrices and array environments would be useful to display with matplotlib.

Here is a stackoverflow question that is related: http://stackoverflow.com/questions/26329177/how-to-display-a-matrix-in-the-matplotlib-annotations

We'd also like support for our SymPy printing backends. See #5162 for some related info.

Issue 2:
Original report at SourceForge, opened Wed Apr 15 14:40:54 2009

MPL currently has great math support for single line equations, but not for multiple line ones. We ran into this problem when generating docs using sphinx. The following snippet:

/begin

.. math::

E(t) = x + \delta(t)

This type of experiment can be represented by two counting processes

:math:(E_a, E_b) defined as

.. math::

\begin{aligned}

E_a(t) &= a + \delta(t)

E_b(t) &= b + \delta(t)

\end{aligned}

/end

has one single-line displayed equation, one inline and one multiline chunk. The first two are rendered fine by MPL, but the latter fails. It would be great to have MPL support this.

While multiline equations are not too common in plots, they could be very useful in certain cases, if this feature was supported.
Issue 1:
Version

2.6.11

Reproduction link

https://codesandbox.io/s/vue2611-q4ky0?file=/src/components/HelloWorld.vue

Steps to reproduce

Follow the codesandbox link

Click on the "Component Vue 2.6.11" text in the browser view to enable "edit mode"

Click "cancel edit" to exit "edit mode"

What is expected?

It is expected that $nextTick will defer the setting of the variable "editMode" to false, preventing the parent container click event from executing and re-setting the variable to true. (see line 26)

What is actually happening?

$nextTick isn't deferring execution as it did in 2.5.x. The variable "editMode" is being set to false and then the parent container click event immediately resets it to true.

Here is the codesandbox link for v2.5.22 to see how it behaved prior to 2.6.x:

https://codesandbox.io/s/vue2522-xo346?file=/src/components/HelloWorld.vue

I ran into this bug while trying to upgrade from 2.5.22 to 2.6.11. It broke our production app everywhere this edit component was used. For this type of edit component, this is a pretty natural design pattern.

Side note: If this is an intentional breaking change, are there recommended work arounds for these type of components (besides DOM restructuring)?

Issue 2:
Version

2.6.0-beta.1

Reproduction link

https://codepen.io/frlinw/pen/OreZMz

Steps to reproduce

Click on "Click me"

What is expected?

demo with v2.5.22 show the expected behavior: https://codepen.io/frlinw/pen/XoLYMR

the "Dropdown" component should not be able to handle a click event which is supposed to create it

What is actually happening?

the Dropdown is automatically closed because it handles the click event