WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

There is a search page with infinite height(lazy load paging) for scrolling.When i clicked an item of search results on this page, i go to search detail page.That's ok for now.Then i want to go back the search page, i 've expected that the search page has rendered and after that set the past scroll position whose selected item on search results has.

Current Behavior

But my last scroll position of search page has been kept but it set scroll before rendering search page.This causes that the search page flickers.Actually this flicker is more explicit on mobile than on web.

Your Environment

Tech
Version

next
5.0.1

node
8

OS
IOS

browser
Safari

Issue 2:
Getting this when I try to reference a separate project (repo/b/components/layout.js):

ModuleParseError: Module parse failed: /path/to/repo/a/node_modules/react-hot-loader/webpack.js!/path/to/repo/b/components/layout.js Unexpected token (65:17)
You may need an appropriate loader to handle this file type.
| return <div></div>
...

The paths are like:

/repo/a
/repo/a/pages/page1.js
/repo/b
/repo/b/components/layout.js

And in page1.js it is doing this:

import Layout from '../../b/components/layout'

The next server is running from within repo a:

cd repo/a
npm run dev # which is this:
babel-node --presets=es2015,stage-0 --plugins=transform-react-jsx,styled-jsx/babel server.js

I have searched the issues of this repository and related are #1706 and #3018.

Expected Behavior

Expected behavior is that I can load this JSX module from a separate repo outside of the main project.

Current Behavior

Current behavior is that I can't abstract out code into a separate repo if it has JSX in it.

Context

I can't refactor code into a shared lib.

Your Environment

Tech
Version

next
4beta2

node
8.4
Issue 1:
I tried to produce a stand-alone example but couldn't so far. Maybe the answer is already apparent though. This started happening just recently (maybe after updated pandas to 0.17.1) but worked well before. I'm doing a multi-column agg in a groupby. One of the columns is a datetime of which I want the first element:

(Pdb) t.groupby(['block_dir']).first()
dt sid amount price symbol \
block_dir
1 2003-01-02 15:56:00+00:00 21719 -62 0.963811 AIRN

Works fine, however:

order_sign block_time
block_dir
1 False 0
(Pdb) t.groupby(['block_dir']).agg({'dt': 'first'})
dt
block_dir
1 1041522960000000000

Expected Output

output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-77-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8

pandas: 0.17.1
nose: 1.3.7
pip: 8.0.2
setuptools: 19.6.2
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.16.1
statsmodels: 0.6.1
IPython: 3.2.1
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.4.2
pytz: 2015.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.3
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.8
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext)
Jinja2: None

Issue 2:
Hi all,

I've found an inconsistency between pandas 0.17 and 0.16.2 when aggregating on UTC timestamps. Here is a snippet to reproduce the problem:

import numpy as np
import pandas as pd

np.random.seed(42)

data = pd.DataFrame({
'factor': np.random.randint(0, 3, size=60),
'time': pd.date_range('01/01/2000 00:00', periods=60, freq='s', tz='UTC')
})

gp = data.groupby('factor')

print(gp['time'].min())
print(gp['time'].max())

On 0.16.2 the output seems correct, i.e it returns timestamps:

In [1]: %run bug_pandas.py
factor
0 2000-01-01 00:00:01+00:00
1 2000-01-01 00:00:07+00:00
2 2000-01-01 00:00:00+00:00
Name: time, dtype: object
factor
0 2000-01-01 00:00:57+00:00
1 2000-01-01 00:00:54+00:00
2 2000-01-01 00:00:59+00:00
Name: time, dtype: object

However on 0.17 it returns timestamps as integers:

In [1]: %run bug_pandas.py
factor
0 946684801000000000
1 946684807000000000
2 946684800000000000
Name: time, dtype: int64
factor
0 946684857000000000
1 946684854000000000
2 946684859000000000
Name: time, dtype: int64

It should be noted that the problem doesn't appear with tz=None.

Thanks for your help,

Alexandre
Issue 1:
Description

Clustering with MiniBatchKMeans produces indexing error.

I have a crontab doing some clustering every hour. This error manifests around 4-5 times in a day. I assume the kmeans initialization is stochastic?

Unfortunately right now I can't find a dataset for reproducing because the error happens stochastically on a dataset that is changing every hour. If I manage to find a reproducible dataset I will attach it to the issue.

Steps/Code to Reproduce

