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

import pandas as pd
import numpy as np
a = pd.DataFrame({'numbers': np.arange(10), 'categories': list('abcabcabcd')})
a['categories'] = a['categories'].astype('category')
b = pd.DataFrame({'numbers': np.arange(10)})

print a.dtypes
print a.categories.cat.categories
print

merged = pd.merge(a, b, left_index=True, right_index=True)

print merged.dtypes
print merged['categories'].cat.categories
print 'Merge ok!'
print

merged = pd.merge(a, b, on=['numbers'], how='left')
print merged.dtypes
try:
print merged['categories'].cat.categories #crashes
except:
print 'Merge not ok!'
print

Expected Output

The try block should print "categories" 's categories the same way as above, with:

Index([u'a', u'b', u'c', u'd'], dtype='object')

However, the data type is replaced to object/string.

This is not fixed by the v0.18.2 release, which fixes some of the merge issues where int's would get casted to floats when merging.

output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.11.final.0

python-bits: 64

OS: Linux

OS-release: 2.6.32-431.23.3.el6.x86_64

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

pandas: 0.17.1

nose: 1.3.7

pip: 7.1.2

setuptools: 20.3.1

Cython: 0.23.4

numpy: 1.10.4

scipy: 0.16.0

statsmodels: 0.6.1

IPython: 4.0.1

sphinx: 1.3.1

patsy: 0.4.0

dateutil: 2.4.2

pytz: 2015.7

blosc: None

bottleneck: 1.0.0

tables: 3.2.2

numexpr: 2.4.4

matplotlib: 1.5.0

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.9

pymysql: None

psycopg2: None

Jinja2: None

Issue 2:
xref #14351

None of the following merge operations retain the category types. Is this expected? How can I keep them?

Merging on a category type:

Consider the following:

A = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)),
'Y': np.random.choice(['one', 'two', 'three'], size=(10,))})
A['X'] = A['X'].astype('category')

B = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)),
'Z': np.random.choice(['jjj', 'kkk', 'sss'], size=(10,))})
B['X'] = B['X'].astype('category')

if I do the merge, we end up with:

> pd.merge(A, B, on='X').dtypes
X object
Y object
Z object
dtype: object

Merging on a non-category type:

A = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)),
'Y': np.random.choice(['one', 'two', 'three'], size=(10,))})
A['Y'] = A['Y'].astype('category')

B = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)),
'Z': np.random.choice(['jjj', 'kkk', 'sss'], size=(10,))})
B['Z'] = B['Z'].astype('category')

if I do the merge, we end up with:

pd.merge(A, B, on='X').dtypes
X object
Y object
Z object
dtype: object
Issue 1:
Apache Airflow version: 2.0.0b2

Environment:

Others: No K8S

What happened:

In the The Logs and All Instances buttons in the task model in the web UI are inoperative when not using Kubernetes.

What you expected to happen:

The buttons to have working links.

The dag.html updateModalUrls() function assumes that buttons.rendered_k8s is set, which is not the case when not using K8S.

This then results in an error and the buttons initialised after this point are not wired up:

18:28:17.990 Uncaught TypeError: elm is undefined
updateButtonUrl http://.../tree?dag_id=full_pipeline:1595
updateModalUrls http://.../tree?dag_id=full_pipeline:1616
call_modal http://.../tree?dag_id=full_pipeline:1665
update http://.../tree?dag_id=full_pipeline:1427
$/< http://.../static/dist/d3.min.js:1
i http://.../static/dist/d3.min.js:1
each http://.../static/dist/d3.min.js:3
Y http://.../static/dist/d3.min.js:1
each http://158.101.169.4:8080/static/dist/d3.min.js:3
on http://158.101.169.4:8080/static/dist/d3.min.js:3
update http://158.101.169.4:8080/tree?dag_id=full_pipeline:1420
<anonymous> http://158.101.169.4:8080/tree?dag_id=full_pipeline:1339
tree:1595:7

The call needs to be protected by a k8s_or_k8scelery_executor check.

Issue 2:
Apache Airflow version:2.0.0b2

Kubernetes version (if you are using kubernetes) (use kubectl version): NA

Environment:

Cloud provider or hardware configuration:

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

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

Clicking on the "Log" button in the popup for task instance in graph view doesn't link to the logs view.

What you expected to happen:

