WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Material-UI: v0.15.0-beta.2

React: any

Browser: any

Steps to reproduce:

go to http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select

click the <select> element

type the first letter of an option ('s', for example)

the Saab option will be selected

go to http://www.material-ui.com/v0.15.0-beta.2/#/components/select-field

click the first SelectField component

type the first letter of an option ('e', for example)

nothing happens, but the Every Night option should be selected

Issue 2:
Description

Port flow typings to flow-typed libdefs.

The main benefits of moving the flow types to flow-typed are:

they are version against the library and flow versions, which protects against breaking flow versions (e.g. 0.53.0)

users can tweak the libdefs more quickly if errors crop up

Libdefs always override .flow files so you can use both

Images & references

tweet storm (as mentioned in styled components issue)

styled-components #334

styled-components docs flow
Issue 1:
It would be nice if you could add an issue template to the repository.

Issue 2:
I have a setup where one route behaves as a form processor for various forms. Under the normal circumstance of uploading an audio file... (mp3)... I would be using "flask.request.files" to process this file.

But what if I do not have any forms on the site that upload files... what I have noticed and provided a file for to duplicate the issue ... is in the event of an audio file POST upload to a form processor that does not have a control to process files... ie "flask.request.files".... the "flask.redirect([route])" fails...

Line 61 of the sample file is purposely left commented out...to demonstrate the redirect failure... by removing comment and enabling ..."posted_files = flask.request.files" .... the redirect magically works again...

There seems to be an issue in the fact that an audio file is being posted... the same test run with images file formats entered into line 40.....ie.... accept=".jpg, .png" do not effect the redirect...

flask_error.zip

In case anyone is interested.... I'm running Flask v1.0.2 on Python v3.6.3
Issue 1:
Caching (memoizing) the date_parser function in read_csv might be an easy perf improvement. Seems it is not cached unless I am missing something?

In [55]: df = pd.DataFrame([datetime.datetime.today()] * 1000000)

In [56]: df.to_csv('j', index=False)

In [57]: !gzip j

In [58]: %time df = pd.read_csv('j.gz')
CPU times: user 703 ms, sys: 68.7 ms, total: 772 ms
Wall time: 774 ms

In [59]: d = {df['0'][0]: datetime.datetime.today()}

In [60]: %time s = df['0'].map(d)
CPU times: user 84.8 ms, sys: 14.8 ms, total: 99.6 ms
Wall time: 99.2 ms

In [61]: %time df = pd.read_csv('j.gz', parse_dates=['0'])
CPU times: user 1.49 s, sys: 88.7 ms, total: 1.58 s
Wall time: 1.58 s

Issue 2:
I'll propose a

cache_datetime=False keyword as an addition to read_csv and pd.to_datetime

this would use a lookup cache (a dict will probably work), to map datetime strings to Timestamp objects. For repeated dates this will lead to some dramatic speedups.

Care must be taken if a format kw is provided (in to_datetime as the cache will have to be exposed). This would be an optional (and default False) as I think if you have unique dates this could modestly slow down things (but can be revisted if needed).

This might need also want to accept a list of column names (like parse_dates) to enable per-column caching (e.g. you might want to apply to a column, but not the index of example).

possibly we could overload parse_dates='cache' to mean this as well

trivial example

In [1]: pd.DataFrame({'A' : ['20130101 00:00:00']*10000}).to_csv('test.csv',index=True)

In [14]: def parser(x):
....: uniques = pd.Series(pd.unique(x))
....: d = pd.to_datetime(uniques)
....: d.index = uniques
....: return Series(x).map(d).values
....:
In [3]: df1 = pd.read_csv('test.csv',index_col=0, parse_dates=['A'])

In [4]: df2 = pd.read_csv('test.csv',index_col=0, parse_dates=['A'], date_parser=parser)

In [17]: %timeit pd.read_csv('test.csv',index_col=0, parse_dates=['A'])
1 loops, best of 3: 969 ms per loop

In [18]: %timeit pd.read_csv('test.csv',index_col=0, parse_dates=['A'], date_parser=parser)
100 loops, best of 3: 5.31 ms per loop

In [7]: df1.equals(df2)
Out[7]: True
Issue 1:
💻

Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, ...)

