WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have just spent quite some time debugging my code because the absolute value function might return negative values. See the following working example:

import numpy as np
np.array([-32768,-3000],dtype=np.dtype('int16'))
np.abs(_)

While the second value is converted to +3000 as expected, the second value is left untouched. I understand that +32768 is out of range for this datatype but I am interested whether returning -32768 is a concious design choice as I was expecting positive values from this function no matter what.

Issue 2:
There are some functions that fail when passed Decimal objects as scalar inputs. I'm not particularly interested in using Decimal arrays, for obvious reasons, but the lack of scalar support limits our ability (see Turbo87/utm#40) to use numpy as a 'better' math module in a certain sense. I'm not sure if you would consider this a bug or not. Certainly we can work around it easily, if awkwardly.

Relevant for our use cases, this applies to: amax, amin, sin, cos, degrees and radians. The sqrt function seems to already work however.

Prior art suggesting that Decimal support is not irrelevant to numpy: #9952

Reproducing code example:

from decimal import Decimal
import numpy as np
np.sin(Decimal(1))

Error message:

----> 1 np.sin(Decimal(1))

AttributeError: 'decimal.Decimal' object has no attribute 'sin'

Numpy/Python version information:

1.16.4 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
Issue 1:
Symfony version(s) affected: 4.2

Description

I am building an affiliation system in my app. After user registered as an affiliate a new ROLE_AFFILIATE is added to the user. But user is denied access to route even after updating the isEqualeTo method. I have to logout first then login again in order to get things work.

Thanks you !

Issue 2:
I'm implementing the security component in my app and was surprised to find that a user's roles are decided at login time and cannot be easily updated after that. While the chosen UserInterface object can be refreshed on each load to check for changes (like the password changing or any other details), there is no way to check to see if the user's roles have changed since login. My roles are coming from the UserInterface getRoles method.

This means if I have an admin user for example and I remove their admin abilities, they remain an admin until they decide to log out. Or moving a user to a "banned" role would have no effect.

Ideally, a UsernamePasswordToken or any other token that contains a UserInterface object would check the UserInterface object's getRoles method to see if the roles have changed. But even just a setRoles method on AbstractToken would be useful so that the option is there to keep user's roles fresh.

Of course I may be missing something that allows you to make sure a user's roles are kept fresh so I'd love to hear about it :)
Issue 1:
Would be nice to have kubectl stats podName work like docker stats (basically a top like interface on the client that connects to an endpoint streaming data every second). I think this should be pretty straightforward, since the kubelet server already supports requests for /stats/ns/podname/uid/containername

Would be even better to have kubectl show stats consumed by a service, rc across the cluster.

Issue 2:
We saw this in Jenkins. The following loops until the test is killed:

[1] INFO: 9 / 14 pods in namespace 'kube-system' are running and ready (20 seconds elapsed)
[1] INFO: POD NODE PHASE CONDITIONS
[1] INFO: kube-ui-v1-bp9s2 pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-dk10d pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-eahns pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-zvxka pull-e2e-2-minion-yl9w Failed []
[1] INFO: monitoring-heapster-v5-5v5rp pull-e2e-2-minion-yl9w Failed []
[1] INFO:
[1] INFO: 9 / 14 pods in namespace 'kube-system' are running and ready (20 seconds elapsed)
[1] INFO: POD NODE PHASE CONDITIONS
[1] INFO: kube-ui-v1-bp9s2 pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-dk10d pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-eahns pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-zvxka pull-e2e-2-minion-yl9w Failed []
[1] INFO: monitoring-heapster-v5-5v5rp pull-e2e-2-minion-yl9w Failed []
[1] INFO:
[1] INFO: 9 / 14 pods in namespace 'kube-system' are running and ready (20 seconds elapsed)
[1] INFO: POD NODE PHASE CONDITIONS
[1] INFO: kube-ui-v1-bp9s2 pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-dk10d pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-eahns pull-e2e-2-minion-yl9w Failed []
[1] INFO: kube-ui-v1-zvxka pull-e2e-2-minion-yl9w Failed []
[1] INFO: monitoring-heapster-v5-5v5rp pull-e2e-2-minion-yl9w Failed []
[1] INFO:
...