from sklearn.cluster import MiniBatchKMeans
clusterobj = MiniBatchKMeans(n_clusters=1000)
clusterobj.fit(datconcat)

Expected Results

No error

Actual Results

Traceback (most recent call last):
File "metricdata.py", line 160, in cluster
clusterobj.fit(datconcat)
File "/shared/sdoerr/Software/anaconda3/lib/python3.5/site-packages/sklearn/cluster/k_means_.py", line 1382, in fit
init_size=init_size)
File "/shared/sdoerr/Software/anaconda3/lib/python3.5/site-packages/sklearn/cluster/k_means_.py", line 683, in _init_centroids
x_squared_norms=x_squared_norms)
File "/shared/sdoerr/Software/anaconda3/lib/python3.5/site-packages/sklearn/cluster/k_means_.py", line 113, in _k_init
X[candidate_ids], X, Y_norm_squared=x_squared_norms, squared=True)
IndexError: index 2772 is out of bounds for axis 0 with size 2772

Versions

Linux-3.10.0-327.13.1.el7.x86_64-x86_64-with-centos-7.2.1511-Core
Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
NumPy 1.11.2
SciPy 0.18.1
Scikit-Learn 0.18

Issue 2:
Description

Fitting a (20242848, 5) numpy array using any more than 4 clusters results in IndexError

Steps/Code to Reproduce

from sklearn.cluster import KMeans
src = gdal.Open(fname)
img = src.ReadAsArray()
X = img.transpose(1,2,0).reshape(-1, img.shape[0])
print X.shape

(20242848, 5)

k_means = KMeans(n_clusters=4, n_jobs=-1, random_state=10)
k_means.fit(X)
labels = k_means.labels_

print labels.shape

(20242848,)

k_means = KMeans(n_clusters=5, n_jobs=-1, random_state=10)
k_means.fit(X)
labels = k_means.labels_

print labels.shape

---------------------------------------------------------------------------
JoblibIndexError Traceback (most recent call last)
<ipython-input-22-379757258e42> in <module>()
1 k_means = KMeans(n_clusters=5, n_jobs=-1, random_state=10)
----> 2 k_means.fit(X)
3 labels = k_means.labels_
4
5 print labels.shape

[SHORTENED]

IndexError: index 20242848 is out of bounds for axis 0 with size 20242848
___________________________________________________________________________

Expected Results

(20242848, )

Actual Results

Versions

Windows-7-6.1.7601-SP1

('Python', '2.7.11 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)]')

('NumPy', '1.11.2')

('SciPy', '0.18.1')

('Scikit-Learn', '0.18')
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/1705 on 2012-07-20 by trac user ale.fener, assigned to unknown.

Hi all.

I was using the class gaussian_kde with a similar code snippet:

density = gaussian_kde(data)

xs = numpy.linspace(xmin, xmax, 2*len(data))

ys = density(xs)

the problem is that when data is an array of integers (dunno if it was a numpy array of ints or a python array of ints) then the array ys contains only zeros. There must be a division by an integer somewhere. Converting data to an array of floats solves the problem, but it took me quite some time to understand what was going on.

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1181 on 2010-05-28 by trac user jakebiesinger, assigned to unknown.

Creating a gaussian_kde with integer data causes the evaluate function to return all 0's.

Some info:

$ python --version
Python 2.6.5
$ ipython --Version
0.10
In [13]: scipy.__version__
Out[13]: '0.7.2'

Repro:

$ ipython
In [1]: from scipy.stats import gaussian_kde
In [2]: import scipy
In [3]: randDistFromCenter = map(int, scipy.rand(10000) * 500 - 250) # should be uniform on [-250,250)
In [4]: k = gaussian_kde(randDistFromCenter)
/usr/lib/python2.6/dist-packages/scipy/stats/stats.py:1486: DeprecationWarning: scipy.stats.cov is deprecated; please update your code to use numpy.cov.
Please note that:
- numpy.cov rowvar argument defaults to true, not false
- numpy.cov bias argument defaults to false, not true

""", DeprecationWarning)
/usr/lib/python2.6/dist-packages/scipy/stats/stats.py:420: DeprecationWarning: scipy.stats.mean is deprecated; please update your code to use numpy.mean.
Please note that:
- numpy.mean axis argument defaults to None, not 0
- numpy.mean has a ddof argument to replace bias in a more general manner.
scipy.stats.mean(a, bias=True) can be replaced by numpy.mean(x,
axis=0, ddof=1).
axis=0, ddof=1).""", DeprecationWarning)

