WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hello ,

when i use glide to load url picture, just like

Glide.with(this).load(url).placeholder(R.drawable.img_photo_fail).into(imageview);

I find that the imageview shows the placeholder's pic instead of the url's pic at first .

and I click back and come in again , it's rgiht .

and if I use glide like this

Glide.with(this).load(url).into(imageview);

without placehold . It can work well .

What can I do ? thank you .

Issue 2:
I encountered problem when using CircleImageView (https://github.com/hdodenhof/CircleImageView). It also happens using CircularImageView (https://github.com/Pkmmte/CircularImageView).

When image is loaded from memory everything works fine but when loading from disk cache CircleImageView shows placeholder image. When using RequestListener method onResourceReady is properly called but placeholder image stays.

If no placeholder is set image is loaded properly.

Glide version: 3.6.1

Tested on Android 4.4 and 5.0
Issue 1:
Forms make heavy use of GlobalKeys for getting access to the FormState and FormFieldState in order to save or validate. This is more expensive than it needs to be. All we really want is a way to grab the State object of a widget. GlobalKey comes with extra baggage.

See this example and this comment.

Something like this would be sufficient:

class StateKey<T extends State<StatefulWidget>> extends Key {
// Called when Element is mounted.
void _register(Element element) {
currentElement = element;
}

StatefulElement currentElement;
T get currentState => currentElement?.state;
}

@Hixie

Issue 2:
I have a flutter project. Inside of its android folder I have a lot of android code, including background processing classes and some native UI. I updated this code to use the new androidX packages.

Now, some of the plugins stopped working. A example is the permission_handler plugin.

permissionhandler\PermissionHandlerPlugin.kt: (10, 31): Unresolved reference: ActivityCompat
permissionhandler\PermissionHandlerPlugin.kt: (11, 27): Unresolved reference: content
permissionhandler\PermissionHandlerPlugin.kt: (152, 37): Unresolved reference: ContextCompat
permissionhandler\PermissionHandlerPlugin.kt: (191, 20): Unresolved reference: ActivityCompat
permissionhandler\PermissionHandlerPlugin.kt: (235, 13): Unresolved reference: ActivityCompat`

I believe this is because the native Android part of my app is using the AndroidX packages, since those plugins are still using the old support library. In the current state, it is impossible to me to roll back to the support library.

Also, when I add the camera plugin I get the following error:

error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^

Is this a intended behavior? Can someone give me a light?

[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [versÃ£o 10.0.17134.376], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Community Edition (version 2018.2)
[√] Connected devices (1 available)

• No issues found!`
Issue 1:
This gives an compile error:

type t = () => void;

abstract class A {
abstract f : t
}

This compiles:

abstract class A {
abstract f () : void;
}

Shouldn't both be possible if we support type aliases?

I used Typescript 1.7.5.

Issue 2:
This is a proposal to extend #3578 to allow abstract properties in abstract classes. So the following should be legal:

abstract class A {
abstract p;
}
class B extends A {
get p() {...}
set p(v) {...}
}
Issue 1:
On numpy current master (da6e4c7), np.matmul is apparently not using BLAS:

>>> import numpy as np
>>> x = np.random.rand(5, 512, 512)
>>> %timeit np.matmul(x, x)
1 loops, best of 3: 526 ms per loop
>>> def xmul(a, b):
... out = np.empty_like(a)
... for j in range(a.shape[0]):
... out[j] = np.dot(a[j], b[j])
... return out
>>> %timeit xmul(x, x)
10 loops, best of 3: 28 ms per loop

Of course, it's a preliminary feature, but probably best to have an issue for this.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1071 on 2009-03-30 by trac user Electrion, assigned to unknown.

Hello,

I recently noticed that loadtxt() fails when I try to load a file that contains no value on the last column when it is TAB delimited.

For example :

s = StringIO('#X\tY\tC\n1.\t1.\t1.\n2.\t2.\t\n')
loadtxt(s)

will fail with Exception:

ValueError: setting an array element with a sequence.

The use of dtypes or converters (like {2: lambda s: float(s or 'Nan')} ) doesn't help.

After investigation, I noticed that the loadtxt function strip all lines before splitting and then remove the '\t\n'.

If think the 'split_line' subfunction in numpy.io.loadtxt

def split_line(line):
"""Chop off comments, strip, and split at delimiter."""
line = line.split(comments)[0].strip()
[...]

should be replaced by

def split_line(line):
"""Chop off comments, strip, and split at delimiter."""
line = line.split(comments)[0].strip('\r\n')
[...]

to remove any new line character but not the delimiter.
Issue 1:
I want a feature.

To be able to extend the SyntheticUIEvents, so that I can add my own Event when required.

Thank you.

Issue 2:
Please add support for custom non-standard DOM events, ideally through a public API but if that's a "no go" at least some way that would not require forking the code base.

Here is my attempt of exposing non-standard events after getting some insights on IRC, unfortunately it still does not work (as event listeners are not registered) and I am not sure if there is more whitelists somewhere that skips those custom events:

https://gist.github.com/Gozala/a977973957fcee9c5671

P.S.: Any help in changing this snippet to make it work is also greatly appreciated
Issue 1:
According to the documentation, " plugins can be shipped in a subdirectory relative to a top-level playbook", and this used to work in v1.

With v2 however, this does not work (at least for lookup_plugins) unless the "lookup_plugins" subdirectory is explicitly mentioned in ansible.cfg.

$ mkdir lookup_plugins
$ cp $ANSIBLE_ROOT/lib/ansible/plugins/lookup/items.py lookup_plugins/myitems
$ cat test_lookup_pl.yml

---
- hosts: localhost
tasks:
- name: Print items from custom lookup plugin
debug: msg="Item= {{ item }} "
with_myitems:
- foo
- bar
$ ansible-playbook test_lookup_pl.yml
PLAY ****************************************************************************

TASK [setup] ********************************************************************
ok: [localhost]

TASK [Print items from custom lookup plugin] ************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "ERROR! the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'item' is undefined"}