I saw this once so haven't yet assessed its frequency.

@ixdy says he thinks he has seen the same failure a few times, and linked artifacts (for those with permissions):

https://console.developers.google.com/storage/browser/kubernetes-jenkins/pr-logs/739cb2f526f15e7c82ef7c476a1458ad68b09fd1/kubernetes-pull-build-test-e2e-gce/2246/_artifacts/

+cc @rjnagal for labeling/triage/xref:#11018
Issue 1:
Electron version: 2.0.0-beta.1

Operating system: masOS High Sierra 10.13.4 Beta (17E150g)

Expected behavior

When I clicked one of the Menu Items, the click function should be triggered.

Actual behavior

After clicking the menu item, nothing happened. However, I've tested on Window 10 and it worked fine.

How to reproduce

Just clone https://github.com/qazbnm456/electron-quick-start and run.

When clicking the only entry on the context menu, there's no any message logged in the console panel.

Issue 2:
Electron version: Electron built at aea06ed

Operating system: macOS 10.13.2

Expected behavior

MenuItem click handlers should get called in the popped up context menu.

Actual behavior

Click handlers never getting called back.

How to reproduce

Open a popup in the main window:

window.webContents.on('context-menu', (event) => {
const menu = new Menu()
menu.append(new MenuItem({label: 'MenuItem1', click() { console.log('item 1 clicked') }}))
menu.append(new MenuItem({type: 'separator'}))
menu.append(new MenuItem({label: 'MenuItem2', type: 'checkbox', checked: true}))
menu.popup(mainWindow)
})

Right click on the running window and select MenuItem1, the log item 1 clicked should print but doesn't.
Issue 1:
This could be considered a bug or a feature request. I say this because I know that React is checking for W3C valid attribute property names, but the check is run inconsistently between normal components and custom components which makes its behavior confusing. That means this could be feature to be more explicit about its behavior.

For my particular use case, this only needs to be improved upon in react-dom/server. I am trying to render custom properties like those belonging to amphtml, particularly the amp-bind API which requires [ and ] in property names. I think that the check for valid attribute property names should only throw warnings, or it should have an option to prevent the removal of custom properties.

Example:

JS

const customProps = {
"[custom-property]": "Hello, world!"
};

JSX

<div>
<div {...customProps}>Test</div>
<custom-component {...customProps}>Test</custom-component>
</div>

Resulting HTML

<div data-reactroot="">
<div [custom-property]="Hello, world!">Test</div>
<custom-component>Test</custom-component>
</div>

This throws a warning only for the <custom-component />.

Try it out in CodeSandbox: https://codesandbox.io/s/vjj64jv2z0

Issue 2:
Do you want to request a feature or report a bug?

Request a feature

I am working on project to build AMP page with React Server Side Rendering. I am having an issue to add custom attribute to built-in AMP element. In order to be able to use amp-bind we need to be able to output “bindings”, which are special attributes of the form [attribute], eg. [slide]="selectedSlide".

<amp-carousel
layout={layout}
height={height}
width={width}
[slide]={slide}
>
...
</amp-carousel>

Here is AMP carousel example that work with amp-bind.

What is the current behavior?