Input code

const API_VERSION = 4;

class Bruh {
public a_method(): void {
console.log(this._version);
}
public constructor(
public options: string,
private readonly _version: number = API_VERSION
) {
console.log(this.options);
}
}
var instance = new Bruh("👀");
instance.a_method();

Configuration file name

babel.config.js

Configuration

module.exports = {
presets: ["@babel/preset-typescript", "@parcel/babel-preset-env"]
};

🤔 Expected Behavior

👀 and then 4 is logged to the console.

😯 Current Behavior

undefined and then undefined is logged to the console.

Environment

Software
Version(s)

Parcel
2.0.0-nightly.912+145bfb82

Node
v17.0.1

npm/Yarn
3.1.0

Operating System
macOS 10.15.7 (19H1419)

@babel/core
7.16.0

Possible solution

Make so that it works correctly.

Additional context

parcel-bundler/parcel#7313

https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties

Issue 2:
Bug Report

Current behavior

When @babel/preset-typescript is placed before @babel/preset-env in the presets array and @babel/preset-env is configured to transform classes (by setting target to include ie 11), class parameter properties are not transpiled which will cause runtime exceptions.

Input Code

class Foo {
constructor(public bar: number) {}
}

compiles to:

"use strict";

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Foo = function Foo(bar) {
_classCallCheck(this, Foo);
};

.babelrc.json

{
"presets": [
"@babel/typescript",
["@babel/env", {
"targets": "ie 11"
}]
]
}

The same result can be produced by using the @babel/transform-classes plugin directly:

$ babel --no-babelrc --plugins @babel/transform-classes,@babel/transform-typescript test.ts

Expected behavior

With the preset order reversed, it successfully compiles down to:

"use strict";

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Foo = function Foo(bar) {
_classCallCheck(this, Foo);

this.bar = bar;
};

Possible Solution

This seems to be a limitation of plugin ordering where the class is compiled down to a function by preset-env before typescript can properly transform the parameter properties and does not look like it can easily be fixed. I suggest documenting this plugin ordering issue under the typescript preset/plugin docs so that people are aware of it since babel/preset-env is a very common preset that people will be using with typescript.
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1304 on 2009-11-25 by trac user dyamins, assigned to unknown.

np.dtype won't accept '|S0' as a type argument.

np.dtype('|S0')

TypeError: data type not understood

I have to do something like this:

d = np.dtype('|S')

d

dtype('|S0')

to get what I want. Is this intended? Regardless, this inconsistency also means that things like:

np.dtype(d.descr)

can fail even when d is a properly constructed dtype object with a '|S0' type, which seems a little perverse.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1239 on 2009-09-24 by @dwf, assigned to @charris.

I noticed this inconsistency:

In [30]: dtype(str)
Out[30]: dtype('|S0')

In [31]: dtype('|S0')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)

/Users/dwf/<ipython console> in <module>()

TypeError: data type not understood

In [32]: dtype(unicode)
Out[32]: dtype('>U0')

In [33]: dtype('>U0')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)

/Users/dwf/<ipython console> in <module>()

TypeError: data type not understood

This would present problems if you, say, np.save()'d an array with an S0 field and tried to np.load() it back; dtype() would choke in the deserialization process.

