WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Current behavior

Using REPL (current/default v7.11.1) with all of checkboxes disabled:

(Explicitly disable ENV or enable es2015 to see the error via the link above)

Input Code

function f(y){
for(let x of y){
let x = y;
return x;
}
}

Expected behavior

That should successfully compile just as this code does:

function f(z){
for(let x=0; x<y; x++){
let x = y;
return x;
}
}

Which gives

"use strict";

function f(z) {
for (var x = 0; x < y; x++) {
var _x = y;
return _x;
}
}

Actual behavior

However, the error is:

/repl.js: Duplicate declaration "x"
1 | function f(y){
2 | for(let x of y){
> 3 | let x = y;
| ^
4 | return x;
5 | }
6 | }

Additional context

If the ES6 transpiling (let to var) is disabled (ENV: firefox 74), that code correctly gives:

"use strict";

function f(y) {
for (let x of y) {
let x = y;
return x;
}
}

Environment

Babel version: REPL v7.11.1

Browser: Firefox 76 on Windows 7

Issue 2:
Choose one: is this a bug report or feature request?

Bug

Input Code

// 'a.js'
let a = (obj) => ({...obj})
// 'b.js'
let a = (obj) => ({...obj})
// ....and other files that uses object spread

Babel/Babylon Configuration (.babelrc, package.json, cli command)

{
presets: [
['@babel/preset-env', {
modules: false,
useBuiltIns: 'usage',
targets: { android: '4.4', ios: '9' }
}]
]
}

Expected Behavior

Only one occurrence of object spread helpers.

Current Behavior

Duplicated function _objectSpread() {...} and function _defineProperty(obj, key, value) {...} per file

Possible Solution

Maybe:

Make babel-plugin-proposal-object-rest-spread support useBuiltins: 'usage' as it currently supports only true/false, or treat 'usage' as true.

Or allow passing options to individual plugins inside option of preset-env, something like

