WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
by axel.schreiner:

godoc binds GOPATH/src to /src/pkg;
i.e., directories below GOPATH/src contain packages, not commands;
i.e., HTTP requests for /cmd/FOO only work if FOO is in GOROOT/src/cmd.

Looks to me like godoc cannot readily document user-written commands outside GOROOT. (I
kludged this using -path; however, it's a very awkward, undocumented kludge.)

Note that the distributed directory structure is GOROOT/src/pkg for packages and
GOROOT/src/cmd for commands.

If godoc/main.go/main() were changed, e.g., to

// Bind $GOPATH trees into Go root.
for _, p := range filepath.SplitList(build.Default.GOPATH) {
fs.Bind("/src/pkg", OS(p), "/src/pkg", bindAfter)
fs.Bind("/src/cmd", OS(p), "/src/cmd", bindAfter)
}

then HTTP requests /pkg/FOO and /cmd/FOO would document user packages in
GOPATH/src/pkg/FOO and commands in GOPATH/src/cmd/FOO, respectively. (This does,
however, break the current interpretation of GOPATH for godoc).

Alternatively,

// Bind $GOPATH trees into Go root.
for _, p := range filepath.SplitList(build.Default.GOPATH) {
fs.Bind("/src/cmd", OS(p), "/src/cmd", bindAfter)
fs.Bind("/src/pkg", OS(p), "/src", bindAfter)
}

would not break the current interpretation of GOPATH and would also document user
commands. (The package list in this case shows a package 'cmd' containing directories
for user commands.)

The option -path only applies to packages because it binds each path /FOO/BAR to
/src/pkg/BAR,
i.e., an HTTP request /pkg/BAR will produce documentation from /FOO/BAR.

One could add another option -cmds to godoc/godoc.go/initHandlers() to bind paths to
/src/cmd to allow single user commands to be added to the server:

var ...
cmdPath = flag.String("cmds", "", "additional command directories (colon-separated)")

initHandler...

// Add named directories in -cmds argument as
// subdirectories of src/cmd.
for _, p := range filepath.SplitList(*cmdPath) {
_, elem := filepath.Split(p)
if elem == "" {
log.Fatalf("invalid -cmds argument: %q has no final element", p)
}
fs.Bind("/src/cmd/"+elem, OS(p), "/", bindReplace)
}

Which operating system are you using?
MacOS X 10.8

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

Issue 2:
Well, since pprof is actually a perl script. It just doesn't work on windows. "go
tool" assumes that every tool ends with the ".exe" suffix on microsoft
operating system and pprof isn't.

Perhaps it should be removed from tool directory on windows at all? It's under
"misc" anyways, if someone really wants to use it with mingw or cygwin
environment it is possible to do.

Or perhaps there is some other way to make it work.
Issue 1:
This looks like a regression in Electron 4. In Electron 3 the electron file is executable, in 4 it is not.

Issue 2:
Compiled binaries on Linux do no compile properly and show up as shared files, I have been told by the team at electron-packager that this is an electron bug and not a electron-packager bug as seen here as well as an explanation of the bug here:

electron/electron-packager#901 (comment)
Issue 1:
Hi,

I can not get this to work at all. When I have a row with x-popovers and they are set with offset, they do not follow the container when resizing the window:

http://bootply.com/91910

If I remove the offset it works:

http://bootply.com/91912

Issue 2:
Chrome for Mac. Taken from the docs.

Open the popovers. Resize. Boom.
Issue 1:
we have quite a lot of code to support .mode (internally we use pretty much the same algos as .value_counts())

but unless I am not understanding isn't.

x.mode() == x.value_counts(sort=True).index[0] ?

if ties, then return a slice of the result

e.g.

In [17]: Series([1, 1, 1, 2, 2, 2, 3]).value_counts()
Out[17]:
2 3
1 3
3 1
dtype: int64

In [18]: Series([1, 1, 1, 2, 2, 2, 3]).mode()
Out[18]:
0 1
1 2
dtype: int64

cc @TomAugspurger

Issue 2:
[1] df = pd.DataFrame([[1,2]])
[2] df.iloc[0, 1:] = df.iloc[0, 1:].apply('{:+.2f}'.format)
[3] df
0 1
0 1 [+2.00]

Notice that an array was inserted, where a scalar was expected. The issue is present in both 0.22 and master.

The same issue is if we use loc instead of iloc. However, if we insert a numeric series instead of a string series, everything is ok:

[1] df = pd.DataFrame([[1,2]])
[2] df.iloc[0, 1:] = df.iloc[0, 1:].apply(lambda x: x*2)
[3] df
0 2
0 1 4

EDIT: the issue can be simplified further:

[1] df = pd.DataFrame([[1, 2]])
[2] df.iloc[0, 1:] = ['a']
[3] df
0 2
0 1 [a]
[4] df = pd.DataFrame([[1, 2]])
[5] df.iloc[0, 0:] = ['a', 'b'] # ok
0 1
0 a b
[6] df = pd.DataFrame([[1, 2, 3]])
[7] df.iloc[0, 1:] = ['a', 'b'] # ok
0 1 2
0 1 a b

So it seems like a very specific bug, concerning insertion into the last column of a dataframe.

Expected Output

Expected is that a scalar value is inserted into the data frame, and not an array.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: 49714e8

python: 3.6.3.final.0

python-bits: 32

OS: Windows

OS-release: 10

machine: AMD64

processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.22.0.dev0+669.g49714e8

pytest: 3.3.1

pip: 9.0.1

setuptools: 38.2.5

Cython: 0.26.1

numpy: 1.13.3

scipy: 1.0.0

pyarrow: None

xarray: None

IPython: 6.2.1

sphinx: 1.6.3

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.3

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: 2.1.0

openpyxl: 2.4.9

xlrd: 1.1.0

xlwt: 1.3.0

xlsxwriter: None

lxml: None

bs4: None

html5lib: 1.0b10

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None
Issue 1:
The mobx example does not work with jest configured(I use the .babelrc config as in jest example).

I believe there is problem with .babelrc configuration with env

So, if .babelrc config is same as jest then, tests run but mobx doesn't and vice-versa.

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

Expected Behavior

mobx store should run

Current Behavior

mobx store does not work, the observable properties/ action setters and getters does not work.

Steps to Reproduce (for bugs)

Use mobx example and change the babelrc config to the one with jest example

Context

Your Environment

Tech
Version

next
4.2.2

node
8.4

OS
macos

browser

etc

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

Current Behavior

currently material-ui use renderPage to pass pageContext to page Component

// _documents.js
const page = ctx.renderPage(Page => props => (
<Page pageContext={pageContext} {...props} />
));

so, every page components need to handle pageContext

// pages/index.js
export default withRoot(Home) // <-- withRoot HOC handle pageContext

Expected Behavior

but i really want '_app.js' handle withRoot or other HOC,

so every page components can be more simplier.

currently _document.js can use renderPage to pass props to Page Component such as 'pageContext' above.

its for style ssr.

but _document.js can't send props to App Component``_app.js.

u only can modify App props by custom it /page/_app.js, and then generate App props by getInitialProps function.

https://github.com/zeit/next.js/blob/canary/server/render.js#L79-L88

but, again, _document.js can't send props to _app.js directly if i want to handle something about style ssr in _app.js, so that i don't need write those same code in every pages

may be Next.js would modify the renderPage function, may be add appProps below

const renderPage = (enhancer = Page => Page, appProps) => {
const app = createElement(App, {
Component: enhancer(Component),
router,
...props,
...appProps
})
Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Date pipe keeps the order of date components when using a custom format. According to the docs (https://angular.io/docs/ts/latest/api/common/index/DatePipe-pipe.html) this shouldn't be the case: 'In javascript, only the components specified will be respected (not the ordering, punctuations, ...) and details of the formatting will be dependent on the locale.'

Expected behavior

The date pipe should ignore ordering and whitespaces etc, it should only care about the date components and format the output date according to the locale.

Reproduction of the problem

http://plnkr.co/edit/fCZ4oVcn5qsnNssvSnar?p=preview

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

To be able to use custom date formats.

Please tell us about your environment:

macOS Sierra, Visual Studio Code, NPM 3.10.3

Angular version: 2.0.0 (Final release)

Browser: all

Language: TypeScript 2.0.2

Node (for AoT issues): node --version = v6.3.0

Issue 2:
Problem

Assume the following HTML snippet

<button title="OK" tooltip="When done." (click)="..." *if="...">text</button>

It looks like we are using browser button

It looks like title and tooltip are properties of button.

Surprise

Now imagine that the actual implementation is:

@Component({ selector:'button', properties: ['title'] })
@View(...)
class Button {
title: string;
}

@Directives({selector:'[tooltip]', properties: ['tooltip']})
class Tooltip {
tooltip: string;
}

But after seeing the implementation the developer realizes that:

button is not a native component

tooltip is a separate, unrelated directive which decorates the button

This creates a level of surprise for the developer and effects the readability of the HTML.

Proposal

As a best practice (not enforced) recommend that:

All components are prefixed (but not their properties)

All directives are prefixed

Implication

Now let's rewrite the example with the above rules.

<md-button title="OK" jq-tooltip="When done." (click)="..." *ng-if="...">text</button>

It is immediately clear that:

md-button is a custom component and title is its property

jq-tooltip is a separate directive. Given that they have different prefixes (md- and jq-) it is unlikely that they have a communication channel.

ng-if comes from yet separate library. (again unlikely that they somehow communicate)

But why prefix the ng-if? Well remember that it is short hand for:

<template ng-if="...">
<md-button title="OK" jq-tooltip="When done." (click)="...">text</button>
</template>

And if we don't prefix it it would look like that template has if property, which is not the case.
Issue 1:
Can I request for the TypeDefinition file for the latest version to be published at npm?

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

Issue 2:
Got the following error when compiling:

TouchRipple.d.ts(2,33): error TS7016: Could not find a declaration file for module 'react-transition-group', fixed by adding a dev dependency to @types/react-transition-group

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

Expected Behavior

It should compile without the need of other dependencies

Current Behavior

It fails to compile if @types/react-transition-group is not installed

Your Environment

Tech
Version

Material-UI
latest beta

React
16

browser
Chrome 63

etc
TS 2.6.2
Issue 1:
Currently I have an Input sitting inside the label of a Chip, and the way "backspace" is handled causes several issues with this text input. I'm able to stop the onDelete function being called, but cannot fix the fact Input is never getting an event.

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

Expected Behavior

I would prefer Chip not handle "backspace" keydown events, but if this is desired functionality, being able to override the onKeyDown event unconditionally would suffice.

Current Behavior

The default event is prevented and the onChange function is never called.

Steps to Reproduce (for bugs)

I spun this up to demo the issue:

https://codesandbox.io/s/42708vl2l9

Context

I'm creating a filter system for a desktop-only application, where the filters are editable and represented by Chips. Currently these filters are pretty simple, so editing them inline is pretty clean and simple from a user perspective.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.32

React
16.2.0

browser
Chrome

Issue 2:
This mixin appears in many components, checking if context.muiTheme has changed.

First of all, I do not see why this component is necessary besides supporting dynamic theme. This can be done by creating a new theme context instance, React will then tell it has been changed.

Moreover, Its appearance may significantly affect the performance since it does checking in shouldComponentUpdate every time react does reconciliation. Especially, this happens for every flat button and text field.

Last, but may not relate to this issue, context-pure mixin uses src/utils/shallow-equal.js, the same function has been implemented as react addon react-addons-shallow-compare. I think we should remove it from utils.

Here is the sublime search result:

Edit by @newoga (replaced @yongxu sublime search results with checklist)

flat-button-label.jsx (#3331)

card-expandable.jsx (#3331)

date-picker-dialog.jsx (#3331)

flat-button.jsx (#3331)

icon-button.jsx (#3331)

SelectField.jsx (#3331)

snackbar.jsx (#3331)

TextField.jsx (#3331)
Issue 1:
Example package.json file:

{
"paths": {
"lib_a": "./path/to/lib/a"
},
"scripts": {
"lib_a:build": "tsc -p $npm_package_paths_lib_a",
"lib_a:publish": "npm publish $npm_package_paths_lib_a"
},
"devDependencies": {
"@my-org/lib-a": "file:$npm_package_paths_lib_a",
}
}

As you can see, we have definied variable $npm_package_paths_lib_a because path to the lib is used in 3 places, but for some reason i can not use variable inside version of dependency. Is there any other syntax for this or this feature is not supported?

Big picture:

I have multiple packages inside single repository because i do not want to duplicate build and deploy process, which is same for multiple UI components. Also those components are using different dependencies, so when i use lib_a i do not want to install libraries required for lib_b etc (to make npm install much faster when someone is using only few components).

Issue 2:
What / Why

error:

`npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/userName/.npm/_logs/2020-02-04T14_47_01_098Z-debug.log`

When

When I run npm install. I get following

Happened first time today

Current Behavior

See error mentioned before

Steps to Reproduce

run npm install

Expected Behavior

Should install what is defined in package.json
Issue 1:
I'm trying to train a model in a multiprocessing Process, but when a model already exist in the parent scope, the process will freeze at the initialization of the Embedding layer. I'm using Keras 2.0.5, Tensorflow 1.1.0, and only running on the CPU. Here's a simple duplicatable example.

from multiprocessing import Process, Pipe
import numpy as np
from keras.models import Model
from keras.layers import Input, Dense, Embedding
from keras.optimizers import Adam
import tensorflow as tf

def make_model(vecs, weights=None):
inp = Input((5,))
embd = Embedding(len(vecs), 50, weights=[vecs], trainable=False)(inp)
out = Dense(5, activation='softmax')(embd)
model = Model(inp, out)
model.compile(Adam(0.001), 'categorical_crossentropy', metrics=['accuracy'])
return model

def f(vecs, conn):
model = make_model(vecs)
conn.send('done')
conn.close()

if __name__ == '__main__':
vecs = np.random.random((100000, 50))
model1 = make_model(vecs)

parent_conn, child_conn = Pipe()
p = Process(target=f, args=(vecs, child_conn), daemon=True)
p.start()

print('starting model two')
print(parent_conn.recv())
print('completed')

When this script is run as it's currently written, it will never print the 'completed' message. If, however, I comment out the line model1 = make_model(vecs) then it will work just fine.

I feel like this is a graph/session issue, but none of my attempts to fix it have been successful. Any thoughts?

Issue 2:
The graph visualization is confusing. There are too many nodes on the graph compared to the actual model, seems the nodes are repeatedly logged many times.

For example, see parts of the graph of a simple 0-hidden layer network:
Issue 1:
Not sure how to describe how the navbar looks but it doesn't look right in FF on the Google Nexus 7 tablet. The top portion of the navbar is obscured by the browser address bar. The navbar may well be slightly aligned too far left but that may be my eyes.

Please see the navbar on the official Bootstrap 3 site as an example.

Issue 2:
Right now you can only specify one breakpoint of pull/push/offset which then applies to all viewport sizes. I can't think of any situation where this would work, since most likely the entire reason I want to push/pull/offset is to deal with a specific viewport size.

Suggestion: add col-sm-offset (or col-md as I suggest in #8755), col-lg-offset, col-sm-push, col-lg-push, etc. variations.
Issue 1:
OS: Windows

open the built-in terminal

run command that produces a bunch of output such as 'npm list' or cat a file

try to scroll up to reveal text that was already scrolled out of sight

-> content is scrolled to the left (and then gets stuck)

-> there is no reliable way to get the terminal back into a 'normal' state; sometime Enter works, sometimes not

Here is a screen recording.

Issue 2:
#6658

VSCode Version: alpha

OS Version: os x

Steps to Reproduce:

debug the Typescript repo - checker.ts

notice that we only show 100 variables, currently there is no way to show all the 900 variables

we could offer the user an option to list all variables - for example via a context menu action on the scope
Issue 1:
I'm submitting a ... (check one with "x")

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

The canLoad guard is called with the Route as the only argument.

Expected/desired behavior

The RouterStateSnapshot of the future state is provided so the URL can be stored. The use case would be redirecting the user to a login page, then returning to the previously attempted URL after logging in.

Reproduction of the problem

If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

What is the expected behavior?

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

Please tell us about your environment:

Angular version: 2.0.0-rc.X

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [all | TypeScript X.X | ES6/7 | ES5]

cc: @vsavkin

Issue 2:
I'm submitting a ... (check one with "x")

[] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request =>

Current behavior

I try to implement simple app with silent login via auth token (sessionId). If no sessionId provided- fallback to login via username/password.

If i try to navigate to component from synchronously loaded module - in can be protected with CanActivate guard - we have ActivatedRouteSnapshot with query parameters. If i try to navigate to a lazily loaded component - it is prtoected with CanLoad guard.

CanLoad guard has no access query parameter (?&) or parameter in matrix notation(;) from browser address string - has no ActivatedRouteSnapshot parameter.

Expected behavior

i expect, that query parameters (or matrix notation parameters) are available in CanLoad guard via ActivatedRoute parameter.

Minimal reproduction of the problem with instructions

http://plnkr.co has no possibility to use many html pages -> i have prepared modified sample of heroes app from tutorial https://angular.io/docs/ts/latest/guide/router.html.

Modified sample can be found at https://github.com/adoris/tour-of-heroes

load and prepare app from: https://github.com/adoris/tour-of-heroes.git

ng serve

call browser http://localhost:4200/index_angular2.html

use any link. First link works as expected with login page.

All other links must be processed without login page, but login page displayed.

If I call app with this links from my sample app - i want to proceed without login-screen:

http://localhost:4200/hero/13?SessionId=98765&Extras1=testextras

http://localhost:4200/heroes;id=13;SessionId=98765;Extras1=testextras

Please tell us about your environment:

angular-cli, windows, vs code.

Angular version: 2.1.0
Issue 1:
Describe the workflow you want to enable

I want to be able to run Forward Sequential Feature Selector and know the order which it picked the features.

Right now you can only get the indices or a boolean mask of all the features you've selected. Of course, you can run it once and select 1 feature, then run it again and select 2 features, and continue this to pull out the order that features were selected. However, this would be unnecessarily computationally costly.

Describe your proposed solution

Add an attribute feature_order. I should be able to do SequentialFeatureSelector.feature_order and get an array of the indices of the features as they are selected.

I edited the source code (sklearn/feature_selection/_sequential.py) on my laptop with just 3 lines of code and it works.

Under the function def fit(...) I added:

feature_order = [] # before the for loop

feature_order.append(new_feature_idx) # this is at the end of the for loop

self.feature_order = feature_order # at the end of the function

Describe alternatives you've considered, if relevant

No response

Additional context

No response

Issue 2:
Is it currently possible to extract the order in which the features in the sequential feature selection transformer are selected?

Similar to the ranking in the RFE transformer for example.
Issue 1:
Issue Description

I was writing my code for a problem and testing an output of one of my variables when I got the error message that says "SyntaxError: Illegal return statement".

I figured it it might be some additional code messing it up so I commented out things progressively until I finally just decided to comment out everything in the scope of the function and just return a plane number, and it is still giving me this error.

I tried the hard refresh and clearing the local storage, and I still cannot get the issue to clear.

Browser Information

*I am using the most updated version of Google Chrome 2016

I am using Windows 8

Your Code

function sumPrimes(num) {
//var primes = [];
//var x = 2;

//do {

// var wilsonTheorem = 0;

//for (var i = 1; i <= 13; i++){

//wilsonTheorem += (i-1);

// }

/* if (wilsonTheorem%x > 2){
primes.push(x);
}

x++;

} while (primes.length != num);*/

return 5;
}

sumPrimes(3);

Screenshot

Issue 2: