WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
There is a lot of semi-duplication / differences in the Series() and DataFrame() methods.

Maybe it's worth taking a look through them and regularising.

Fwiw, I prefer tostring vs. to_string

Also, would be nice to have tohtml on things, though expanding it is beyond the scope of this.

Issue 2:
I've needed this feature 3 or 4 times recently.

The way I've typically done it is by making a new dataframe, concatenating the many dataframes after renaming their columns to identify to which dataframe they originally belonged, dropping all NA from the concatenated dataframe, and then splitting up this dataframe and assigning it to the individual dataframes from before.

What is a better, less hacky way of doing this?

Can it already be done easily with an existing function in Pandas?
Issue 1:
Glide Version: 3.8.0

Integration libraries: none

Device/Android Version: any

Issue details / Repro steps / Use case background:

I try to load a gradient, which is defined as my_gradient.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:type="linear"
android:angle="0"
android:startColor="#f6ee19"
android:endColor="#115ede" />
</shape>

Loading code:

Glide.with(context).load(R.id.my_gradient).crossFade().into(imageView);

But the ImageView is still empty.

If I create GradientDrawable programmatically I get the following exception:

GradientDrawable gd = new GradientDrawable(
GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF616261, 0xFF131313});
gd.setCornerRadius(0f);
Glide.with(context).load(gd).crossFade().into(imageView);

java.lang.IllegalArgumentException: Unknown type class android.graphics.drawable.GradientDrawable. You must provide a Model of a type for which there is a registered ModelLoader, if you are using a custom model, you must first call Glide#register with a ModelLoaderFactory for your custom model class
at com.bumptech.glide.RequestManager.loadGeneric(RequestManager.java:629)
at com.bumptech.glide.RequestManager.load(RequestManager.java:598)

Do I something wrong or there is no way to load gradients with Glide?

Issue 2:
Idea

Glide.with(this).load(bitmap).into(imageView);
Glide.with(this).load(drawable).into(imageView);

This looks weird compared to ImageView.setImageBitmap(bitmap), but if you need animation and error handling (null bitmap), the above could become an easy to use, fire and forget, go-to line instead of duplicating code.

Note: you've already made a wrapper of ImageView#setImageResource and ImageView#setImageUri.

Currently they throw

Caused by: java.lang.IllegalArgumentException: Unknown type android.graphics.Bitmap@44759ab8. You must provide a Model of a type for which there is a registered ModelLoader, if you are using a custom model, you must first call Glide#register with a ModelLoaderFactory for your custom model class.

at com.bumptech.glide.RequestManager.loadGeneric(RequestManager.java:382)

at com.bumptech.glide.RequestManager.load(RequestManager.java:374)

Context

This came up when I was trying to display a captured image using Glide (oversimplified code):

startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), Activity.RESULT_FIRST_USER);