In [5]: x = scipy.linspace(-300,300,100)
In [6]: y = k.evaluate(x)
In [7]: y
Out[7]:
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0])

# the bandwidth/covariance is calculated correctly
In [8]: k.covariance
Out[8]: array([[ 523.56767608]])

Workaround: Convert the datatype to floats

k = gaussian_kde(scipy.array(randDistFromCenter, float))
y = k.evaluate(x)
[ 2.37718449e-05 4.59333855e-05 8.33629081e-05 1.42283310e-04
2.28733649e-04 3.46958715e-04 4.97636815e-04 6.76566775e-04
8.74448533e-04 1.07809127e-03 1.27285862e-03 1.44565290e-03
1.58750741e-03 1.69501260e-03 1.77025571e-03 1.81947393e-03
....
Issue 1:
Sorry if this is a duplicate, but I didn't find anything...

Why does:

ax.xaxis.set_ticks_position('right') sethorizontalignment = 'left' for the tick labels?

fig,ax=plt.subplots()
ax.plot(np.arange(-10,10))
ax.yaxis.set_ticks_position('right')

I'm not clear on why the ticks should change their horizontal alignment based on what side of the axis they are displayed on. I can imagine a technical difficulty in guessing how large the label is before it is drawn. Is this a layout manager issue?

Most importantly for me, it makes colorbars look poor if they have negative values, and require a manual twiddle to make look good.

Issue 2:
import matplotlib.pyplot as plt
import matplotlib.axes as maxes

fig = plt.figure()
ax = maxes.Axes(fig, [0.1, 0.1, 0.9, 0.9])
print(fig.get_children())

returns a list with no axes....

[<matplotlib.patches.Rectangle object at 0x7f8d75707dc0>]

For 3-d

import matplotlib.pyplot as plt
import matplotlib.axes as maxes
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = Axes3D(fig)
print(fig.get_children())

has the axes attached:

[<matplotlib.patches.Rectangle object at 0x7fbc2968d160>, <mpl_toolkits.mplot3d.axes3d.Axes3D object at 0x7fbc2968df40>]

Axes3D.__init__ explicitly adds itself to its parent:

matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py

Line 139
in
c035f66

self.figure.add_axes(self)

whereas no such thing happens for the base Axes class.

Discovered as part of #18356, but discussing here because its orthogonal. But I think the behaviour here should be the same .
Issue 1:
Environment

Windows build number: [19041.330]
PowerToys version: v0.19.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Altering the shortcut of PowerToys Run to ‘Win’ key + letter key will cause shortcut conflicts.

If you change the shortcut to 'Win+R' and trigger it, the 'Start' will pop up sometimes.

When you press the key quickly, the probability of this situation is very high.

Issue 2:
Summary of the new feature/enhancement

Although the intention of the shortcut guide is pretty great, I feel that the experience of forcing an overlay that covers the entire screen is quite jarring. This comes off as a very obstructive way of finding the shortcuts. I believe that the entire point of keyboard shortcuts is to get the searching out of the way.

Proposed (not-so) technical implementation details

I propose a fork that can implement and polish just the shortcut guide to make it unobtrusive and seamless.

This could also make it a stand-alone utility. (Although this is purely out of selfish reasons, I don't use any other PowerToys, but a standalone Keyboard Shortcut Guide that doesn't force me to search through an entire list of shortcuts would make my life a lot easier.)

I still don't know how this could be done, but one of the ideas is to limit the number of shortcuts that are prompted.

Other ideas include, allowing the users to position where they want the guide, or a tiny search box that pops up on long press of the windows key and you can text search for what you want to do and it filters out the shortcuts.

Eventually you wouldn't need the guide because you'll end up remembering the shortcuts, but it'll still be around to help if you ever need it.

What I need:

I would love to build this utility, I would really appreciate it if someone who knows how this could be accomplished helps me to build it. [ Read newbie programmer looking for a guide (pun-intended) on open-source things and PowerToys architecture. ]
Issue 1:
IN MICROSOFT FORUM PEOPLE COLABORATE WITH SOLUTIONS IN ALL KIND OF WAYS

IN GOOGLE ... "GURUS" CLOSE ISSUE FIRST - DRINK COFFE AND PLAY GAMES AT HOME

GOOD LUCK ALPHABET !

Issue 2:
by Matthew.Ickstadt:

I noticed a TODO in time.go which was still present in 1afdecdd77c1:

type Time struct {
// sec gives the number of seconds elapsed since
// January 1, year 1 00:00:00 UTC.
sec int64

// nsec specifies a non-negative nanosecond
// offset within the second named by Seconds.
// It must be in the range [0, 999999999].
//
// It is declared as uintptr instead of int32 or uint32
// to avoid garbage collector aliasing in the case where
// on a 64-bit system the int32 or uint32 field is written
// over the low half of a pointer, creating another pointer.
==> // TODO(rsc): When the garbage collector is completely
==> // precise, change back to int32.
==> nsec uintptr

// loc specifies the Location that should be used to
// determine the minute, hour, month, day, and year
// that correspond to this Time.
// Only the zero Time has a nil Location.
// In that case it is interpreted to mean UTC.
loc *Location
}

Now that the GC completely precise, I'm assuming this minor change can be made.
Issue 1:
Problem description

SelectField fullWidth makes the dropdown wider than the field.

Dropdown works fine without fullWidth.

There may also be an issue with alignment, given how it looks in the docs?

Link to minimal working code that reproduces the issue

https://www.webpackbin.com/bins/-KhR28JSn7eYpZwq3e3_ (note that I couldn't get the Sandbox to update)

Versions

Material-UI: 0.17.2

React: 15.4.0

Browser: Chrome 57.0.2987.133 (64-bit)

Issue 2:
Problem Description

Create a Select Field explicitly specifying a width using autoWidth={true} with some MenuItem children

Open the drop down menu, the width of items more than select.

Versions

material-ui - 0.14.4

react 0.14.3

Select

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

Expected Behavior

The ListItemText component should change colour when an override is applied

Current Behavior

Currently in order to override it I have to disable typography; is there any way to apply the color whilst maintaining the typography? I tried adding a Typography component as an element of the ListItemText but this doesn't work.

Steps to Reproduce (for bugs)

See codesandbox here:

https://codesandbox.io/s/2plyrzlvkp

If you navigate to the demo.js you'll see the relevant code.

Context

If you look at the codepen, the third item has the color red applied, but the typography is lost due to typography being disabled. Another option is providing another MuiThemeProvider that is specific to that, but that seems less than ideal; I thought the purpose of overrides was to get around that issue?

The reason this presents itself as an issue is when using the dark theme (set to light at present in the codesandbox), the ListItemText uses white for the font color, but since the background is also white you end up being unable to see the text.

Your Environment

It's all in the sandbox, using material ui next.

Issue 2:
I have a List that must be tightly packed. When I apply dense to it, it works great and displays just as I want. However, when I add it seems to ignore the dense setting.

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

I found this: #6098 but its a general observation and I am its not clear if this is a bug that will get fixed, or this is just how things work.

If its a bug, great, I'll wait for a fix. If it's not a bug, I would love a recommendation on how I can force the list to work as I was hoping.

Expected Behavior

That the row height would stay consistence no matter the controls used inside

Steps to Reproduce (for bugs)

Here is a code sandbox that demos it;

https://codesandbox.io/s/5kvvz6qw64

Context

I have a list I need to be make selections in, but needs to take up much less room.

Your Environment

Tech
Version

Material-UI
"material-ui": "^1.0.0-beta.21",

React
"react": "^16.1.0"

browser
Chrome 62.0.3202.94
Issue 1:
Environment

Windows build number: 10.0.18363.836
PowerToys version: 0.18.1
PowerToy module for which you are reporting the bug (if applicable): Settings

Steps to reproduce

Install as Admin

Log on as Admin and configure (including run at startup)

Log off

Log on as Standard User

Launch Settings

Expected behavior

Standard User can configure Settings, settings dialogue has headings and text the same as Admin (minus Admin features)

Actual behavior

Settings dialogue is lacking all text for Standard User. As it loads there is a brief flash of the text that should be there, but by the time the user can click on any thing, the text is gone and the dialogue had nothing visible to click on (see screenshot)

Screenshots

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18363.836]
PowerToys version: 0.18