['@babel/preset-env', {
pluginOptions: {
'@babel/plugin-proposal-object-rest-spread': {
useBuiltIns: 'true'
}
}
]

Context

I want to use the new useBuiltIns: 'usage' feature to polyfill on demand, making smaller outputs without manually defining exclude option for ES6/7 features that I don't actually use. However this is instead duplicated object spread helpers that bloats the output.

Your Environment

software
version(s)

Babel
7.0.0.beta-44

node
9.10.1

npm
5.6.0

Operating System
Windows 10 x64
Issue 1:
I tried to use with implementation=css and only={["xs", "sm", "lg", "xl"]}.

The error message is:

string.charAt is not a function. (In 'string.charAt(0)', 'string.charAt' is undefined)

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

Expected Behavior

It should compile and work

Current Behavior

doesn't compile

Steps to Reproduce (for bugs)

https://codesandbox.io/s/1okvkyj7xj

Your Environment

Tech
Version

Material-UI
next

React
latest

browser
any

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

Expected Behavior

When having Menu items display conditionally it should work as expected.

Current Behavior

When condition evaluates to false and MenuItem is not rendered an error pops up: Cannot read property 'props' of null

Steps to Reproduce (for bugs)

https://codesandbox.io/s/24mlj7qzjr

Add a condition to display a MenuItem:

{allowEmpty && (
<MenuItem value="">
<em>None</em>
</MenuItem>
)}

Evaluate condition to false.

Context

I want to controll rendering of empty MenuItem with flag allowEmpty.

The problem occurs from this loop where child is not checked for undefined or null and tries to access child props.

https://github.com/callemall/material-ui/blob/v1-beta/src/Select/SelectInput.js#L278

https://github.com/callemall/material-ui/blob/v1-beta/src/Select/SelectInput.js#L283

Your Environment

Tech
Version

Material-UI
1.0.0-beta.9

React
15.5.3

browser
Chrome Version 60.0.3112.113 (Official Build) (64-bit)

etc
Issue 1:
#6848 is no where mentioned in the release notes. There's a single item on .order

changing to quicksort, but it doesn't explicitly warn that the sort was previously stable

and now isn't. There's also no warning about series.sort changing as well.

That API has been around forever and afaict nothing was gained by breaking it.

This was a fairly reckless change in my opinion, I do wish the current maintainers

cared more about backwards-compatibility then they seem to in the latest releases.

Issue 2:
It seems that drop_duplicates() and duplicated() methods are not working properly for large integer columns. Here is my example data frame http://pastebin.com/KVHxUpgz

import pandas as pd

pd.read_clipboard(delimiter=',')
r = x.duplicated(keep=False)
print(x[r])

This gives me:

x1 x2

8 16000010001 8470207

95 16000010009 8470039

Clearly these are not duplicates but seems like pandas thinks they are!

Also drop_duplicates() seems to fail:

print(len(x),len(x.drop_duplicates()))

gives: 101 100

When I convert my columns to string they are not duplicates anymore:

r1 = x.apply(lambda x: '%d-%d' % tuple(x),axis=1).duplicated()
print(r1.sum())

is 0 as it should.

Here is the versions:

pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.4.3.final.0

python-bits: 64

OS: Windows

OS-release: 7

machine: AMD64

processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel

byteorder: little

LC_ALL: None

LANG: fi_FI

pandas: 0.17.0

nose: None

pip: 7.1.2

setuptools: 18.4

Cython: 0.23.4

numpy: 1.10.1

scipy: 0.16.0

statsmodels: None

IPython: 4.0.0

sphinx: 1.3.1

patsy: 0.4.0

dateutil: 2.4.2

pytz: 2015.6

blosc: None

bottleneck: 1.0.0

tables: 3.2.2

numexpr: 2.4.4

matplotlib: 1.4.3

openpyxl: 2.2.6

xlrd: 0.9.4

xlwt: 1.0.0

xlsxwriter: 0.7.7

lxml: 3.4.4

bs4: 4.4.1

html5lib: 0.999

httplib2: None

apiclient: None

sqlalchemy: 1.0.9

pymysql: None

psycopg2: None
Issue 1:
Code Sample, a copy-pastable example if possible

In [2]: ts = 1.4884427244831782e+18

In [3]: pd.to_datetime(ts, utc=True)
Out[3]: Timestamp('2017-03-02 08:18:44.483178240+0000', tz='UTC')

In [4]: pd.to_datetime([ts], utc=True)
Out[4]: DatetimeIndex(['2017-03-02 08:18:44.483178240+00:00'], dtype='datetime64[ns, UTC]', freq=None)

In [5]: pd.to_datetime(pd.Series([ts]), utc=True)
Out[5]:
0 2017-03-02 08:18:44.483178240
dtype: datetime64[ns]

Problem description

The argument utc=True in function to_datetime is not working when passing a Series, differently from other case, e.g. when passing a list or a scalar Unix timestamp.

Expected Output

The expected output is the same as the one given by

In [6]: pd.to_datetime(pd.Series([ts])).dt.tz_localize('UTC')
Out[6]:
0 2017-03-02 08:18:44.483178240+00:00
dtype: datetime64[ns, UTC]

Another example: tz_convert

It is straightforward to convert to another time zone from a Unix timestamp or list:

In [7]: pd.to_datetime(ts, utc=True).tz_convert('Europe/Paris')
Out[7]: Timestamp('2017-03-02 09:18:44.483178240+0100', tz='Europe/Paris')

In [8]: pd.to_datetime([ts], utc=True).tz_convert('Europe/Paris')
Out[8]: DatetimeIndex(['2017-03-02 09:18:44.483178240+01:00'], dtype='datetime64[ns, Europe/Paris]', freq=None)

whereas for a Series:

In [9]: pd.to_datetime(pd.Series([ts])).dt.tz_localize('UTC').dt.tz_convert('Europe/Paris')
Out[9]:
0 2017-03-02 09:18:44.483178240+01:00
dtype: datetime64[ns, Europe/Paris]

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-113-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: ca_ES.UTF-8
LOCALE: ca_ES.UTF-8

pandas: 0.19.2

nose: 1.3.7

pip: 8.1.2

setuptools: 27.2.0.post20161106

Cython: 0.24.1

numpy: 1.11.1

scipy: 0.18.1

statsmodels: 0.6.1

xarray: None

IPython: 5.1.0

sphinx: 1.4.6

patsy: 0.4.1

dateutil: 2.5.3

pytz: 2016.6.1

blosc: None

bottleneck: 1.1.0

tables: 3.2.3.1

numexpr: 2.6.1

matplotlib: 1.5.3

openpyxl: 2.3.2

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.3

lxml: 3.6.4

bs4: 4.5.1

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: 1.0.13

pymysql: None

psycopg2: None

jinja2: 2.8

boto: 2.42.0

pandas_datareader: 0.2.1

Issue 2:
Is this a bug or a feature that I don't understand:

data = ['20100102 121314', '20100102 121315']
print (pd.to_datetime(data, format='%Y%m%d %H%M%S',
utc=True)[0]).__repr__()
print (pd.to_datetime(pd.Series(data), format='%Y%m%d %H%M%S',
utc=True)[0]).__repr__()
print (pd.to_datetime(pd.TimeSeries(data), format='%Y%m%d %H%M%S',
utc=True)[0]).__repr__()

results in

Timestamp('2010-01-02 12:13:14+0000', tz='UTC')
Timestamp('2010-01-02 12:13:14', tz=None)
Timestamp('2010-01-02 12:13:14', tz=None)

Using version '0.13.1'

Other example in #15760
Issue 1:
When using DataFrame.loc with a list of indices, the index name is missing from the resultant DataFrame unless the list of indices includes all of the indices in the original DataFrame.

Example:

import pandas as pd
d=pd.DataFrame(
[
[1,2,3],
[4,5,6],
[7,8,9]
],
columns=['i','j','k']
).set_index('i')

When I use .loc and ask for all of the rows, I get (as desired) the correct, named index out the other end:

d.loc[[1,4,7]]
# j k
# i
#1 2 3
#4 5 6
#7 8 9

d.loc[[1,4,7]].index.name
# 'i'

When I ask for a list of indices that is not all of them, I also expect to get a named index out the other end. However, the index values are preserved but the index name is lost:

d.loc[[1,4]]
# j k
#1 2 3
#4 5 6

d.loc[[1,4]].index.name
# None

Suggesting that this is a bug because the index naming should be the same no matter whether I .loc for for all of the rows or just some of them.

Issue 2:
This issue was encountered when fixing #6536. It seems that .loc indexer with empty list key seems to lose names of respective axes:

In [2]: pd.DataFrame(np.arange(9).reshape(3,3), columns=pd.Series(list('abc'), name='foobar'))
Out[2]:
foobar a b c
0 0 1 2
1 3 4 5
2 6 7 8

[3 rows x 3 columns]

In [3]: _2.iloc[:,[]]
Out[3]:
Empty DataFrame
Columns: []
Index: [0, 1, 2]

[3 rows x 0 columns]

In [4]: _2.iloc[:,[]].columns.names
Out[4]: FrozenList([u'foobar'])

In [5]: _2.loc[:,[]].columns.names
Out[5]: FrozenList([None])

It's not important, but currently #6551 has two tests skipped because of this bug.
Issue 1:
Hi all !

I'm on windows : installed with the new installer on the website after doing a clean remove from chocolatey.

I have a weird problem : if i open atom from the commandline, with atom . or atom ./myfile , then everything work fine. If i open it from the desktop shortcut (or even right click open with atom) then, i can't write anything or create new files, and i've got a bunch of "module did not register" in the console from a load of module (all of them i guess ?)

It's a pretty weird bug, everything worked fine with my old chocolatey version.

Issue 2:
Yep, it sounds strange, but that's my issue:

I can start Atom from the Run command or the command prompt, but not from the Start menu.

If I try that, the content of the editor is gray-blank (no tabs or anything) and the console is full of Error: Module did not self-register..

I'm using Windows 8.1 x64 and Atom 0.161.0. I had installed the Chocolatey version before and it worked fine. I updated accordingly to the blog post.

A clean installation (after removing .atom, AppData\Local\atom and AppData\Roaming\Atom in the user folder) didn't fix this issue.
Issue 1:
Airflow 1.10.9

Celery 4.3.0

Setting Celery 'worker_concurrency' is overriden by the autoscaling no matter what you configure.

Problematic code is here:

airflow/airflow/cli/commands/celery_command.py

Line 121
in
6db66ea

'autoscale': autoscale,

(this is head but it's the same bug in the 1.10.x version of this file)

You always get the default autoscaling setting with head if you don't set autoscaling at all but do set worker concurrency (which is 12 workers).

Not adding "autoscale" to the dictionary when autoscaling is not set is enough to solve this (at least, I tested the worker_concurrency half of things, and the asked for concurrency is back with that change).

Issue 2:
Apache Airflow version: 1.10.9

Environment:

OS: Debian GNU/Linux 10

Kernel: Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

What happened:

The worker_autoscale configuration option in airflow.cfg was overridded by the default value in airflow/config_templates/default_airflow.cfg when left commented in the airflow.cfg file.

What you expected to happen:

The worker_autoscale option not being overridden by the default value.

How to reproduce it:

Comment the worker_autoscale option in the [celery] section in airflow.cfg.

Spawn a worker by running airflow worker

The celery worker will be spawned with the default autoscale option (16,12)

Anything else we need to know:

As the worker_autoscale option has priority over the concurrency option, the last one gets ignored even if autoscale is commented in the config file.

The worker_autoscale option is commented in airflow/config_templates/default_airflow.cfg in the master branch (which fixes the issue) but not in the 1.10.9 release.
Issue 1:
I am using launch.json to debug .Net Core Application in VS code.

Debugger configuration uses "preLaunchTask": "build" to build application before starting, but the problem is that I have several projects in my solution that I want to debug, so I have duplicated launch.json configurations for every single executable project in my solution. With this scenario build preLaunchTask is not working. I need to pass my project's directory to build task.

Is there anyway to pass arguments to preLaunchTask from launch.json?

Issue 2:
Testing #2145

search for something

have some results

tab to the first result file

tab to the 'X'

press arrow down

focus goes to <body> according to activeElement

expected: focus stays in the tree or somewhere.
Issue 1:
Windows 8.1

Every time I open atom (without passing any location or file to open), it opens up with an empty editor pane as expected.

But when I press Ctrl-\ the tree view does not open.

If I go to "Toggle Tree View" from the menu, it also does nothing, no matter how often I click it or hit the key binding.

Only after opening a new window, e.g. by opening a folder or file via the menu, does the toggling work again and the tree view responds.

Issue 2:
meta+t opens and closes the fuzzy finder, but meta+F only opens the file finder. It'd be awesome if it would also close the file finder because I can't remember how to close it.
Issue 1:
The following snippets will cause errors. After removing req.clone it will be fine, so 100% req.clone is the source of issue.

Deno.serve(opts, (req) => {
console.log('check req', req.clone())
return new Response()
})

TypeError: Array.prototype.map called on null or undefined
at map (<anonymous>)
at cloneInnerRequest (deno:ext/fetch/23_request.js:164:9)
at Request.clone (deno:ext/fetch/23_request.js:489:18)
at Object.serve (deno:ext/flash/01_http.js:543:22)
at async Promise.all (index 0)
at async Object.serve (deno:ext/flash/01_http.js:619:5)

Issue 2:
Description

When running deno bundle on the example code in the front page of http://deno.land/ the resulting code is invalid and throws a syntax error when running it with deno run.

The code example is the following:

import { serve } from "https://deno.land/std@0.61.0/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}

Environment

This was tested on Deno 1.2.0 on both Windows 10 installed using the powershell script on the front page, and Arch Linux installed using the aur package deno-bin.

deno --version on windows reports the following:

deno 1.2.0
v8 8.5.216
typescript 3.9.2

Steps to reproduce

Save the example code to a file server.ts

Run the command deno bundle server.ts server.bundle.js

Run the command deno run --allow-net server.bundle.js

Expected Behaviour

The code should run correctly. The original does work when executing deno run --allow-net server.ts (server.ts being the original code example)

Actual Result

The command fails throwing a SyntaxError:

error: Uncaught SyntaxError: Unexpected reserved word
for await (const req of s) {
~~~~~
at file:///<redacted path>/server.bundle.js:1715:17

Cause

When inspecting the emitted code server.bundle.js, at the line reported in the error there is an invalid await keyword in the scope of a non-async function.

execute: function () {
s = server_ts_2.serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}
}
Issue 1:
There is no "btn-mini" in your code anymore as described in the documentation.

Issue 2:
Hi,

ist have following hints:

The glyphicons icons are not vertical centered in the buttons, they are on the bottom (I bought the glyphicons)

The mini button set is missing (please add them again)

Please add again the old btn button style. The new default button is too dark. The default button on bootstrap 2 looks much better

The new button do not really looks like button
Issue 1:
Can't click on the button to expand information. I guess, it does not work on mobile devices too (tested in chrome dev tools emulator).

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-say-hello-to-html-elements has an issue. Please describe how to reproduce it, and include links to screen shots if possible.

I was unable to access the instructions for this module because the button labeled "More Information" was unresponsive on my mobile devices (both iPhone & iPad). For both, I'm running iOS v 8.3.

The editor and display both seem to be working fine. It would be extremely useful to be able to use my mobile devices in addition to my laptop because it's easier to integrate into my daily routine.
Issue 1:
Electron Version: ^2.0.5

Operating System (Platform and Version): #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07)

Last known working Electron version: I'm just testing electron now

Expected Behavior

Load bootstrap initial needed files

Actual behavior

Getting "Cannot read property 'fn' of undefined"

To Reproduce

On this test I'm just creating a total clear index html page. Just like quick start examples

Additional Info

In this link I got a workaround hack to make it work

https://stackoverflow.com/questions/32621988/electron-jquery-is-not-defined

Screenshot

In the left window you can see the application running under Electron with that fail message. In the right I'm loaded exactly same file but directly in the google chrome browser.

Issue 2:
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 a feature request that matches the one I want to file, without success.

Electron Version

12.0.12

What operating system are you using?

macOS

Operating System Version

macOS Big Sur 11.4

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

If nodeIntegrationInWorker is enabled, node modules could be required in web worker regardless of whether use custom protocol or not.

Actual Behavior

If web worker is delivered by custom protocol, cannot find module error occurs.

Testcase Gist URL

https://gist.github.com/juchan1220/636574b514984bd629774268162292c7

Additional Information

I guess the cause of this issue is lib/worker/init.ts sets global.module.paths only when web worker is delivered by file: protocol.

possible duplicate of #27802?
Issue 1:
The only thing std::time contains is Duration, which isn't too useful on its own. The real meat of it is in ::time.

Perhaps one should be moved into the other?

Alternatively, we can add some docs to Duration that explain how to work with it. One common way of getting a Duration is to subtract two instances of time::now().to_timespec()s, however this is completely not obvious on std::time. I don't mind adding these docs.

Issue 2:
Issue by brson

Wednesday Jun 04, 2014 at 22:11 GMT

For earlier discussion, see rust-lang/rust#14657

This issue was labelled with: A-libs, I-enhancement in the Rust repository

Just clone JodaTime. Start out of tree.
Issue 1:
Problem description

Example: Hidden API docs import type {HiddenProps} from './types'. This is done to prevent a cyclic dependency problem, as the HiddenProps are imported by three (to be four) files:

Hidden

HiddenJs

HiddenCss (TBD)

Grid (tight integration with Hidden)

I am very strongly against duplicating props just so we have documentation. In this case, we have two public components so we would probably have three copies of a reasonably extensive set of properties.

This is not the lone case, as our responsive components reference type Breakpoint as well, though this one seems easier as it is a bit simpler.

I raised an issue and learned that react-docgen doesn't resolve imported types. I have been thinking about the solution. Duplication is a last resort and I don't think we are there yet.

Note that this is not specific to use of flow, it is also a problem importing reusable prop-types.

I am open to ideas on solutions. It is something that must be addressed before next is generally available.

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

I'm trying to differentiate the icon class style of a switch between checked and unchecked, but it doesn't seem to work

Steps to Reproduce (for bugs)

const styles = {
icon: {
borderWidth: 0,
borderColor: b3,
borderStyle: 'solid'
},
checked: {
'& + $icon': {
borderWidth: 1,
borderColor: b4,
borderStyle: 'solid'
},
'& > $icon': {
borderWidth: 1,
borderColor: b4,
borderStyle: 'solid'
}
}

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.27

React
16.2.0
Issue 1:
Description

When integer inputs are passed in to jax.numpy.divmod, a division/modulo by zero results in inconsistent results when compared with numpy.divmod or the Python operators // and % as shown below:

jax.numpy.divmod

import jax.numpy as jnp
x1 = jnp.array(3, dtype="int32")
x2 = jnp.array(0, dtype="int32")
print(x1)
print(x2)
print(jnp.divmod(x1, x2))

Captured Output:

3
0
(DeviceArray(-2, dtype=int32), DeviceArray(3, dtype=int32))

whereas with numpy.divmod, the output comes out to be:

numpy.divmod

import numpy as np
x1 = np.array(3, dtype="int32")
x2 = np.array(0, dtype="int32")
print(x1)
print(x2)
print(np.divmod(x1, x2))

Captured Output:

3
0
(0, 0)

and with Python's divmod operators:

// and %

x1 = np.array(3, dtype="int32")
x2 = np.array(0, dtype="int32")
print(x1)
print(x2)
print((x1//x2, x1%x2))

Captured Output:

3
0
(0, 0)

This behaviour does not follow numpy's or python's functional equivalents, even though the same has been claimed in the documentation. This behaviour is also reproducible when the above code is ran with jax.numpy.floor_divide, jax.numpy.divide or jax.numpy.mod methods as those methods probably delegate to the same API in the backend implementation.

What jax/jaxlib version are you using?

jax v0.3.14

Which accelerator(s) are you using?

CPU

Additional system info

Python (v3.8.10), OS (Linux WSL2 Ubuntu 20.04 LTS)

NVIDIA GPU info

No response

Issue 2:
Description

Jax and numpy differ in their behavior with regards to computing a modulus by zero. Jax treats it as a no-op, and numpy treats it as the zero function.

Numpy

Python 3.10.5 (main, Jul 15 2022, 03:56:49) [GCC 11.3.0] on linux
>>> import numpy as np
>>> a = np.array([1,2,3], dtype=np.uint32)
>>> np.mod(a, 0)
<stdin>:1: RuntimeWarning: divide by zero encountered in remainder
array([0, 0, 0], dtype=uint32)

JAX

>>> import jax.numpy as jnp
>>> a = jnp.array([1,2,3], dtype=jnp.uint32)
>>> jnp.mod(a, 0)
DeviceArray([1, 2, 3], dtype=uint32)

What jax/jaxlib version are you using?

HEAD

Which accelerator(s) are you using?

CPU

Additional System Info

Python 3.9, 3.10.5