WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm submitting a ... (check one with "x")

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

When navigating forward and then back, the scroll position is lost.

Expected/desired behavior

When navigating on an extensive list of items, the user scrolls down the list and click on some item. The app activates the next route/component which shows the product details. If the user decides do navigate back, the page does not scroll to the previous point.

Reproduction of the problem

Live example: http://plnkr.co/edit/vUROPirs5tjklyBw6t4H?p=preview

step 1 - first, adjust browser zoom until heroes from the hero list disappear

step 2 - scroll down to the end of the page

step 3 - click on "RubberMan"

step 4 - click on the back button either on the browser or the component

step 5 - the page is not scrolled to the same position of stop 2

What is the expected behavior?

The browser should scroll to the previous position like it happens in any non-single page application.

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

It should be considered a bug that can reduce the level of the user experience.

Please tell us about your environment:

Angular version: 2.0.0-rc.4

Browser: [all]

Language: [TypeScript 1.8 | ES5]

Issue 2:
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

Right now if you set a the Content-Type header in the request and you leave the body of the request empty angular2 is throwing 'ORIGINAL EXCEPTION: TypeError: Cannot read property 'toString' of null' before even try to make the request.

Expected/desired behavior

As far as I know if you have an Content-Type header and an empty request body it is a perfectly valid request. I suppose the correct behaviour is to execute the request.

Reproduction of the problem

You can see the wrong behaviour in this plnkr.

https://plnkr.co/edit/9J1hTVC8W65vLTU3ByhO?p=preview

What is the expected behavior?

I expect to be able to load the application if I made a request with Content-Type and without a body with angular2 http module

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

I think it is perfectly valid http request and don't see any value in make them impossible with angular2 http library

Please tell us about your environment:

Angular version: 2.0.0-rc.5

Browser: [all]

I have tried with chrome/firefox/safari.

Language: [TypeScript]

I have just used what plnkr provides for their default angular2 typescript plunk.
Issue 1:
TestDualStackUDPListener still fails on Dragonfly sometimes.

From f6d1009

http://build.golang.org/log/f4bc3bb1b42e2afb646e754f6f2d36ec6a665daf

--- FAIL: TestDualStackUDPListener (0.02s)
listen_test.go:319: skipping udp test
listen_test.go:319: skipping udp test
listen_test.go:319: skipping udp 0.0.0.0 test
listen_test.go:319: skipping udp test
listen_test.go:319: skipping udp :: test
listen_test.go:319: skipping udp 0.0.0.0 test
listen_test.go:319: skipping udp :: test
listen_test.go:319: skipping udp ::ffff:0.0.0.0 test
listen_test.go:319: skipping udp :: test
listen_test.go:319: skipping udp4 test
listen_test.go:319: skipping udp6 test
listen_test.go:319: skipping udp4 0.0.0.0 test
listen_test.go:319: skipping udp6 :: test
listen_test.go:357: listen udp4 127.0.0.1:50813: bind: address already in use
FAIL
FAIL net 8.282s

Issue 2:
Not sure the version of dragonfly builder but the root cause of test flakiness comes from the kernel changes like the following:

http://gitweb.dragonflybsd.org/dragonfly.git/commit/727ccde8cce813911d885b7f6ed749dcea68a886

Simply dragonfly is dropping support for ipv6 ipv4-mapped address for some reason.
Issue 1:
pandas 0.14 changed .iloc to accept out-of-bounds indexers for slices. I think we should do the same for .loc, for similar reasons of consistency and efficiency.

Note that this is already currently inconsistent for int and float indexes (not entirely sure why):

>>> pd.Series(range(5), np.arange(5)).loc[-1:]
KeyError
>>> pd.Series(range(5), np.arange(5.0)).loc[-1:]
0 0
1 1
2 2
3 3
4 4
dtype: int64

Issue 2:
I didn't directly find an issue about it, or an explanation in the docs, but I stumbled today on the following, which did surprise me a bit:

Considering the following dataframe:

In [18]: df = pd.DataFrame(np.random.randn(5,2), index=pd.date_range('2012-01-01', periods=5))

In [19]: df
Out[19]:
0 1
2012-01-01 2.511337 -0.776326
2012-01-02 0.133589 0.441911
2012-01-03 0.348167 1.285188
2012-01-04 1.075843 1.282131
2012-01-05 0.683006 0.558459