PLAY RECAP **********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1

Now if I create an ansible.cfg file:
$ cat ansible.cfg
[defaults]
lookup_plugins=./lookup_plugins

$ ansible-playbook test_lookup_pl.yml
PLAY ****************************************************************************

TASK [setup] ********************************************************************

ok: [localhost]

TASK [Print items from custom lookup plugin] ************************************
ok: [localhost] => (item=foo) => {
"item": "foo",
"msg": "Item= foo "
}
ok: [localhost] => (item=bar) => {
"item": "bar",
"msg": "Item= bar "
}
ok: [localhost]

PLAY RECAP **********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0

Issue 2:
I was making an ansible-galaxy role today and when placing the lookup_folder plugin at the same level as the rest of the folders and then using it it returns that it can't find the plugin. Do we have anyway to use lookup_plugins at a role level without forcing uses to manually add it to there playbook?

Here is the repo in question. Master is how i got it to work for testing that the lookup_plugins folder only works when at the same level as the playbook https://github.com/nowait-tools/ansible-rabbitmq the branch galaxy test is the one that fails.
Issue 1:
Currently rustdoc doesn't show associated types under the "implementors" portion of the trait page (eg here) (though it does show them on the page for the type). Since associated types are as important as type parameters when inspecting an impl (and debugging a type mismatch), perhaps rustdoc should show an (Output = [T]) or something similar next to each impl?

In case of a cross crate impl where the trait shares a crate with the impl, the associated type will be missing from rustdoc altogether.

Issue 2:
For example, the std::ops::Index trait has an associated Output type. Of course, that type is potentially different for each impl of the trait. impl are documented at http://localhost/rust/std/ops/trait.Index.html#implementors , but there is apparently now way to know what is the Output type for a given implementation. (Other than finding the source code, which is not necessarily easy because of #15744.)
Issue 1:
Chris Beams opened SPR-8371 and commented

As of 3.1 M2, the @PropertySource annotation allows for declarative registration of property sources against the enclosing Environment. However, it does not allow for manipulation of property source ordering. This (if desired at all) must be done against the ConfigurableEnvironment#getPropertySources() MutablePropertySources API.