Steps to reproduce

Right click on the tray icon

Select Settings

Expected behavior

Settings windows appears and allows me to make changes

Actual behavior

The windows appears, it briefly shows all the settings (as expected) but then the window becomes empty, see screen shot.

Screenshots
Issue 1:
Declaration of Symfony\Bundle\AsseticBundle\Factory\Worker\UseControllerWorker::process() must be compatible with Assetic\Factory\Worker\WorkerInterface::process(Assetic\Asset\AssetInterface $asset, Assetic\Factory\AssetFactory $factory)

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
2.8, 3.x

I am dealing with a problem when I was scraping a specific website, which the content is not created properly. So I could catch if there is any written in the file, the domCrawler stops the content's creation on that point.

Should it be the correct behavior or it should identify the last html closed tag?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head></head>
<body>
<script type="application/javascript">
function example() {
var newWindow = window.open('about:blank', 'ImageWindow');
newWindow.document.write('<html><title>x</title><body><img src="imgSrc" alt=floorplan/></body></html>');
return false;
}
</script>
<div id="example">dom crawler example</div>
</body>
</html>
Issue 1:
TypeScript Version:

1.8.9 / (1.9.0-dev.20160409)

Code

/// <reference path="react.d.ts"/>

import * as React from 'react';

const Test = ({children}) => <span>{children}</span>;