Parsing error: Unexpected token [ (Fatal)

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

All

For more information, you can read all the discussion in this PR.
Issue 1:
I'm not sure if this is a duplicate of the other let block issues, but I came across this:

let
global foo

bar(x::Float64) = x+1
bar(x::Float32) = x+2

foo(x) = bar(x)
end

julia> @code_warntype foo(1.0)
Variables:
#self#::#foo
x::Float64

Body:
begin
return ((Core.getfield)($(QuoteNode(Core.Box(bar))),:contents)::Any)(x::Float64)::Any
end::Any

This problem goes away if I get rid of the 2nd method for bar.

Issue 2:
@testset internally creates a try/catch block to run the tests in, so the tests are run in a local scope. However, since the syntax is @testset "..." begin ... end, it is natural to assume the code is run in a begin block, which is globally scoped.

This can lead to confusing behavior where functions defined within a testset capture variables defined outside the function, since we are in a local scope, but users may not realize this. I suggest we at least document this local scoping behavior of @testset, or perhaps change the syntax to @testset "..." let ... end to make it more apparent that this introduces a local scope.
Issue 1:
here is my sample data cities_counter[:10]

[('上海', 285), ('杭州', 225), ('北京', 163), ('广州', 136), ('南京', 130), ('武汉', 124), ('深圳', 88), ('温州', 67), ('苏州', 66), ('宁波', 45)]

and I want to make a bar plot with Seaborn and Matplotlib, so here is my code

>>> sns.set(style="whitegrid")
>>> sns.set_color_codes("pastel")
>>> sns.barplot(x=[k for k, _ in cities_counter[:10]], y=[v for _, v in cities_counter[:10]])

and the result is here: https://i.stack.imgur.com/pXHAE.png

ENV:

Windows 10

Python 2,7

How can I plot Chinese character?

I have tried with the following code

import matplotlib as mpl
mpl.rcParams['font.sans-serif'] = ['SimHei']
mpl.rcParams['font.serif'] = ['SimHei']
import seaborn as sns
sns.set_style("darkgrid",{"font.sans-serif":['simhei', 'Arial']})

And downloaded SimHei.ttf from this issue #1009

Issue 2:
As #829 and #592 said, the reason is "seaborn override default fonts specified in matplotlibrc configs".

Thus, you can set the default seaborn font style after import the seaborn as follows:

import seaborn as sns

sns.set_style("darkgrid",{"font.sans-serif":['simhei', 'Arial']})

The simhei is the chinese font, and make sure the simhei.ttf already in your "Lib\site-packages\matplotlib\mpl-data\fonts\ttf" folder.

This method just change the seaborn font setting temporarily, however I do not know how to do that permanently.
Issue 1:
Pages which have duplicate values in their query string are treated as different pages:

http://www.example.com/?q=

http://www.example.com/?q=&q=

http://www.example.com/?q=&q=&q=

...

If the first page has a link to the second and the second a link to the third, scrapy enters an infinite loop, requesting each page in succession. I've put a simple page here to test the issue. Using a CrawlSpider with a rule like Rule(SgmlLinkExtractor(), callback='parse_page', follow=True) will cause this infinite recursion. Here is a sample spider:

from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor

class LoopingSpider(CrawlSpider):
name = "loop"
start_urls = ["http://fcoelho.alwaysdata.net/scrapy/page.php"]
allowed_domains = ["fcoelho.alwaysdata.net"]
rules = (
Rule(SgmlLinkExtractor(), callback='parse_page', follow=True),
)

def parse_page(self, response):
print "Page: %s" % response.url
return []

It seems like in the end the problem "arises" because scrapy.utils.url.canonicalize_url only sorts the query string keys, but don't remove duplicates. As far as I can tell, duplicates are "wrong", and shouldn't be counted as normal web page behavior. Would it be sane to remove arguments from the query string if their key is repeated?

Issue 2:
Summary

If the file mentioned in scrapy genspider already exists, then genspider should refuse to generate the the file.

Motivation

As it stands, existing code can be blown away if this command runs twice.

Describe alternatives you've considered

Prompting the user for overwriting existing spider.
Issue 1:
Okay, first, I want to say, I'm not sure if this is equivalent to

#872

But it would be nice to be able to completely hide the window border that looks like

What wasn't mentioned in the other topic was that even if we turn off ShowTabsInTitlebar, we still have a small border (which I'm still not a fan of):