This issue exists to gauge interest in this feature (read: collect votes). Please be specific about use cases in order to assess whether such an enhancement truly represents a general need.

If interest is sufficient, we'll consider this for 3.1 RC1.

Affects: 3.1 M2

Issue Links:

#14959 Allow for ignoreResourceNotFound on @PropertySource ("is duplicated by")

#12962 Provide @Configuration support for PropertySource registration (@PropertySource)

#15560 Add "ignoreResourceNotFound" attribute to the @PropertySource

Referenced from: commits e95bd9e

12 votes, 17 watchers

Issue 2:
Fabrizio Giustina opened SPR-1383 and commented

Actually jars generated by a binary builds don't have the version number in the name; the attached patch modify build.xml so that generated files are named with spring-{module}-{version}.jar.

That's the maven standard way of naming jars and makes also easier for users to keep track of versions they are using (at the moment the version is only specified in the manifest)... having the version number in the jar is a kind of standard after all.

The patch also adds a new "modulesources" target which generated source archives (spring-{module}-{version}-sources.jar) for each of the modules (at the moment only a single zip files is geneated). Note that the target is not included by default in standard builds.

Affects: 1.2.5

Attachments:

spring-buildxml-versioned-jars.diff (10.67 kB)

Issue Links:

#7392 Create and upload Maven Source and Javadoc Bundles for Spring 2.0 ("is depended on by")

#7392 Create and upload Maven Source and Javadoc Bundles for Spring 2.0 ("duplicates")

1 votes, 0 watchers
Issue 1:
This is fastapi http side:

from fastapi import Request
import aiofiles

@app.post('/upload')
async def upload(request: Request):
try:
filename = request.headers['filename']
async with aiofiles.open(filename, 'wb') as f:
async for chunk in request.stream():
await f.write(chunk)
except Exception:
return {"message": "There was an error uploading the file"}

return {"message": f"Successfuly uploaded {filename}"}

this is the request side:

def gen_file_stream():
with open(file_name, "rb") as f:
while True:
data = f.read(1024*1024)
if not data:
break
yield data
resp=requests.post(url,data=gen_file_stream())

when I check the size of the chunk its 64k and not 1MB (as Im trying to send here).

If I use TestClient from fastapi it is working, I mean Im able to send a chunk of 1MB, so it seems to me requests package is dividing the size of the chunk internally to 64KB.

is there any way I can make request.post to send a chunk of 1MB?

Issue 2:
In a rare instance, I managed to do a GET request to a server that should retrieve an xml document. However the response.text field contains the document twice (just concatenated, i.e. the first half of the data and second half of the data are exact duplicates):

>>> resp = requests.get('http://bigr-rad-xnat.erasmusmc.nl/schemas/xnat/xnat.xsd', auth=('username', 'password'))
>>> resp.text[:len(resp.text)/2] == resp.text[len(resp.text)/2:]
True

Now of course, it could happen that the document really is that, but it shouldn't and I tried the request using curl, postman (chromium extension), and chromium and it all returns just half the response of requests. As a final test I tried it using urllib2:

>>> import urllib2 base64
>>> req = urllib2.Request('http://bigr-rad-xnat.erasmusmc.nl/schemas/xnat/xnat.xsd')
>>> base64string = base64.encodestring(
'%s:%s' % ('password', 'password'))[:-1]
authheader = "Basic %s" % base64string
req.add_header("Authorization", authheader)
>>> handler = urllib2.urlopen(req)
>>> content = handler.read()

And that also gave me a single copy of the document. Hence I conclude something is probably going wrong in requests.

I am using requests version 2.9.1 on python 2.7.11 (and I also tried on 3.5.1) on debian stretch. The server is a tomcat server running XNAT (www.xnat.org). The problem is that the server serving this is located behind a hospital firewall and therefor I cannot give anyone from outside access to reproduce/test, but I can gather additional information.

I tried to look at the open bugs and did not find a similar report, but I could have missed it, if so I am sorry.
Issue 1:
Code Sample, a copy-pastable example if possible

Something goes wrong when I try to set a NaN value using the iloc syntax. Instead of just the entry being set, the entire row gets set.