public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == REQUEST_CODE_GET_PICTURE && resultCode == Activity.RESULT_OK) {
Bitmap bitmap = (Bitmap)data.getExtras().get("data");
Glide.with(this).load(bitmap)/*...*/.into(image);
Issue 1:
Load stocks app.

Wait for it to load completely.

Tap a row.

Wait for the transition to complete.

Hit back.

[StockRowPartKey AAPL:arrow] is seen twice somehow.

Issue 2:
There should be real way to execute code in background. I know that this is a duplicate. But it is FFF***ing hard to create a simple alarm clock using a Framework that "almighty Google" supports.
Issue 1:
The plotting functions on DataFrames always have grid=True. This overrides user settings in matplotlibrc.

If you have to created a desired default plot style with the rc file, you want every plot to show with this style unless otherwise specified.

Because pandas overrides this setting you have to manually set the grid option every time.

A better behaviour would be for Pandas not to override any plot styles by default.

Issue 2:
When using df.plot() to creat a simple line chart from a dataframe, the expected behavior is that, if no 'grid' keyword is passed, the plot will default to the matplotlib 'axes.grid' rcParam setting to determine whether to show a grid or not. However (in 0.16), the grid is always being shown, regardless of the matplotlib setting, unless I explicitly pass grid=False.

In general, there are several plot types where grid=True is forced, which basically breaks the consistent styling that you get from matplotlib rcparams or another package like Seaborn. I can understand forcing a default grid=False for the type of plots where a grid doesn't make sense, but forcing grid=True, overriding the configured defaults, for things like boxplots seems a bit counter intuitive.
Issue 1:
When making higher order functions that return functions, type parameters are not preserved in return type. Notice in the following example how identityM has the generic type parameter A changed into {}, resulting in a loss of type safety in the rest of the code.

Ideally identityM would have the type <A>(a: A) => A. If this isn't possible, issuing a compiler warning (or error) about loss of genericity would be very helpful in tracking down errors like this.

function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
function identity<A>(a: A): A { return a; }
var identityM = mirror(identity); // type: (a: {}) => {}

var x = 1;
var y = identity(x); // type: number
var z = identityM(x); // type: {}

Issue 2:
Motivating example (one of many):

function compare<T>(lhs: T, rhs: T): boolean {
return lhs === rhs;
}

if(compare('1', 1)) { // Expected: Error -- I made 'compare' generic for a reason!
/* ... */
}

Proposal

When generic type inference performs its Best Common Type operation (4.12.2), it should be an error if this returns {} when {} was not one of the input types.

This is entirely consistent with other behavior already in the compiler:

var foo = bar ? '1' : 1; // Error, no BCT between '1' and 1
function fn() { // Error, no BCT between '1' and 1
if(foo) {
return '1';
} else {
return 1;
}
}

Open Questions

From @KamyarNazeri -- should this apply when there are zero input types? e.g.:

class List<T> {
items: T[];
}

var x = new List(); // Probably want an error here

That seems desirable, but has some collateral damage:

function foo<T>(x: number, a?: T, b?: T) { }
foo(0); // Error, zero input types provided for inference

This would come up slightly more often than naively expected because many .d.ts authors (mistakenly) create generic types which don't actually consume their type parameters. Perhaps this warning would effectively discourage them from doing so?
Issue 1:
// https://msdn.microsoft.com/en-us/library/windows/apps/hh700334.aspx

tempFolder.createFileAsync("tempfile.txt", Windows.Storage.CreationCollisionOption.replaceExisting)
.then(function (tempFile) {
// The createFileAsync call succeeded, so start the download operation.
var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();
var transfer = downloader.createDownload(uriExample, tempFile);
return transfer.startAsync();
})

Copy-pasting this to Visual Studio makes this (with 2-space indent):

tempFolder.createFileAsync("tempfile.txt", Windows.Storage.CreationCollisionOption.replaceExisting)
.then(function (tempFile) {
// The createFileAsync call succeeded, so start the download operation.
var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();
var transfer = downloader.createDownload(uriExample, tempFile);
return transfer.startAsync();
})

This in fact worked in older version of TypeScript (I think the last version was 1.1), but now it's hard to make Promise chains.

// This is how I deal with Promise now
somePromise().then(() => {
}).then(() => {
});

// Not good...
somePromise().then(() => otherPromise(
param1,
"long-string, let's say it's a URL."
).then(() => {
blah();
});

// Doesn't work
somePromise()
.then(() => otherPromise(
param1,
"long-string, let's say it's a URL."
)
.then(() => {
blah();
});

Can we get this better so that the MSDN example just work?

Issue 2:
I have the following code:

query(id: number) {
return this.$http
.get('/api/Entity/' + id)
.then(function (data) {
return data.data; // (a)
}); // (b)
}

When I type the semi-colon at point (a), it gets correctly indented. When a type a semi-colon at point (b), both lines get 4 columns to the left, which is the same output when a format the whole document.

I must add it gets on my nerves.

Any way to avoid it? Tks
Issue 1:
Discussed in #1818 and submitted a PR in #5140. Because the team is rewriting the compiler. The PR cannot be rebased. cc @tbosch

class MyClass {
constructor(@Attributes() atts: Map<string, string>)
}
//Originally, @Attribute('foo') returns Map.get('foo'), now support @Attribute() to return the Map.

PS: About @attribute() vs @attribute, since all decorators from angular has parentheses and according to the developer guides: 'Always include the parentheses! Always call @Injectable(). Our application will fail mysteriously if we forget the parentheses.' So I think we should use @attribute()

Issue 2:
In the existing material design library for Angular 1, there are some components that use a concept of "responsive attributes". Say you have a component like md-grid-list, which has an attribute cols. You can specify the value conditionally on screen size, for example:

cols-sm="2" // Small screen size
cols-lt-lg="4" // Less than large screen size

We currently have a way to inject a single attribute (@Attribute('cols')), but the number of combinations gets large quickly (this one attribute has 9). One could also set up properties, but again it's a lot of boilerplate and unnecessary bindings.

One solution would be to allow injection of a <string, string> attribute map.

As a workaround, when per-component renderers are supported, the renderer can read the attributes and pass the values back to the directive via an event.
Issue 1:
Mathieu Larchet opened SPR-1718 and commented

When configuring a PropertyPlaceHolderConfigurer for external property file, ${xxx} parsing fail for abstract beans.

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

<property name="location">

<value>/WEB-INF/classes/properties/config.properties</value>

</property>

</bean>

<bean id="test1" class="myproject.Test">

<property name="name"><value>${name}</value></property> <---- Ok it works fine

</bean>

<bean id="template" abstract="true">

<property name="test"><ref bean="test1" /></property>

</bean>

<bean id="concrete" class="myproject.Foo" parent="template">

<property name="mail"><value>${mail}</value></property> <---- Error property 'mail' is set to value '${mail}' instead of 'myaddress@mydomain.com'

</bean>

Affects: 2.0 M2

Issue Links:

#6438 ${..} property placeholder broken in 2-m2, was working on 2-m1 ("is duplicated by")

#6416 PropertyPlaceholderConfigurer behaves differently in 2.0M2 than in 1.2.6. Some properties are not replaced. ("is duplicated by")

Issue 2:
Radim Tlusty opened SPR-6379 and commented

it's probably related to #10432.

I think, that the issue is in DefaultBeanDefinitionDocumentReader class. In 3.0.0.RC1 there was used call 'ResourcePatternUtils.isUrl(location)', in 3.0.0.RC2 it's changed and I think, that it's related to this correction.

When the classes are unpacked, it leads to transformation of classpath* URL to file URL, which causes the problem.

Attach is simple test case, which works in 3.0.0.RC1, but fail on 3.0.0.RC2.

Affects: 3.0 RC2

Attachments:

SPR-5762.ZIP (2.78 kB)

Issue Links:

#11032 Cannot import bean definitions using classpath*: resource location ("duplicates")
Issue 1:
Hi folks,

Wondering if someone can please help with this import error on a fresh install.

Background: Recently started a new conda environment with a couple of basics like jupyter, numpy, scipy. I'm using MacOS High Sierra 10.13.4, and python3.7

The specific error is:

---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-77da20ac745a> in <module>
----> 1 from jax import vmap # for auto-vectorizing functions
2 from functools import partial # for use with vmap
3 from jax import jit # for compiling functions for speedup
4 from jax import random # stax initialization uses jax.random
5 from jax.experimental import stax # neural network library

...

~/miniconda3/envs/lew_jax/lib/python3.7/site-packages/jaxlib/xla_client.py in <module>
36 # and TensorFlow may fail with duplicate protocol buffer message definitions.
37
---> 38 from . import xla_extension as _xla
39 from .xla_extension import ops
40

ImportError: dlopen(/Users/lmar3213/miniconda3/envs/lew_jax/lib/python3.7/site-packages/jaxlib/xla_extension.so, 2): Symbol not found: ____chkstk_darwin
Referenced from: /Users/lmar3213/miniconda3/envs/lew_jax/lib/python3.7/site-packages/jaxlib/xla_extension.so (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/lmar3213/miniconda3/envs/lew_jax/lib/python3.7/site-packages/jaxlib/xla_extension.so

To install, I ran as per the installation instructions i.e. pip install --upgrade pip which was already up to date, and then pip install --upgrade jax jaxlib which installed happily.

The only clue I have as to understanding the error is that it mentions xla_extension.so was built for mac OS X 10.15 but Im on 10.13. Any help is appreciated! Thankyou!

Issue 2:
Steps to reproduce:

import functools

from absl import app
import jax
from jax.experimental import maps
from jax.experimental.pjit import PartitionSpec
from jax.experimental.pjit import pjit
import numpy as np

jax.config.update('jax_parallel_functions_output_gda', True)

@functools.partial(
pjit,
in_axis_resources=(),
out_axis_resources=PartitionSpec('x'),
)
def f():
return jax.numpy.zeros([32, 10])

def main(argv):
del argv # Unused
with maps.Mesh(np.asarray(jax.devices()), axis_names=['x']):
print(f().shape)
print(jax.eval_shape(f))

if __name__ == '__main__':
app.run(main)

Expected output:

(32, 10)
ShapeDtypeStruct(shape=(32, 10), dtype=float32)

Observed output:

(32, 10)
ShapeDtypeStruct(shape=(16, 10), dtype=float32)

More generally, it would be nice if eval_shape() could recognise GlobalDeviceArray and produce a subtype of ShapeDtypeStruct conveying not just global shape but also the shard index and replica information derived from the corresponding PartitionSpec. Otherwise it is currently very hard to work out what shape a GlobalDeviceArray is going to have and what shape its shards will have.
Issue 1:
I am getting this error when printing an array or a sparse matrix:

Virals-MacBook-Pro 05:50:20 {master} ~/julia$ ./julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+457 (2013-12-14 06:36 UTC)
_/ |\__'_|_|_|\__'_| | Commit f60db95* (0 days old master)
|__/ | x86_64-apple-darwin13.0.1

julia> rand(500)
500-element Array{Float64,1}:
Evaluation succeeded, but an error occurred while showing value of type Array{Float64,1}:
ERROR: premature end of integer: "31"
in error at error.jl:21
in parseint_nocheck at string.jl:1476
in parseint at string.jl:1513
in writemime at repl.jl:21
in display at multimedia.jl:117
in display at multimedia.jl:119
in display at multimedia.jl:151

Issue 2:
On 2e56f22 and Mac OS 10.9 I get:

$ julia -p 2
ERROR: premature end of integer: "9009"
in error at error.jl:21
in parseint_nocheck at string.jl:1476
in parseint at string.jl:1515
in parse_connection_info at multi.jl:1076
in read_worker_host_port at multi.jl:1009
in read_cb_response at multi.jl:981
in addprocs at multi.jl:1205
Issue 1:
Here is the ES7 proposal:

https://github.com/sebmarkbage/ecmascript-rest-spread

Rest Properties

let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
x; // 1
y; // 2
z; // { a: 3, b: 4 }

Spread Properties

let n = { x, y, ...z };
n; // { x: 1, y: 2, a: 3, b: 4 }

Issue 2:
es7 proposal : https://github.com/sebmarkbage/ecmascript-rest-spread

Spread properties

Typing

In my opinion the goal of this method is to be able to duplicate an object and changing some props, so I think it's particularly important in this case to not check duplicate property declaration :

var obj = { x: 1, y: 2};
var obj1 = {...obj, z: 3, y: 4}; // not an error

I have a very naive type check algorithm for a similar feature (JSXSpreadAttribute) in my little jsx-typescript fork: I just copy the properties of the spread object in the properties table when I encounter a spread object, and override those property if I encounter a declaration with a similar name.

Emitting

jstransform use Object.assign, babel introduce a shim:

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

We could either force the presence of assign function on ObjectConstructor interface, or provide a similar function (with a different name).

I think that the optimal solution would be to not emit any helper in es6 target (or if Object.assign is defined), and to emit an helper function for es5, es3.

var obj = { x: 1, y: 2};
var obj1 = {...obj, z: 3};

/// ES6 emit
var obj = {x: 1, y: 2};
var obj1= Object.assign({}, obj, { z: 3 });

//ES3 emit
var __assign = function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};

var obj = {x: 1, y: 2};
var obj1= __assign({}, obj, { z: 3 });

Rest properties

Typing

For simple object the new type is a subtype of the assignation that does not contains properties that has been captured before the rest properties :

var obj = {x:1, y: 1, z: 1};
var {z, ...obj1} = obj;
obj1// {x: number; y:number};

If the destructuring assignment has an index declaration, the result has also a similar index declaration:

var obj: { [string: string]: string };
var {[excludedId], ...obj1} = obj;
obj1// { [string: string]: string };

new/call declarations are obviously not captured:

var obj: { (): void; property: string};
var { ...obj1} = obj;
obj1// { property: string };

Emitting

It is not possible to emit rest properties without an helper function, this one is from babel:

var obj = {x:1, y: 1, z: 1};
var {z, ...obj1} = obj;

var __objectWithoutProperties = function(obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};

var obj = {x:1, y: 1, z: 1};
var z = obj.z;
var obj1 = __objectWithoutProperties(obj, ["z"]);

Edit: added some little typing/emitting example
Issue 1:
ℹ Computer information

PowerToys version: 22.0

PowerToy Utility: FancyZones

Running PowerToys as Admin: yes

Windows build number: version 1909 (OS build 18363.1082)

📝 Provide detailed reproduction steps (if any)

2 monitors: 1 is 144hz the other is 60hz

PC turns on, PT opens on startup as admin

using win+` or opening the settings and then editor to select the zone set up I want to use

hitting apply on a custom or template zone

drag a window while holding shift or right click to place a window into a desired zone

note make windows transparent when dragging is on, also wallpaper engine is running, but that program provides no conflicts for FancyZones for my friend who uses 1 monitor.

✔️ Expected result:

FancyZones works as intended and windows snap to their zones

❌ Actual result:

The windows will go transparent when I am dragging them, but they have nothing to snap to and refuse to snap. First screen shot is the preview of the zone being selected. Second screen shot is a clip from a quick recording of what happens when I have zones enabled(hence transparency) and try to drag it to the desired zone. Spotify was used as an example here.

Issue 2:
ℹ Computer information

PowerToys version: v0.21.1

PowerToy Utility: FancyZones

Running PowerToys as Admin: No

Windows build number: Windows 10 Version 2004: 19041.450

📝 Provide detailed reproduction steps (if any)

Check the Allow zones to span across monitors checkbox

Configure a zone which uses multiple monitors via the Launch zones editor and Apply

Attempt to snap window to zones, or use Shift key to highlight zones while dragging

✔️ Expected result

A window should snap to a zone

Zone highlighting ought to be functional

The Allow zones to span across monitors setting should persist even when closing settings

If there are errors "Activating" the zones, these should be raised to the user

❌ Actual result

A window will not snap to a zone when the Allow zones to span across monitors is configured

Window zone highlighting is also not functional

When FancyZones settings is closed and re-opened, the Allow zones to span across monitors checkbox is unchecked

When Allow zones to span across monitors is toggled to checked, then unchecked, zone highlighting and snapping functions, though obviously not with the multi-monitor zones

📝 Other Notes

There is a difference in framerate/refresh rate between the two monitors--could that be an issue?

System is a SurfaceBook 2 in a Surface Dock which drives a 2560 x 1440 monitor at 60 fps and a 2560 x 1440 monitor at 30 fps

The fps cannot be made the same as far as I can tell. Likely a hardware limitation.

Display is an LG 49 ultra-wide ( 5120 x 1440)

📷 Screenshots

FancyZones Settings:

Zone Editor spanning monitors:

Monitor configuration:
Issue 1:
The Toolbar component not respecting custom theme settings.

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

Expected Behavior

The toolbar component should respect custom theme settings.

Current Behavior

When overriding the toolbar style params in a custom theme they are not being applied.

Steps to Reproduce (for bugs)

Create a custom theme overriding the toolbar defaults (e.g.)

createMuiTheme({
palette: {
type: 'light',
},
toolbar: {
'backgroundColor': 'red',
'minHeight': 60,
'@media (min-width:0px) and (orientation: landscape)': {
minHeight: 60
},
'@media (min-width:600px)': {
minHeight: 60
}
}
});

Inspect the toolbar after render. The background color isn't red and the minHeight remains at the default 64px.

Doing the same with a direct style override works fine (with the exception that min-width in the @media query must be specified as minWidth (e.g.)

const styles = {
toolbar: {
backgroundColor': 'red',
'minHeight': 60,
'@media (minWidth:0px) and (orientation: landscape)': {
minHeight: 60
},
'@media (minWidth:600px)': {
minHeight: 60
}
}
};

...

Context

Unable to use theme as designed

Your Environment

Tech
Version

Material-UI
1.0.0-beta.12

React
16.0.0

browser
Chrome 61.0.3163.100

Issue 2:
Problem Description

When browsing http://www.material-ui.com/ using tablet (e.g., Ipad), the website seems doesn't respond correctly.

For instance, this page can not be opened. Also, touch events in components like left nav behave strangely.

Versions

Material-UI: 0.14.4

React: N/A

Browser: ipad chrome, ipad safari