The attached patch resolves it in the simplest way I could think of: for U and S typecodes, 0-length is okay (note that '>U0' and '<U0' are still different types, technically, despite byte order being meaningless here.
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/842 on 2008-07-04 by @huard, assigned to unknown.

The string representation of complex arrays returned by conjugate is buggy.

np.conjugate(np.array(8+7j))
<[83]: (8.0+-7.0j)

> [84]: np.array(8-7j)
<[84]: array((8-7j))

Note also that integers are converted to floats.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/841 on 2008-07-04 by @FrancescAlted, assigned to @charris.

With !NumPy 1.0 series, the representation of complex types where identical for !NumPy and Python:

>>> numpy.__version__
'1.0.3'
>>> repr(numpy.complex(0)) # The Python type
'0j'
>>> repr(numpy.complex128(0)) # The NumPy type
'0j'

Starting with !NumPy 1.1, it diverges from the Python standard:

>>> numpy.__version__
'1.2.0.dev5313'
>>> repr(numpy.complex(0))
'0j'
>>> repr(numpy.complex128(0))
'(0.0+0.0j)'

I think that, in order to ensure good interactivity of the !NumPy complex type with that of Python, the previous way to represent complex number should be reverted.
Issue 1:
Description of the new feature/enhancement

Since version 0.4 or later. When you right-click on the title bar, you want to display a context menu such as Minimize, Maximize, etc. just like a normal Windows application. Also, it would be nice if I able to attach and detach tabs by dragging and dropping them.

#443

Proposed technical implementation details (optional)

Issue 2:
Environment

Windows build number: [Version 10.0.18362.267] Windows 10 Professional Version 1903
Windows Terminal version (if applicable): whatever is out-of-the-box

Any other software?

Ubuntu 18.04.LTS from the Microsoft Store fully updated with

sudo apt update ; sudo apt upgrade

The joe editor installed in Ubuntu with

sudo apt install joe

Steps to reproduce

Start the joe editor with a new file without specifying a filename

Type 3 lines at least to see what happens, e.g.:

line1
line2
line3

Go back with the cursor to the middle of line2, e.g. before the 'n' character

Press the ENTER key.

Expected behavior

The lines under the line which the cursor resides in should scroll down one, and the bottom line of the screen should scroll out, and the part of the line with the cursor following the cursor should go to the beginning of the line vacated by the scrolling down of the subsequent lines and the cursor should move to the beginning of the vacated line.

I.e. you should see

line1
li
ne2
line3

and the new cursor position should be before the 'n' character of ne2.

Note that after saving the file, the expected behavior is what correctly happens in the file data, only the display behavior is incorrect.

Note, that this worked correctly in Windows 1803 with the same Ubuntu 18.04 LTS and joe versions. The upgrade to Windows 1903 broke this, and reinstalling joe and reinstalling the entire Ubuntu 18.04 LTS distribution did not fix this either.

Actual behavior

No scrolling of the part after the cursor happens, instead the line following the line the cursor was in is replaced with the part of the line the cursor resides in and the cursor (correctly) moves down to the beginning of the next line.

I.e. you see

line1
li
ne2

and the cursor position is (correctly) before the 'n' character of 'ne2'.

Note, that this behaviour is different from #2186 (hence the separate bug), because the part of the line following the cursor overwrites the subsequent line, whereas in #2186 it does not.

Note that after saving the file, the expected behavior is what correctly happens to the file data, only the display behavior is incorrect.
Issue 1:
Describe the issue:

Something is wrong with the "auto" option.

Reproduce the code example:

import numpy as np

hist, bin_edges = np.histogram(
np.array(
[
-4.24264069e00,
-5.55111512e-17,
3.81837662e01,
1.77635684e-15,
-5.65685425e00,
3.55271368e-15,
-1.97989899e01,
0.00000000e00,
-1.27279221e01,
4.24264069e00,
1.41421356e01,
-1.83847763e01,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
-5.55111512e-17,
3.53553391e-01,
9.54594155e00,
-3.53553391e-01,
-9.19238816e00,
3.53553391e-01,
-3.53553391e-01,
2.82842712e00,
-7.21644966e-16,
-3.18198052e00,
-5.55111512e-17,
-5.55111512e-17,
]
),
bins="auto",
density=True,
)

Error message:

~\AppData\Roaming\Python\Python39\site-packages\numpy\core\function_base.py in linspace(start, stop, num, endpoint, retstep, dtype, axis)
137
138 delta = stop - start
--> 139 y = _nx.arange(0, num, dtype=dt).reshape((-1,) + (1,) * ndim(delta))
140 # In-place multiplication y *= delta/div is faster, but prevents the multiplicant
141 # from overriding what class is produced, and thus prevents, e.g. use of Quantities,

MemoryError: Unable to allocate 3.81 EiB for an array with shape (549572839412124544,) and data type float64

Runtime information:

1.24.2

3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)]

Context for the issue:

A lot of people use numpy for calculation histograms, I think. bins="auto" is very convenient as it eliminates the need to try multiple times with different bins sizes, therefore, it would be good to fix this.