The log view should show up.

How to reproduce it:

Run any dag.

Open Graph VIew.

Click on any task.

Click on the "Log" button.

Anything else we need to know:

Check this in action here.
Issue 1:
ℹ Computer information

PowerToys version: v0.21.1

PowerToy Utility: FancyZones

Running PowerToys as Admin: No

Windows build number: 20H2 19042.541

📝 Provide detailed reproduction steps (if any)

Open the fancyZones' setting interface

Pick the Zone highlight color and click in the color value in hexadecimal

Click the cross button in the typing block

✔️ Expected result

The hexadecimal value been cleaned and allow users to type.

❌ Actual result

The setting interface crushed

📷 Screenshots

Issue 2:
ℹ Computer information

PowerToys version: 0.20.1

PowerToy Utility: Fancy Zones

Running PowerToys as Admin: yes

Windows build number: 10.0.19041.388

📝 Provide detailed reproduction steps (if any)

Open Settings: Fancy Zones

Go to edit one of the zone colors

In the color picker window, delete the #HEX value (ether manually or via the X button)

✔️ Expected result

What is the expected result of the above steps?

I think nothing? Similar to clearing one of the RGB boxes.

❌ Actual result

What is the actual result of the above steps?

UI freezes for one to five seconds and then closes.

PowerToys itself does not close all together.

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form
Issue 1:
As far as I know, polyfill functions are repeated in each file they are needed, resulting in lot of duplicate code.

I suggest to optionally emit them as a module, so that they appear once in a bundled project.

E.g. instead of:

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