The issue I cited was closed without a clear (to me) resolution, and it's not clear if this feature might be implemented in a future version of Windows or if it's been completely abandoned, so if this is a duplicate, before closing it, could one of the devs clarify the situation?

What would be nice is maybe a hotkey to just hide the entire non-client area. Support for this would also move toward quake-terminal support (which I guess isn't planned for 1.0).

Issue 2:
Hi,

Please add Anaconda prompt to list.

I installed anaconda, but I can't see it in terminal list.

Please help me.
Issue 1:
http://scikit-learn.org/dev/related_projects.html currently references https://github.com/scikit-learn/scikit-learn/wiki/Third-party-projects-and-code-snippets but the latter duplicates a lot of the former's contents. Should we retire it and merge any missing (and still relevant) content into related_projects?

Issue 2:
For instance have a look at:

http://scikit-learn.org/dev/auto_examples/cluster/plot_dict_face_patches.html

some of the centroids are duplicated, presumably because of a bug in the bad cluster reallocation heuristic.
Issue 1:
[X ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

FontIcon's onClick method's action should be able to override the hoverColor's reset callback after the click.

Current Behavior

When a hoverColor is specified for the fonticon, the method called by it's onClick function, which sets it's color, gets overriden by the old color due to hoverColor's callback.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/r5825125jo

Create a fonticon component within an iconbutton. Don't set a hoverColor.

Define it's onClick function to modify it's color as: onClick={(e)=>{e.target.style = "color:#33FF33 !important";console.log(e.target.style.color)}}

Check the console output which will show that the color changed successfully and it is retained.

Repeat 1 and 2 but this time with a hoverColor mentioned.

Even after the click, when there is no hover, the color goes back to the predefined color. Same can be seen in the console with console.log(document.getElementByID('icon_id').style.color);

Tried it with e.target.style.color='#33FF33' earlier which too didn't work.

Context

I am trying to implement the Favorite/Like button which should turn red on hover and should stay red after being clicked. However it goes back to being black if there is no hover, even after being clicked.

Your Environment

| Tech || etc | | Version |

|--------------|---------|

| Material-UI | 0.19.4 |

| React | 16.1.1 |

| browser | 62.0.3202.94 (Official Build) (64-bit) |

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

Expected Behavior

The className prop can be overridden by other tools or the user (eg. Styled Components).

Current Behavior

The className prop can not be overridden when the Drawer is of the type temporary

Steps to Reproduce (for bugs)

Provide a Drawer component of the type temporary a className prop.

Context

I tried to override material-ui styles of the Drawer component with a Styled Component.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.6

React
15.6.1
Issue 1:
It would be nice to implement MacOS/Linux style configurable hot corners actions.

Issue 2:
Summary of the new feature/enhancement

I primarily use launchers to open (known) apps. As such, I don't need to know if it's a Win32 application, if it's a running process, et cetera. Similar to Spotlight, I would like as little detail to be returned as possible. An application's icon, along with its name is all I need.

Additionally, I would like to be able to adjust the screen size of both the Launcher itself, as well as the returned results.

Should the roadmap for Run include returning results from extra sources (dictionary, calculator, web, etc), I would like those to be selectable as well, so that I have as little clutter as possible.

Proposed technical implementation details (optional)

Add an option to the PowerToys application where users can select the level of detail they want returned in their PowerToys Run search results. Probably through several checkboxes. This should instant reflect in the Launcher search results UI and persist.

Add a preference option where one is able to set the font and UI size of the Launcher and its results pane.

Add a preference option to enable or disable currently supported source types. I.e. I don't need to find every single file on disk through Launcher. I primarily just want it to index apps from my Start Menu.
Issue 1:
I just have a problem that when i click disable button and then click the uninstall button on the package and then I think that this package is remove because I can't see it in the package list in the setting.but it not because when i try to reinstall it by searching the package name again ,the uninstall and enable button still show on the package and i can't install it because no install button.Nothing happen when I click that uninstall or enable button.

Thx for help and sorry for my English. :(

I use Windows 8.1

Issue 2:
From @HitomiTenshi on May 17, 2015 1:39

How to reproduce:

Go to settings -> Install

Find a package you have installed at the moment

Press disable and after that click on uninstall

Restart atom

Search for your disabled/uninstalled package

You will now see that it is uninstalled AND disabled, but it can't be enabled anymore.

To circumvent this bug you have to use apm through the console in order to re-install that package.

Atom version: 0.119.0 0.199.0

OS: Windows 8.1 Pro 64 bit

Copied from original issue: atom/atom#6826
Issue 1:
I tried using the types/angular-ui-bootstrap package, and now I have tons of build errors along the lines of:

"Build" duplicate identifier 'angular'

these are being raised from the angular-animate index.d.ts (which was fine before I imported angular-ui-bootstrap)

I also get the error:

Buile: Module 'angular.ui' has no exported member 'bootstrap' these errors are in the actual angular-ui-bootstrap index.d.ts file -- sorry, but I really don't understand what's happening here.

My setup:

we use typings to pull our definintions (we are on typescript 1.8.10

if I uninstall the angular-ui-bootstrap typings, everything works (we have over a dozen or so typings packages installed, and no problems, so I think my configuration is ok.

Is there something wrong with the typings, or is there something I should look at on my end?

I don't know whether this helps, but typings installed the angular-bootstrap-ui definitions under typings/modules, but all of the other angular-* typings were installed under typings/globals. I have to confess, I do not understand the rhyme or reason behind what goes into the /globals folder or the /modules folder, so maybe that is part of the problem?

Issue 2:
Regarding PR #32567

// cc @rbuckton @RyanCavanaugh, @DanielRosenwasser

I tried using the @types/node (10.12.21) package and had problems.

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

I don't know what this split was intended to do, but I had some typescript compiles fail in my CI this morning.

The last build was using @types/node 10.12.19 (pre-split) and the build that failed for us was using @types/node 10.12.21. (package.json files were using ^10.11.4 and no package-lock.json was present)

When a library was built with 10.12.19, the .d.ts file for the library looked like this:

/// <reference types="node" />
import { Exception } from '@microsoft.azure/tasks';
import * as fs from 'fs';
// ... etc ...

and when it was build with 10.12.21 it was missing the /// <reference types="node" /> -- and looked like this:

import { Exception } from '@microsoft.azure/tasks';
import * as fs from 'fs';
// ... etc ...

I'm not sure what this split was intent on doing, but it had a side-effect with the typescript compiler, which causes dependency problems

I rolled back and hard-coded 10.12.19 and rebuilt and everything worked as expected.
Issue 1:
How do we disable source maps on the static export?

That is:

next build && next export

Now 'out/' has many .map files, which I'd like to avoid.

Any solution? Couldn't find on the docs, thanks.

Issue 2:
Bug report

If i use the latest next.js and latest preact together and described like in the documentation it doesn't work. Even i fixed the preact aliasing, i cannot build and run this setup in the serverless build target.

Describe the bug

If i follow the installation readme of the preact plugin it results in the following error:

npm build
./node_modules/next/dist/client/index.js
Module not found: Can't resolve 'react' in 'node_modules/next/dist/client'

i was able to fix this error with a custom aliasing of preact but when i build and start next, the server generate an error like this:

npm run build
npm run start
Error: [object Object] is not a valid HTML tag name in <[object Object] value="[object Object]">
at u (build/serverless/pages/index.js:7555:3347)

To Reproduce

I created a git repo and was able to alias preact by myself.

git clone https://github.com/marcelalburg/nextjs-preact.git
cd nextjs-preact
npm install
npm run build
npm run start
curl http://localhost:3000

Expected behavior

I would like to run nextjs with preact on aws lambda / serverless without internal server errors - described above

System information

OS: macos

Version of Next.js: 9.1.6

NodeJs: v12.13.1