Issue 2:
I use Numpy version 1.15. If I call np.histogram(data, bins='auto'), I get MemoryError. The error is probably caused by trying to allocate too large linspace.

Reproducing code example:

The error can be reproduced on this data. Its range is approximately (-0.00283, 0.00209), with many values being close to zero. The following code raises the error:

import numpy
data = numpy.loadtxt('data.txt')
numpy.histogram(data, bins='auto')

The problem is in computation of the bin edges. The following code raises the error:

import numpy.lib.histograms
numpy.lib.histograms._get_bin_edges(data, bins='auto', range=None, weights=None)

Even more specifically, the problem is caused by the method bins='fd'. The other method bins='sturges' used for automated computation of bin edges works well.

Error message:

Traceback (most recent call last):
File ".../.pycharm_helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File ".../numpy/lib/histograms.py", line 676, in histogram
bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
File ".../numpy/lib/histograms.py", line 351, in _get_bin_edges
endpoint=True, dtype=bin_type)
File ".../numpy/core/function_base.py", line 115, in linspace
y = _nx.arange(0, num, dtype=dt)
MemoryError

Numpy/Python version information:

1.15.0 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0]
Issue 1:
There are a number of error messages that have two almost identical variants. One with a colon at the end, and one with a period. The idea is that the error should end in a colon if has an elaboration, and a period if not. This is not giving us enough benefit to justify the existence of these variants. So we should remove the colon variants.

Issue 2:
We decided that the colons in the chained error messages makes the code harder to read, and does not add enough value for it to be worth it. But let's wait until the parity pass is finished.
Issue 1:
ℹ Computer information

Windows build number: 18363.959

PowerToys version: 0.20.0

PowerToy module: fancy zones

📝 Provide detailed reproduction steps (if any)

Don't have specific steps, was just moving Slack between zones using Win+Left and Win+Right buttons, and PowerToys crashed.

2020-08-06.txt

The only interesting detail - another monitor was connected after Windows started, though several hours before the incident. Usual setup, two 38402160 displays, newly connected one - 19201200.

❌ Actual result

PowerToys crashed

Issue 2:
Popup tells me to give y'all this.

2020-07-31.txt

Version: 1.0.0

OS Version: Microsoft Windows NT 10.0.19041.0

IntPtr Length: 8

x64: True

Date: 07/31/2020 17:29:59

Exception:

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'Timer'.

at System.Timers.Timer.set_Enabled(Boolean value)

at System.Timers.Timer.Start()

at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)

at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)

at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)

at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

at System.Windows.UIElement.UpdateIsVisibleCache()

at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)

at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)

at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)

at System.Windows.Window.SetRootVisual()

at System.Windows.Window.SetRootVisualAndUpdateSTC()

at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)

at System.Windows.Window.CreateSourceWindow(Boolean duringShow)

at System.Windows.Window.CreateSourceWindowDuringShow()

at System.Windows.Window.SafeCreateWindowDuringShow()

at System.Windows.Window.ShowHelper(Object booleanBox)

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Issue 1:
I've created aliases for many of my commands which is nice for typing but it creates a lot of duplicates in the command list. e.g.

Available commands:
ci Commit outstanding changes # ALIAS
dependencies Lists all installed vendor packages.
deps Lists all installed vendor packages. # ALIAS
help Displays help for a command
install Installs dependencies
list Lists commands
merge Merge all branch heads
mysql Start MySQL REPL
napi Rebuilds your napi.json locally
optimize Optimizes composer's autoloader by caching class paths
pkg Lists all installed vendor packages. # ALIAS
hg
hg:backout Prepare a new changeset with the specified revisions undone
hg:branches List all named branches
hg:commit Commit outstanding changes

It would be nice if instead the command list either excluded aliases, or put them in the description. e.g.

Available commands:
dependencies [deps|pkg] Lists all installed vendor packages.
help Displays help for a command
install Installs dependencies
list Lists commands
merge Merge all branch heads
mysql Start MySQL REPL
napi Rebuilds your napi.json locally
optimize Optimizes composer's autoloader by caching class paths
hg
hg:backout Prepare a new changeset with the specified revisions undone
hg:branches List all named branches
hg:commit [ci] Commit outstanding changes