var myclass= (function (_super) {
__extends(myclass, _super);
// ...

emit this:

var __extends = require("typescript-polyfills").extends;

var myclass= (function (_super) {
__extends(myclass, _super);
// ...

Issue 2:
I request a runtime type checking system that perhaps looks something like this:

function square(x: number!) {
return x * x;
}

Where the ! tells the compiler to generate a runtime type check for a number, something akin to tcomb.js.

Of course, this gets much more complicated with interfaces, but you get the idea.
Issue 1:
the following does not work

julia> let
global @inline function foo(x::T) where {T}
T
end
end

but the following does work

julia> let
global @inline function foo{T}(x::T)
T
end
end

Issue 2:
According the the manual

Profile.print should take a kwarg saying how many columns to print.

This is a useful feature I would like to use.

Here is what happens when I run the example code:

s = open("/tmp/prof.txt","w")
Profile.print(s,cols = 500)
close(s)

MethodError: no method matching print(::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}; cols=500)
you may have intended to import Base.print
Closest candidates are:
print{T<:Unsigned}(::IO, ::Array{T<:Unsigned,1}, ::Dict{K,V}; format, C, combine, sortedby, maxdepth) at profile.jl:88 got unsupported keyword argument "cols"
print{T<:Unsigned}(::IO, ::Array{T<:Unsigned,1}) at profile.jl:88 got unsupported keyword argument "cols"
print(::IO) at profile.jl:88 got unsupported keyword argument "cols"
in (::Base.Profile.#kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}) at <missing>:0
in (::Base.Profile.#kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream) at <missing>:0
in include_string(::String, ::String) at loading.jl:441
in eval(::Module, ::Any) at boot.jl:234
in (::Atom.##65#68)() at eval.jl:40
in withpath(::Atom.##65#68, ::Void) at utils.jl:30
in withpath(::Function, ::Void) at eval.jl:46
in macro expansion at eval.jl:109 [inlined]
in (::Atom.##64#67{Dict{String,Any}})() at task.jl:60

Looking in the source

it seems that now the number of columns is being determined by the displaysize.

Which has serveral problems:

Doesn't match docs

Not at all useful for deeply nestested code. I know my code, which isn't even that deep, is down to just a few letters for each function name, before it is cut-off, which makes it nearly useless

displaysize doesn't make sense when the output is not going to STDOUT anyway.
Issue 1:
Symfony version(s) affected: 4.1.0

Description

Symfony does not throw an exception Circular reference detected for service "%s", path: "%s". whenever I am using !tagged syntax.

How to reproduce

Create the following class:

<?php

namespace App\Services;

class MyService
{
private $services;

public function __construct(iterable $services)
{
$this->services = $services;
}
}

Create the following configuration:

App\Services\MyService:
arguments: ['@App\Services\MyService']

Now we will get Circular reference detected for service "App\Services\MyService", path: "App\Services\MyService -> App\Services\MyService"., it is fine.

Replace the configuration by the following code:

App\Services\MyService:
arguments:
- !tagged my-service
tags:
- {name: 'my-service'}

Symfony does not warn by exception about circular dependency. My real example was much more complex and actually it was my bug, but anyway would be nice to be informed about bug by semantic exception.

Possible Solution

Throw Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException in such cases, or add simple console commend to check if we have circular dependency.

Issue 2:
Q
A

Bug report?
yes/no

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4.3

class SomeInterface
{
public function supports(object $obj);
}

class ChainSome implements SomeInterface
{
/*
* @var SomeInterface[]
*/
private $somes;

public function __construct(iterable $somes)
{
$this->somes = $somes;
}

public function supports(object $obj)
{
foreach ($this->somes as $some) {
if ($some->supports($obj)) {
return true;
}
}
}
}

services:
_instanceof:
SomeInterface:
tags:
- { name: 'app.some' }

ChainSome:
arguments:
$somes: !tagged app.some

In this example ChainSome receive instance of self and code reach infinity loop.

Is this behavior is valid?

Maybe possible exclude self injection?
Issue 1:
version

current latest master (bfce376)

How to reproduce

create a file named main.jswith the following content:

console.log('hello');

start running deno watcher by cargo run -- run --watch --unstable main.js. At this point we can see an output like:

hello
Watcher Process terminated! Restarting on file change...

create a new file named new.js. Nothing happens on the terminal.

export const world = 'world';

edit main.js to the following and save it:

+import { world } from "./new.js";
console.log("hello");
+console.log(world);

When saving it, we get:

Watcher File change detected! Restarting!
hello
world
Watcher Process terminated! Restarting on file change...

edit the value of world in new.js and save it:

-export const world = "world";
+export const world = "Deno!";

When saving it, nothing happens although we expect hello\nDeno! to be printed.

I've already found the cause of this problem in the watcher implementation. This is because module resolution is done only once at the starting of the watcher. Basically we should resolve module every time any event is detected.

I'll look into this problem deeply and try to elabolate a solution.

Issue 2:
to reproduce:

watching A.ts
creating B.ts
editing A.ts to import B
editing B.ts
watcher doesn't restart
Issue 1:
Like this:

import { prefixes } from "https://ip-ranges.amazonaws.com/ip-ranges.json" assert {type: "json"}

error: Uncaught SyntaxError: The requested module 'https://ip-ranges.amazonaws.com/ip-ranges.json' does not provide an export named 'prefixes'

But you can look deno hints for deno plugins. And in fact, this json has prefixes fields.

This is my deno version

deno --version ─╯
deno 1.34.1 (release, x86_64-unknown-linux-gnu)
v8 11.5.150.2
typescript 5.0.4

Issue 2:
Hi, I'm really curious about this behavior; when importing a json in this way:

Works good. However this way:

It breaks.

I'm not sure about the standard about this but if the latest is not supported, the Deno lsp should inform this is an error.

Thanks.
Issue 1:
TypeScript Version: 1.8.0-beta

VS Code's Javascript Salsa language service seems to break down as soon as I type a dynamic require into the buffer. I lose all language features: intellisense, mark occurrences, etc. I can only get out of that state by reloading Code's window.

require('' + '');

Issue 2:
So I was googling and asking on StackOverflow. For now no clear answer. So decided to ask here as for me it is a blocker.

How can use the newest methods for existing JS types (like Array, Number)?

Array.from(someIterable) throws an error: error TS2339: Property 'from' does not exist on type 'ArrayConstructor'

I would appreciate any tip, how to make it work.
Issue 1:
When overriding an unknown style the following warning is logged: You are trying to overrides a style that do not exist..

Apart from the obvious typing error in the warning message, which should be fixed, I would like to suggest that the warning message also shows the respective style key.

Source file: https://github.com/callemall/material-ui/blob/fb8bcd94abf9f33e27bc60cda6d9e74d166f699e/src/styles/getStylesCreator.js#L18

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

Expected Behavior

When overriding a style which does not exist, I would like to know which style, which key respectively, does not exist.

Current Behavior

The shown warning in the console does not give any information about the wrong style key.

Steps to Reproduce (for bugs)

Create a theme override with an invalid style key, e.g.:

const theme = createMuiTheme({
overrides: {
invalidKey : { }
});

Open the JavaScript console.

The console shows bundle.js:6820 Warning: You are trying to overrides a style that do not exist.

Context

I recently updated to the most recent beta version and it seems that some style overrides are not longer available. I would like to track down the wrong style key without searching for it one-by-one.

Your Environment

Tech
Version

Material-UI
@next

Issue 2:
Checkbox value as number

Right now i will get an error if I try to pass number as value in Checkbox.

I don't think that there should be any restriction only on string?

Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `Checkbox`, expected `string`.

Tech
Version

Material-UI
v1.0.0-beta.24

React
16.2.0

browser
Any
Issue 1:
Are there any plans to add type stubs for PEP484-compliant static typing?

Issue 2:
I am trying to set up a flask application on my new machine. First I checked out the sources from our server - I am pretty sure the application directory structure is correct, as we are using it exactly like this on other machines.

However, when I try to run the app on my new computer I get the following error:

$ FLASK_ENV="development" FLASK_APP="run.py" flask run
* Serving Flask app 'run.py' (lazy loading)
* Environment: development
* Debug mode: on
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'run', an ImportError was raised.

Problem is: No more output is printed, in particular no stack trace. So I don't know what exactly the problem is. How can I tell flask to print the stack trace?

Environment:

Python version: 3.8.10

Flask version: 2.0.2
Issue 1:
[x ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

NextJS sample application should load without any issue.

Current Behavior

v1.0.0-beta.28 broke something in theming. My code still works fine with v1.0.0-beta.27. Getting the following error in v1.0.0-beta.28

TypeError: Cannot read property 'charAt' of undefined

at decomposeColor (/user_code/node_modules/material-ui/styles/colorManipulator.js:80:12)

at lighten (/user_code/node_modules/material-ui/styles/colorManipulator.js:226:11)

at createPalette (/user_code/node_modules/material-ui/styles/createPalette.js:144:51)

at createMuiTheme (/user_code/node_modules/material-ui/styles/createMuiTheme.js:71:45)

at Object. (/user_code/next/dist/components/getPageContext.js:31:40)

at Module._compile (module.js:570:32)

at Object.Module._extensions..js (module.js:579:10)

at Module.load (module.js:487:32)

at tryModuleLoad (module.js:446:12)

at Function.Module._load (module.js:438:3)

Steps to Reproduce (for bugs)

Run the sample NextJS app with v1.0.0-beta.28 and v1.0.0-beta.27. In v1.0.0-beta.28, you'll get the above error.

Environment

Tech
Version

"next": "^4.2.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"material-ui": "v1.0.0-beta.28",

Issue 2:
I am using the latest "v1.0.0-beta.20".

const theme = createMuiTheme({
palette: {
primary: grey[100],
secondary: blue['A400']
},
});

TypeError: Cannot read property 'charAt' of undefined
decomposeColor
node_modules/material-ui/styles/colorManipulator.js:106
103 | * @returns {{type: string, values: number[]}} A MUI color object
104 | */
105 | function decomposeColor(color) {
> 106 | if (color.charAt(0) === '#') {
107 | return decomposeColor(convertHexToRGB(color));
108 | }
109 |

where as this works, Any idea whats happening here ?

const theme = createMuiTheme({
palette: {
primary: grey,
secondary: blue
},
});
Issue 1:
by alexandru@mosoi.ro:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. This bug is a duplicate of bug 3511 which was not correctly fixed
https://golang.org/issue/3511

If req.Method == 'POST' (anything other than GET and HEAD) the bug can be still
reproduced.

2. Here is how to patch test to reproduce the failure.

diff -r 1e84edee3397 src/pkg/net/http/client_test.go
--- a/src/pkg/net/http/client_test.go Tue Aug 21 20:59:02 2012 +1000
+++ b/src/pkg/net/http/client_test.go Tue Aug 21 22:45:37 2012 +0200
@@ -284,6 +284,10 @@
req, _ := NewRequest("GET", us, nil)
client.Do(req) // Note: doesn't hit network
matchReturnedCookies(t, expectedCookies, tr.req.Cookies())
+
+ req, _ = NewRequest("POST", us, nil)
+ client.Do(req) // Note: doesn't hit network
+ matchReturnedCookies(t, expectedCookies, tr.req.Cookies())
}

// Just enough correctness for our redirect tests. Uses the URL.Host as the

3. Currently if req.Method == 'POST', send() is invoked which doesn't set the cookies.
The fix to bug 3511 did not set the cookies on all possible code paths.

What is the expected output?

HTTP cookies set for all methods.

What do you see instead?

HTTP cookies are not set for POST, PUT, etc.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

Ubuntu 12.04 LTS (with custom go installation).

Which version are you using? (run 'go version')

go version weekly.2012-03-27 +1e84edee3397

Issue 2:
by parenthephobia:

What steps will reproduce the problem?

package main

func main () {
a := make(map[int] int);
b := make(map[int] int);
c := make(map[int] int);
k := 1;
a[k], b[k], c[k] = 1, 2, 3;
}

I expected:

No output, but successful compilation.

But instead got:

The compiler segfaults without comment.

What is your $GOOS? $GOARCH?

linux, 386

Which revision are you using? (hg identify)

I don't know at the moment. I did hg pull -u before reporting the bug,
but unfortunately the build is broken on my current revision.

Please provide any additional information below.

Presumably this is caused by the way maps are handled. It looks like Go
doesn't handle parallel assignments when some of the places being assigned
to are maps.
Issue 1:
Any plan to support redis-cluster?

I think redis-cluster can be simply implement by inheriting celery.backend.redis.RedisBackend, Is there any plan to do that?

Issue 2:
The python Redis Cluster lib Grokzen/redis-py-cluster is considered production ready, therefore suitable for integrating Redis Cluster into Celery (in the future redis-py-cluster will be integrated in redis-py, currently used by Celery).

As far as I can understand, Redis Cluster should be integrated in Kombu first (celery/kombu#526)
Issue 1:
Bug summary

distutils is deprecated in Python 3.10: https://docs.python.org/3/library/distutils.html

Matplotlib (as of 3.4.3) currently uses distutils, so users are met with DeprecationWarnings when using on Python 3.10.

from matplotlib import pyplot
.tox/py/lib/python3.10/site-packages/matplotlib/__init__.py:88: in <module>
from distutils.version import LooseVersion
/usr/local/lib/python3.10/distutils/__init__.py:19: in <module>
warnings.warn(_DEPRECATION_MESSAGE,
E DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

Code for reproduction

from matplotlib import pyplot

Actual outcome

DeprecationWarning raised per summary.

Expected outcome

No DeprecationWarnings raised

Additional information

No response

Operating system

macOS

Matplotlib Version

3.4.3

Matplotlib Backend

No response

Python version

Python 3.10.0

Jupyter version

No response

Installation

pip

Issue 2:
Bug summary

Python 3.10 formally deprecated distutils.

DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

matplotlib still contains a few occurrences which should probably be removed:

setup.py:from distutils.errors import CompileError
setup.py:from distutils.dist import Distribution
setup.py:setup( # Finally, pass this all along to distutils to do the heavy lifting.
setupext.py:from distutils import ccompiler, sysconfig
setupext.py:from distutils.core import Extension
setupext.py: Return or yield a list of C extensions (`distutils.core.Extension`

Code for reproduction

-

Actual outcome

Expected outcome

Operating system

Ubuntu

Matplotlib Version

master

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Other libraries

No response

Installation

No response

Conda channel

No response
Issue 1:
Is there anything wrong with my code?

Why is the picture like this?

Issue 2:
With this layout:

<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/media_bubble_height"
android:layout_height="@dimen/media_bubble_height"
android:layout_marginBottom="5dp"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:adjustViewBounds="true">

<ImageView android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:clickable="false"
android:longClickable="false"
android:scaleType="fitCenter"/>

</FrameLayout>

Loading a gif into the ImageView:

GlideApp.with(getContext())
.load(model)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.transform(new RoundedCorners(radius))
.transition(withCrossFade())
.into(image);

Consistently produces these glitches in Glide 4.2.0:

Happens for every gif I try, here's a sample:

https://media.giphy.com/media/xUNd9W5Wbh8cRmdFBe/giphy.gif

In Glide 3.7 I used a custom RoundedCorners transformation (I don't think one came with Glide?) and this wasn't an issue.

Glide Version: 4.2.0