import pandas as pd
import numpy as np
df = pd.DataFrame(np.arange(1,5).reshape(2,2), columns=["A"]*2)
# this works like expected
df.iloc[0,0] = -1
df

A
A

0
-1
2

1
3
4

# this sets the entire row to NaN
df.iloc[1,0] = np.nan
df

A
A

0
-1.0
2.0

1
NaN
NaN

# It only seems to be an issue when indexing the first repeated column
df.iloc[0,1] = np.nan
df

A
A

0
-1.0
NaN

1
NaN
NaN

output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 21.2.2
Cython: 0.24
numpy: 1.11.0
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.1.2
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: 2.2.6
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.7.7
lxml: 3.4.4
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.38.0
pandas_datareader: None

Issue 2:
# Pandas version 0.17.1
import pandas as pd
df = pd.DataFrame({'Same': 1.0, ' Same': pd.np.nan, ' Same': pd.np.nan}, index=[0,1,2])
df.columns = [c.strip() for c in df.columns]
df.iloc[:, 2] # Returns all 1.0

df.iloc[:, 0] = df.iloc[:, 0].fillna(df.iloc[:, 1])

df.iloc[:, 2] # Column 2 is corrupted and returns all NaN
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1176 on 2009-07-17 by trac user mauro, assigned to unknown.

When making a deepcopy of a numpy.ndarray with dtype S a numpy.string_ is created.

I am not too familiar with the numpy types, but I think they are basically the same. However, they have different repr and this can make this somewhat confusing (it confused me).

Issue 2:
I cite Chris Baker's message from numpy discussion, since I encountered the exact same bug and I could not find it reporter here:

Hi folks,

In [264]: np.version

Out[264]: '1.7.0'

I just noticed that deep copying a rank-zero array yields a scalar --

probably not what we want.

In [242]: a1 = np.array(3)

In [243]: type(a1), a1

Out[243]: (numpy.ndarray, array(3))

In [244]: a2 = copy.deepcopy(a1)

In [245]: type(a2), a2

Out[245]: (numpy.int32, 3)

regular copy.copy() seems to work fine:

In [246]: a3 = copy.copy(a1)

In [247]: type(a3), a3

Out[247]: (numpy.ndarray, array(3))

Higher-rank arrays seem to work fine:

In [253]: a1 = np.array((3,4))

In [254]: type(a1), a1

Out[254]: (numpy.ndarray, array([3, 4]))

In [255]: a2 = copy.deepcopy(a1)

In [256]: type(a2), a2

Out[256]: (numpy.ndarray, array([3, 4]))

Array scalars seem to work fine as well:

In [257]: s1 = np.float32(3)

In [258]: s2 = copy.deepcopy(s1)

In [261]: type(s1), s1

Out[261]: (numpy.float32, 3.0)

In [262]: type(s2), s2

Out[262]: (numpy.float32, 3.0)

There are other ways to copy arrays, but in this case, I had a dict

with a bunch of arrays in it, and needed a deepcopy of the dict. I was

surprised to find that my rank-0 array got turned into a scalar.
Issue 1:
Code Sample, a copy-pastable example if possible

import pandas as pd
import numpy as np
print("Pandas version: ", pd.__version__) # mine: 0.21.0
print("Numpy version: ", np.__version__) # mine: 1.13.3

# generate some data
data = np.random.randn(1,20)
target = np.array( ['Test'] * len(data) ).reshape(-1,1)

data_and_target = np.hstack((data, target))
data_and_target_cols = ["c" + str(i) for i in range(data.shape[1])] + ['target']
data_and_target_df = pd.DataFrame(data_and_target, columns=data_and_target_cols)

print(data_and_target_df[data_and_target_df.columns.difference(['target'])].columns)

# the column order I would have expected / "workaround"
print(data_and_target_df[data_and_target_df.columns.values[~data_and_target_df.columns.str.contains('target')]].columns )

Problem description

I assumed that pandas.columns.difference has the same functionality as the longer expression given above under workaround.

It took me a long time to discover that "Index.difference" does not only remove the column but also sorts them in a lexical order.

This can cause major issues e.g. when transforming the table into numpy via DataFrame.values while not tracking columns.