If you're worried about backwards compat or something, this can be made an option of the Application object. Right now it looks pretty hard-coded:

$this->commands[$command->getName()] = $command;

foreach ($command->getAliases() as $alias) {
$this->commands[$alias] = $command;
}

Issue 2:
Im running SF 2.3.4 and using the src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php

The session is not sync with DB when it's set, for example if I do this in a controller:

$this->get('session')->getFlashBag()->add('success', 'ok');
return $this->redirect($this->generateUrl('homepage'));

The flash message "ok" won't show up, I need to reload the page to get it.

I think this bad behavior could be because of the mongoDb sync wich is not forced when writing session...

Any ideas please ?
Issue 1:
It is said that a P-521 key gives the equivalent security of a 256-bit AES key. However, Deno's WebCrypto implementation currently only supports P-256 and P-384 keys.

The WebCrypto roadmap indicates that P-521 support is planned. Are we waiting on P-521 support in dependencies like RustCrypto, or can we proceed?

Issue 2:
Support for p521 curves for ECDSA and ECDH on all relevant operations. Ideally when its part of RustCrypto https://github.com/RustCrypto/elliptic-curves
Issue 1:
Expected behavior:

cmd-l cmd-c cmd-v (selecting the current line, copying the current line, and pasting it over the top of itself) should leave no changes to the editor.

Current behavior:

After this key combo, the current line is stripped of its previous indentation.

Why it's useful:

I often use this command along with additional presses of cmd-v in order to duplicate the current line in-place.

For one example, I use it when adding vendor prefixes in CSS.

Sublime (cmd-l c v v v to paste 3 times)

Atom loses my indentation when I paste the same line over the top of itself.

Atom

Issue 2:
normalizeIndentOnPaste is supposed to convert tabs to spaces, or spaces to tabs. Instead it removes all indentation from the start of the line.

In a coffee file, try cutting and then immediately pasting the middle line:

console.log "foo"
console.log "bar"
console.log "baz"

You get:

console.log "foo"
console.log "bar"
console.log "baz"

which is definitely note what normalizeIndentOnPaste should be doing.
Issue 1:
Allow stretching of windows using WIN+Shift+Arrow keys

I think it would be a great addition to FancyZones if you could also move zones to multiple position (just like you can with dragging) only using the keyboard.

My idea is that, once you press WIN+Shift it freezes the window where it is and every press of an arrow button moves it one more zone in that direction.

Every bracket pair is one zone:

[x] [ ] [ ] [ ]

Win+Shift+Arrow right

[ x ] [ ] [ ]

Another arrow right

[ x ] [ ]

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Issue 2:
For multiple screens, we need to manage the virtual desktop individually for each screen (like Linux or Mac). It's can avoid attach / detach each application to show in all virtual desktops every minute.

Thanks!
Issue 1:
Hi,

Is it possible to customize the legend of an object interface? Right now I'm trying a variety of ways to access it via the matplotlib axes and figures, but nothing changes the legend.

g = (so.Plot(ange_surv, x='Week ', y='GWC',

color='Treatment ')

.add(so.Dot(alpha = 0.35), so.Jitter(), so.Dodge())

.add(so.Range(linewidth=2), so.Est(errorbar=('se', 1)), so.Dodge())

.add(so.Dot(pointsize=12), so.Agg(), so.Dodge())

.label(x='Week of Experiment', y='GWC')

.theme(sns_theme)

)

f = plt.figure()

res = g.on(f).plot()

ax = f.axes[0]

ax.legend(ncols=2, loc=2, bbox_to_anchor=(1.01, 1.01))

plt.show()

And the matplotlib rcparams don't allow for fine-tuning.

Issue 2:
There's not much ability to customize how the Plot legend appears, beyond what's available through Plot.theme. Desiderata include:

Control over position

Control over number of columns and location of title

Potential for independent drawing / localization of legends for distinct properties

Appearance of mapped properties on legend artists for other properties. In other words, If you map color and pointsize to different variables, the pointsize artists will appear in C0 even if that doesn't appear in the plot. (This probably needs both better defaults and more customizability).