Slicing with a label that is not included in the index works with .ix, but not with .loc:

In [20]: df.ix['2012-01-03':'2012-01-31']
Out[20]:
0 1
2012-01-03 0.348167 1.285188
2012-01-04 1.075843 1.282131
2012-01-05 0.683006 0.558459

In [21]: df.loc['2012-01-03':'2012-01-31']
...
KeyError: 'stop bound [2012-01-31] is not in the [index]'

Context: I was updating some older code, and I wanted to replace .ix with .loc (as this is what we recommend if it is purely label based to prevent confusion).

Some things:

If this is intended, I don't find this stated somewhere in the docs. So the docs are at least lacking at this point.

the inconsistency between [], .ix[] and .loc[] is a bit surprising here

it is also inconsistent with iloc -> that behaviour was changed in 0.14 to allow out of bound slicing (http://pandas.pydata.org/pandas-docs/stable/whatsnew.html#whatsnew-0140-api)

Specifically for datetime-line indexing, it is also inconsistent with the feature of partial string indexing: df.loc['2012-01-03':'2012-01'] will work and do the expected while df.loc['2012-01-03':'2012-01-31'] fails
Issue 1:
Challenge Passing Values to Functions with Arguments has an issue.

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

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

My code:

// Example
function ourFunction(a, b) {
console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(a,b){
console.log(a+b);
}
myFunction(1,2);

Issue 2:
I am trying the exercise given for the above lesson. The link is given below:

http://www.freecodecamp.com/challenges/passing-values-to-functions-with-arguments#?solution=%2F%2F%20Example%0Afunction%20ourFunction(a%2C%20b)%20%7B%0A%20%20console.log(a%20-%20b)%3B%0A%7D%0AourFunction(10%2C%205)%3B%20%2F%2F%20Outputs%205%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line.%0Afunction%20myFunction(a%2C%20b)%20%7B%0A%20%20console.log(a%20%2B%20b)%3B%0A%7D%0A%0AmyFunction(1%2C%202)%3B

My solution looks to be correct but still the when the tests are run I get the error: "RangeError: Maximum call stack size exceeded"

I have googled this error and does not look to be possible for the below code which I have written in solution:

function myFunction(c, d){

console.log(c + d);

}

myFunction(1, 2);
Issue 1:
Helllo,

I'm very love material-ui and react.

I need to use these components. Is it possible to support these components.

Components

DatePicker

TimePicker

Versions

Material-UI: v1.0.0-beta5

React: 15.6.1

Issue 2:
Component

Tests (at least unit tests)

Docs

Demo

Keyboard accesibility mui/mui-x#6232

Composable, so users can build something like #7574 for instance

Fixes old issues #7866, #7783, #7781, #7767, #6970, #6944, #6918, #6916, #6886, #6718, #6594, #6439, #6358, #6312, #6134, #5897, #5800, #5743, #5726, #5696, #5664, #5633, #5400, #5329, #5198, #5197, #5188, #5037, #4900, #4765, #4707, #4587, #4401, #4219, #3794, #3710, #2930, #2203, #2023, #1566, #1261, #1207, #4538, #5144, #7399, #5612
Issue 1:
Hi, I faced a problem unable to cast an object as a method. While this is handled automatically using an if / else block (and congratulation to the guys who implemented this), this is not working yet into a switch case nor manually. Here is my code to reproduce the error:

Issue 2:
I have the following code:

function logNumber(v: number) { console.log("number:", v); }
function logString(v: string) { console.log("string:", v); }

function foo1(v: number|string) {
switch (typeof v) {
case 'number':
logNumber(v);
break;
case 'string':
logString(v);
break;
default:
throw new Error("unsupported type");
}
}

Error:

Argument of type 'string | number' is not assignable to parameter of type 'number'.
Type 'string' is not assignable to type 'number'.

I was forced to rewrite this using if statements.

function foo2(v: number|string) {
if (typeof v === 'number') {
logNumber(v);
} else if (typeof v === 'string') {
logString(v);
} else {
throw new Error("unsupported type");
}
}

Please allow using switch statements as type guards.
Issue 1:
sys.getsizeof() uses the __sizeof__ method, if defined, to return a Python object's full memory footprint (including owned data areas that lay outside of the basic object structure).

Currently:

>>> x = np.zeros((20000,))
>>> x.nbytes
160000
>>> sys.getsizeof(x)
80

On the other hand, since the underlying buffer can be shared by several objects, it's not obvious how non-misleading the answer would be.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1683 on 2010-11-22 by trac user ghazel, assigned to unknown.

>>> sys.getsizeof(numpy.array([]))
80
>>> sys.getsizeof(numpy.array(range(100000)))
80
Issue 1:
I've got a numpy.ndarray of shape (24569,) (also tried with (24569,1)) with samples of random variables (not the distribution)

fit_alpha, fit_loc, fit_beta=stats.gamma.fit(data)

results in fit_alpha and fit_loc being nans, while fit_beta = 1

I've tried to suggest starting parameters by using stats.gamma.fit(data,a=k,loc=0,scale=theta)

where k = 4/skew^2, theta=variance/mean are the shape and scale parameters respectively.

But I got the following error:

/usr/local/lib/python2.7/dist-packages/scipy/stats/_continuous_distns.pyc in fit(self, data, *args, **kwds)
1916 if floc is None:
1917 # loc is not fixed. Use the default fit method.
-> 1918 return super(gamma_gen, self).fit(data, *args, **kwds)
1919
1920 # Special case: loc is fixed.

/usr/local/lib/python2.7/dist-packages/scipy/stats/_distn_infrastructure.pyc in fit(self, data, *args, **kwds)
2126 # by now kwds must be empty, since everybody took what they needed
2127 if kwds:
-> 2128 raise TypeError("Unknown arguments: %s." % kwds)
2129
2130 vals = optimizer(func, x0, args=(ravel(data),), disp=0)

TypeError: Unknown arguments: {'a': 0.14115690248522836}.

after using floc=0 as a parameter (which is not documented anywhere as far as I can tell) I got an exception pointing out that negative values are not allowed in data (I got one negative "error" value in the data) - after fixing this, I got results which made sense...

The documentation on that fit function is lacking - it also does not mention that the parameters returned are shape, loc, scale, as well as that fa, floc and fscale are not suggestions of initial fit, but are constraints on the fit to keep these values fixed. There appears to be no way to suggest initial parameters.

Issue 2:
When fitting a distribution, it would be useful to be able to specify shape parameter starting values with keywords instead of args- eg

scipy.stats.gamma.fit(mydata, floc=0, a=2)

This is already allowed for scale and loc, but not for the shape params. It's easy to change, such as

if self.shapes:
shapes = self.shapes.replace(',', ' ').split()
for i, s in enumerate(shapes):
args[i]=kwds.pop(s, args[i])

in either the rv_continuous.fit or rv_continuous._reduce_func
Issue 1:
I tried using the @types/fluent-ffmpeg package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I understand that @types package versions do not follow SemVer.

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @tcaesvk, @DingWeizhe, @mabidina, @hados99, @Buzzertech.

In the fluent-ffmpeg documentation it is said:

The second kind of preset is preset functions. To use those, pass a function which takes an FfmpegCommand as a parameter.

And a code example:

function myPreset(command) {
command.format('avi').size('720x?');
}

ffmpeg('/path/to/file.avi').preset(myPreset);

According to the example code, the preset function should return void.

We have the following type

DefinitelyTyped/types/fluent-ffmpeg/index.d.ts

Line 42
in
e7e4e74

type GetPreset = (command: FfmpegCommand) => string;

which does not match the expected signature of the preset function. I believe it should be

type GetPreset = (command: FfmpegCommand) => void;

Also, in this case the type name itself is not very much suitable, it should be something like PresetFunction.

Besides that, I guess there are two typos here (proset and pnreset):

DefinitelyTyped/types/fluent-ffmpeg/index.d.ts

Lines 362 to 363
in
e7e4e74

usingPreset(proset: string | GetPreset): FfmpegCommand;

pnreset(proset: string | GetPreset): FfmpegCommand;

There is another method spelled properly which seems to be a duplicate of the misspelled one mentioned above:

DefinitelyTyped/types/fluent-ffmpeg/index.d.ts

Line 323
in
e7e4e74

preset(format: string): FfmpegCommand;

Issue 2:
Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @Flarna, @SimonSchick, @Semigradsky, @rbuckton, @mjbvz, @G-Rath, @sandersn

assert.strict.equal should not be deprecated: https://nodejs.org/dist/latest-v14.x/docs/api/assert.html#assert_assert_equal_actual_expected_message

The problem is that assert.strict uses typeof assert here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/assert.d.ts
Issue 1:
Regarding #9556 and #9172, I would like to suggest the following feature request:

In ansible-playbooks support decrypting files on copy:

copy: src=somefile.key dest=/etc/apache2/ssl/ decrypt=yes

Where somefile.key is encrypted with ansible-vault. That would be better usability.

Issue 2:
Issue Type:

Bug Report

Ansible Version:

ansible 1.8.2

Environment:

Mac OSX 10.9 running against Ubuntu 14.04.

Summary:

When defining a string, trailing 0s get removed.

Steps To Reproduce:

In my inventory:

server apples="1.20"

In my playbook:

debug msg="{{ apples }}"

Output:

TASK: [playbook | debug msg="{{ apples }}"] **************************
ok: [server] => {
"msg": "1.2"
}

Expected Results:

1.20

Actual Results:

1.2
Issue 1:
#22063 suggested adding a banner stating "this version is really old" but modifying rust after the fact wasn't well liked. A better way would be to add a conditional banner which checks rust-lang or something similar to see if something new has been released. It should only appear if it's too old or something similar.

It could even have grades:

Yellow: soon to be out of date

Orange: is out of date

Red: way out of date

Recently it came up on reddit.

Issue 2:
Quick over: the cfg() attribute can't be used to do multiple-declaration of rust types/fns/mods along multiple-dimensions of consideration (OS, arch) without signifigant hurdle-jumping-through'ing. I spoke with @graydon about this, briefly, on IRC and he was under the impression that commas in a list passed to cfg() would behave like an &&, but it seems, from my observation, that they act more like ||.

Here's a test case:

use std;
import io;

fn main() {
io::println("#[cfg()] failure test case");
let inst = new_foo_inst();
}

#[cfg(target_os="linux", target_arch="x86_64")]
type foo = {
a: int, b: int
};
#[cfg(target_os="linux", target_arch="x86")]
type foo = {
a: int, b: int, c: int
};

fn new_foo_inst() -> foo {
ret new_foo_arch();
#[cfg(target_arch="x86_64")]
fn new_foo_arch() -> foo {
ret { a: 0, b: 0 };
}
#[cfg(target_arch="x86")]
fn new_foo_arch() -> foo {
ret { a: 0, b: 0, c: 0};
}
}

Will produce this compiler output:

./cfg.rs:10:0: 12:2 error: duplicate definition of type foo
./cfg.rs:10 type foo = {
./cfg.rs:11 a: int, b: int
./cfg.rs:12 };

There are workarounds, of course (As my new_foo_inst() impl shows, can acheive similar with nested branches of os::arch modules). But I think we can do better.

I know this isn't high-priority (as I mentioned, I've already worked around the problem... and I'm not after a turing-completeness for cfg() :) , but it would propose changes the cfg() impl to:

Change the , in cfg() to be ||.

Add && as a supported separator, with all that it implies

Support arbitrary, if-like predicate nesting within cfg() using parenthesis

Also, interesting that a single = is used for "equals", here. Trying hard to avoid the impulse to not be pedantic about consistency across the language (== is used for such things in the main grammar).

This is totally outside the level of my experience with the language internals so far, and I gather would involve syntax changes. I'm interested in getting my feet wet, gently, with this. Assuming that such a change would be accepted, where would I (or anyone else interested in this work) start?
Issue 1:
Description

Hey Team Airflow!

Can you please add support for v4.1.0 of flask-appbuilder?

I keep getting vulnerabilities issues that got fixed -

dpgaspar/Flask-AppBuilder#1831

Use case/motivation

After executing safety https://pypi.org/project/safety/ we get that there are vulnerability issues with all versions under v4.1.0

Related issues

No response

Are you willing to submit a PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Body

FAB 4.0.0 keeps a lot of our imporant dependencies from upgrading - including some with CVEs. We should make the effort to upgrade FAB to 4.0.0 soon to make sure we have it in 2.4.0 (or if possible even in 2.3.* line.

It has a number of UI dependencies though - including breaking changes in some libraries like PyJWT especially around authentication, so rather serious testing is needed I think.

Committer

I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

There is no need for the children prop type to be required. One can set the content with dangerouslySetInnerHTML.

Anyways, it was not required with flow-types implementation.

Current Behavior

A warning is logged if Typography is an empty tag

Your Environment

Tech
Version

Material-UI
1.0.0-beta.25

React
16.2.0

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

Current Behavior

When overriding the class name imgFullHeight via classes property injection (according to the docs here) an error occurs:

InvalidCharacterError

Failed to execute 'add' on 'DOMTokenList': The token provided ('MuiGridListTile-imgFullHeight-558 TitlebarGridList-buggyClass-554') contains HTML space characters, which are not valid in tokens.

Steps to Reproduce

The sandbox is a copy-pasta from the demo of the docs, with an added class called buggyClass

Your Environment

Tech
Version

Material-UI
1.0.0-beta.26

React
16.2.0

browser
Chrome 63.0.3239.132
Issue 1:
Problem

I'd like to display equations using matplotlib in realtime. However, matrix and array require usetex=true and slows down rendering significantly.

Proposed solution

It is very helpful if you could implement the matrix or array to work without usetex=true.

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:
Migrated issue, originally created by Anonymous

I noticed that only linux (using cxOracle) there's an object leak with a specific kind of usage.

from sqlalchemy import *
import gc

engine = create_engine('oracle://dsn=somedb&user=myuser&password=mypass')

foo = Table('foo', engine,
Column('id', Integer, Sequence('foo_seq'), primary_key=True),
)

try: foo.drop()
except: pass
try: foo.create()
except: pass

foo.insert().execute()

class Foo(object): pass
foos = mapper(Foo, foo)

while 1:
foos.select()
gc.collect()
objectstore.clear()
gc.collect()
print len(gc.get_objects())

The output of the programm is the ever increasing number of objects until it crashes due to out of memory exception (if you don't ctrl+c before)

This may need confirmation for other databases and linux distributions (mine is RedHat EL4)

Issue 2:
Migrated issue, originally created by Anonymous

When I try to use objects linked by relation with backref memory is not released neither after objectstore.flush() nor objectstore.clear() nor objectstore.expunge() nor gc.collect()

When I break backref relation memory cleared by gc.collect() good.

Bug reproduced by usage User/Address objects from your tests.

for i in xrange(1000):
objectstore.push_session(objectstore.Session())
for j in xrange(1000):
u = User()
u.name = str(randint(0, 100000000))
for k in xrange(10):
a = Address()
a.email_address = str(randint(0, 100000000))
a.user = u
objectstore.pop_session()
gc.collect()

with backrefs memory grows intensivelly and does not released
Issue 1:
need to emit a 2.0 warning for this, no magic SQL things like this should happen

def distinct(self, *expr):
r"""Apply a ``DISTINCT`` to the query and return the newly resulting
``Query``.

.. note::

The :meth:`.distinct` call includes logic that will automatically
add columns from the ORDER BY of the query to the columns
clause of the SELECT statement, to satisfy the common need
of the database backend that ORDER BY columns be part of the
SELECT list when DISTINCT is used. These columns *are not*
added to the list of columns actually fetched by the
:class:`.Query`, however, so would not affect results.
The columns are passed through when using the
:attr:`.Query.statement` accessor, however.

Issue 2:
Migrated issue, originally created by Michael Bayer (@zzzeek)

Starting with r2598, I'm seeing some failures with how I'm using the

association proxy. I've modified the

examples/association/proxied_association.py file which duplicates the

problem.

It is possible that I'm not suppose to remove associations like I am.

But it did work before (in 0.3.7 and 0.3.6).

It looks like if I read in part of the association into the current

session and then delete it, things don't go so well.

Index: examples/association/proxied_association.py
===================================================================
--- examples/association/proxied_association.py (revision 2723)
+++ examples/association/proxied_association.py (working copy)
@@ -106,8 +106,18 @@

+# new additions to proxied_association.py

+#engine.echo = True

+new_item = Item('new item', 100)
+session.clear()
+order = session.query(Order).get_by(customer_name='john smith')
+bogus = order.items[0](0).item_id # comment out and it works on 0.3.8
+order.itemassociations = None
+session.flush()
+order.items.append(new_item)
+session.flush()

It fails with:

sqlalchemy.exceptions.SQLError: (IntegrityError) orderitems.order_id
may not be NULL u'INSERT INTO orderitems (item_id, price) VALUES (?,
?)' [100](5,)