It took me a long time to figure out that the degraded performance in my system was due to this call. I now know that the sorting is a documented feature; but maybe this is not an ideal behavior.

By reporting this I would like to put this to the discussion

Output of pd.show_versions()

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

pandas: 0.21.0

pytest: None

pip: 9.0.1

setuptools: 33.1.1.post20170320

Cython: None

numpy: 1.13.3

scipy: 0.19.0

pyarrow: None

xarray: None

IPython: 5.3.0

sphinx: None

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: None

tables: 3.4.2

numexpr: 2.6.2

feather: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: 0.999

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.9.5

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
I often want to remove certain elements from an index while retaining the original ordering of the index. For this reason a sort keyword in the index.difference method would be required:

In: index = pd.Index([0, 1, 2, 4, 3])
In: index.difference({1, 2})
Out: Int64Index([0, 3, 4], dtype='int64')
# It would be cool to have instead
In: index.difference({1, 2}, sort=False)
Out: Int64Index([0, 4, 3], dtype='int64')

I think that this usecase appears frequently and setting the default to sort=True doesn't affect existing code.
Issue 1:
I'm using Win 7, 64bit.

Atom version: 1.0.0

I'm using a Hungarian keyboard layout and I have trouble entering the open bracket [ symbol.

Pressing AltGr F produces this:

This is how special characters are laid out for us:

I'd expect this to be handled by default, without any extra configuration.

Issue 2:
Original issue: atom/atom#1625

Use https://atom.io/packages/keyboard-localization until this issue gets fixed (should be in the Blink upstream).
Issue 1:
Relevant StackOverflow question (which I actually just posted to).

I understand this isn't a showstopper but actually made me research a while before realizing there was also a row parameter that was meant to be used. Perhaps a error message could be displayed?

If you tell me what the intended behavior is I can try and make a pull request fixing it. 😄

Issue 2:
I'm trying to plot side-by-side heatmaps and I'm seeing this problem when sharey=True. The ordering of the data in all but the last subplot is reversed. But because the y axis is shared, the overall figure displays incorrectly.

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns

df1 = pd.DataFrame(np.random.random((10,10,)))
df1.loc[2] = 0
df2 = pd.DataFrame(np.random.random((10,10,)))
df2.loc[7] = 0

Without sharey=True

fig, ax = plt.subplots(1,2)
sns.heatmap(df1, ax=ax[0])
sns.heatmap(df2, ax=ax[1]);

Correctly shows as

With sharey=True

fig, ax = plt.subplots(1,2, sharey=True)
sns.heatmap(df1, ax=ax[0])
sns.heatmap(df2, ax=ax[1]);

shows as

The y axis on the left is reversed (and correctly labeled). But the values on the right are not reversed and because the y is shared, it is incorrect.

I can't tell if this related to #1306

I found this issue after looking at

https://stackoverflow.com/questions/28356359/one-colorbar-for-seaborn-heatmaps-in-subplot

Using the code from the accepted answer (from mwaskom),

fig, axn = plt.subplots(2, 2, sharex=True, sharey=True)
cbar_ax = fig.add_axes([.91, .3, .03, .4])

for i, ax in enumerate(axn.flat):
sns.heatmap(df1, ax=ax,
cbar=i == 0,
vmin=0, vmax=1,
cbar_ax=None if i else cbar_ax)

I'm getting plots 1, 2, 3 are reversed and 4 is okay. But in the original stackoverflow answer, all plots are okay (identical), so perhaps this is a bug in a recent version of seaborn?

I'm using seaborn 0.9.0, matplotlib 3.1.0, python 3.7.3 on Mac OS X 10.14.5.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Tabs that receive the prop centered should always center.

Current Behavior

They remain left aligned if they are also set scrollable.

Steps to Reproduce

https://codesandbox.io/s/kk371k1w75

Your Environment

Tech
Version

Material-UI
@next

React
16.2.0

browser
chrome

Issue 2:
For example please see

https://material-ui.com/_next/cae6bd4a-2104-4ec9-8977-c6f7c8c4e44c/page/api/app-bar/index.js

Also page progress indicator at the top of the page never stops.

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