<Test>123</Test>;

Expected behavior:

No errors.

Actual behavior:

test.tsx(7,1): error TS2324: Property 'children' is missing in type 'IntrinsicAttributes & { children: any; }'.

If I change the JSX to:

React.createElement(Test, null, "123");

there is no error reported.

Issue 2:
say I have:

class Parent extends React.Component<{children:any}, {}>{
render() {
return <div> {this.props.children}</div>
}
}

class Container extends React.Component<{},{}> {

render() {
return <Parent> //typescript shows error here cause no 'children' attribute present
<h2>Hello</Hello>
</Parent>
}
}

In this case, Container is calling Parent correctly by passing in the children as nested elements.

However, Typescript still complains that it doesnt see an explicit 'children' attribute.

Typescript should know that 'children' attribute is special.

TS version 1.7.3
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

10.1.3

Operating System:

Ubuntu 20.04 x64

Last Known Working Electron version:

4.0.5

Expected Behavior

I'm trying to create a transparent Electronjs frame on Ubuntu.

Actual Behavior

Black background

`const { app, BrowserWindow } = require('electron')

function createWindow () {

const win = new BrowserWindow({

width: 800,

height: 600,

frame: false, // open for original windows state

transparent: true,

webPreferences: {

nodeIntegration: true

}

})

win.loadFile('index.html')

//win.webContents.openDevTools()

}

app.whenReady().then(createWindow)

app.on('window-all-closed', () => {

if (process.platform !== 'darwin') {

app.quit()

}

})

app.on('activate', () => {

if (BrowserWindow.getAllWindows().length === 0) {

createWindow()

}

})`

Screenshots

Issue 2:
Preflight Checklist

[ x] I have read the Contributing Guidelines for this project.

[ x] I agree to follow the Code of Conduct that this project adheres to.

[ x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Transparent failed in v10.0.0 and v11.0.0-beta. 1, but normal in v4-v9.

const onAppReady = () =>{
let parent = new BrowserWindow({
width: 300,
height: 300,
transparent: true,
frame: true
})
parent.loadFile('main.html')
}

app.on('ready', () =>setTimeout(onAppReady, 500))

Electron Version:

v10.0.0 and v11.0.0-beta.1

Operating System:

x86_64 Linux version 5.4.50-amd64-desktop (deepin@deepin-PC)

(gcc version 8.3.0 (Uos 8.3.0.3-3+rebuild))

Last Known Working Electron version:

v9.2.1

Screenshots

v9.2.1

v10.0.0

Additional Information

I have tested v4/v5/v9 are normal, only v10 - v11 failed.
Issue 1:
Hello.

I'm trying to make my own camera with blackjack and hookers :)

Doing it mostly by using the source of THREE.FirstPersonCamera and have faced a problem with updating the scene calling:

this.supr.update.call( this );

I can't call directly render()-function because it belongs to different scope. Certainly, i can bind handlers in main-part of the code, but i think, it would be better to avoid duplicates.

Code here:

http://93.186.103.193/

Issue 2:
Sometimes I get this error.

Steps to reproduce the behavior:

Load a gltf model with r124, Idk

Look into browser console

See error

Code

let manager = new THREE.LoadingManager, loader = new GLTFLoader( manager );
...
loader.load( config.path, function( result ) {
// nothing special here

Live example

n/a

Expected behavior

The error never happens

Screenshots

Platform:

Device: Desktop

OS: Windows 10

Browser: Firefox

Three.js version: r124