WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Code Sample, a copy-pastable example if possible

df = pd.DataFrame({'First': ['A', 'A', 'A', 'B', 'B'], 'Last': ['C', 'D', 'E', 'E', 'F'], 'C':[1, 1, 2, 1, 1]})
df.set_index(['Last','First'], inplace=True)

# rename1
df.rename(index={('C','A'):('C','NEWFIRST')})

# rename2
df.rename(index={('C','A'):('NEWLAST','A')})

Problem description

Renaming Muiltiindex values does nothing, not even raise an Exception.

Expected Output

rename1 = pd.DataFrame({'First': ['NEWFIRST', 'A', 'A', 'B', 'B'], 'Last': ['C', 'D', 'E', 'E', 'F'], 'C':[1, 1, 2, 1, 1]})
rename1.set_index(['Last','First'], inplace=True)

rename2 = pd.DataFrame({'First': ['A', 'A', 'A', 'B', 'B'], 'Last': ['NEWLAST', 'D', 'E', 'E', 'F'], 'C':[1, 1, 2, 1, 1]})
rename2.set_index(['Last','First'], inplace=True)

Output of pd.show_versions()

```
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.8.0-46-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_AU.UTF-8
LOCALE: en_AU.UTF-8

pandas: 0.19.2+0.g825876c.dirty

nose: 1.3.7

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.25.2

numpy: 1.11.2

scipy: 0.18.1

statsmodels: 0.6.1

xarray: None

IPython: 5.1.0

sphinx: 1.5.1

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2016.10

blosc: None

bottleneck: 1.1.0

tables: 3.3.0

numexpr: 2.6.1

matplotlib: 1.5.3

openpyxl: 2.4.0

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.6

lxml: None

bs4: 4.5.1

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: 1.1.4

pymysql: None

psycopg2: 2.6.2 (dt dec pq3 ext lo64)

jinja2: 2.8

boto: 2.45.0

pandas_datareader: None

</details>

Issue 2:
There appears to be an issue with Excel writers when DataFrame column names are duplicated. This issue that was initially reported on StackOverflow.

For example consider the following program:

import pandas as pd
from pandas import DataFrame

df = DataFrame([[1, 2, 3], [1, 2, 3], [1, 2, 3]])

df.columns = ['A', 'B', 'B'] # !!!

df.to_csv('output.csv')
df.to_excel('output.xlsx')

Note the duplicated column name. The df for this looks like this:

>>> df
A B B
0 1 2 3
1 1 2 3
2 1 2 3

The corresponding output of the CSV is as expected:

$ cat output.csv
,A,B,B
0,1,2,3
1,1,2,3
2,1,2,3

However, the output of the any of the Excel writers is incorrect:

The issue appears to be in pandas/core/format.py. The output data is gathered based on column names, as shown below, which causes issues with duplicate names.

def _format_regular_rows(self):
...
for colidx, colname in enumerate(self.columns):
series = self.df[colname]
...

I initially thought that this might be the correct behaviour and that column names shouldn't be duplicated but given that the output is different to the csv writer it looks like a bug.

I'll write a test case but I'm not sure of the best way to fix the issue.
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18363.836]
PowerToys version: Release v0.18.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones
GeForce 1070 with driver Nvidia 445.87 (German)

Steps to reproduce

Setup FancyZones (I have a multi-monitor-setup with three monitors of different resolutions each).

Leave your PC and wait for your Screens to go into sleep mode.

Reactivate the system.

Expected behavior

The drop zones remain transparent and you can see the background through them when moving windows with pressed [Shift].

Actual behavior

The tiles representing the zones where you can drop windows into loose their transparency. In rare cases even the whole background is set to black.

Screenshots

Example Video

2020-05-23 18-08-20.zip

Issue 2:
📝 Provide a description of the new feature

Your media controls will always be visible in the Action Center OR in the Volume panel

Its a huge issue if you don't have hardware buttons because the only on-screen windows controls show when you change volume with hardware buttons.. I don't have quick play pause buttons and always have my music apps put on my furthest virtual desktop for productivity reasons. It would be great to have a bit of consistent design and put it into the volume panel or action center like how brightness got moved. This would promote using the action center too.

I'd like a minimum of play/pause but loading the album art ONLY IF AVAILABLE would be great! Song name/album name/song duration/etc would be a great bonus too but the main functionality would be the buttons.

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Issue 1:
I'm largely adding this as an additional test to #14426.

TestEncoderUsage fails with:

go test -v
=== RUN TestEncoderUsage
2016/02/21 14:57:22 Encoder dimensions: 640, 480
--- FAIL: TestEncoderUsage (0.00s)
panic: runtime error: cgo argument has Go pointer to Go pointer [recovered]
panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 5 [running]:
panic(0x57b820, 0xc8200106d0)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
testing.tRunner.func1(0xc8200a0000)
/usr/local/go/src/testing/testing.go:467 +0x192
panic(0x57b820, 0xc8200106d0)
/usr/local/go/src/runtime/panic.go:426 +0x4e9
github.com/stephenwithav/ffmpeg.(*Encoder).WriteFrame(0xc820070300, 0x7fa104dd7688, 0xc820014640, 0x0, 0x0)
/home/steven/repos/gopath/src/github.com/stephenwithav/ffmpeg/ffmpeg.go:143 +0x465
github.com/stephenwithav/ffmpeg.TestEncoderUsage(0xc8200a0000)
/home/steven/repos/gopath/src/github.com/stephenwithav/ffmpeg/ffmpeg_test.go:35 +0x83f
testing.tRunner(0xc8200a0000, 0x885260)
/usr/local/go/src/testing/testing.go:473 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:582 +0x892
exit status 2
FAIL github.com/stephenwithav/ffmpeg 0.052s

The offending code on line 143:

// Perform scaling from input type to output type
C.sws_scale(e._swscontext, &input_data[0], &input_linesize[0],
0, e._context.height,
&e._frame.data[0], &e._frame.linesize[0])

Any help would be appreciated.

Issue 2:
I'm largely adding this as an additional test to #14426.

TestEncoderUsage fails with:

go test -v
=== RUN TestEncoderUsage
2016/02/21 14:57:22 Encoder dimensions: 640, 480
--- FAIL: TestEncoderUsage (0.00s)
panic: runtime error: cgo argument has Go pointer to Go pointer [recovered]
panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 5 [running]:
panic(0x57b820, 0xc8200106d0)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
testing.tRunner.func1(0xc8200a0000)
/usr/local/go/src/testing/testing.go:467 +0x192
panic(0x57b820, 0xc8200106d0)
/usr/local/go/src/runtime/panic.go:426 +0x4e9
github.com/stephenwithav/ffmpeg.(*Encoder).WriteFrame(0xc820070300, 0x7fa104dd7688, 0xc820014640, 0x0, 0x0)
/home/steven/repos/gopath/src/github.com/stephenwithav/ffmpeg/ffmpeg.go:143 +0x465
github.com/stephenwithav/ffmpeg.TestEncoderUsage(0xc8200a0000)
/home/steven/repos/gopath/src/github.com/stephenwithav/ffmpeg/ffmpeg_test.go:35 +0x83f
testing.tRunner(0xc8200a0000, 0x885260)
/usr/local/go/src/testing/testing.go:473 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:582 +0x892
exit status 2
FAIL github.com/stephenwithav/ffmpeg 0.052s

The offending code on line 143:

// Perform scaling from input type to output type
C.sws_scale(e._swscontext, &input_data[0], &input_linesize[0],
0, e._context.height,
&e._frame.data[0], &e._frame.linesize[0])

Any help would be appreciated.
Issue 1:
>>> import warnings
>>> warnings.simplefilter('error')

>>> import pandas as pd
>>> pd.__version__
u'0.17.0rc1'

>>> df = pd.DataFrame({'A': list('aabb'), 'B': [0, 1, 0, 1], 'C': range(4)})
>>> gf = df.groupby(['A', 'B']).sum()
>>> gf
C
A B
a 0 0
1 1
b 0 2
1 3

>>> gf.unstack()
Traceback (most recent call last):
..., line 4274, in _reference_duplicate_name
return np.sum(name == np.asarray(self.names)) > 1
DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.

Issue 2:
http://stackoverflow.com/questions/21318865/read-multi-index-on-the-columns-from-csv-file
Issue 1:
Error updating database. Cause: java.sql.SQLException: Field 'id' doesn't have a default value

The error may involve com.demo.test.project.mapper.TestRecordMapper.add-Inline

The error occurred while setting parameters

SQL: insert into test_record(point_id,str,time)values(?,?,?) on duplicate key update str = value(str)

Cause: java.sql.SQLException: Field 'id' doesn't have a default value

; Field 'id' doesn't have a default value; nested exception is java.sql.SQLException: Field 'id' doesn't have a default value

Issue 2:
Bug Report

Which version of ShardingSphere did you use?

4.0.0.M1

Which project did you use? Sharding-JDBC or Sharding-Proxy?

sharding-proxy

Expected behavior

sql：

select * from customer t where party_id in(8001,8002,8003,8004);

config：

customer:
actualDataNodes: ds_0.customer_000${0..1},ds_1.customer_000${2..3}
databaseStrategy:
inline:
shardingColumn: party_id
algorithmExpression: ds_${(party_id % 4).intdiv(2)}
tableStrategy:
inline:
shardingColumn: party_id
algorithmExpression: customer_${"000" + (party_id % 4)}

route result error:

ds_0 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
ds_0 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
ds_0 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
ds_0 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);
ds_1 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
ds_1 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
ds_1 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
ds_1 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);

The correct routing result should be as follows：

ds_0 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
ds_0 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
ds_1 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
ds_1 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);
Issue 1:
Every time that I finish a challenge, I go back to the page of my profile emmediatly and face with this error message:

Oops! Something went wrong. Please try again later.

Issue 2:
After completing some challenges (using ctrl+enter twice) I get redirected to http://www.freecodecamp.com/map where a banner pops up and says "Oops! Something went wrong. Please try again later"

I'm on the beginning of the HTML5 and CSS section

Edit:

I just looked at the console after this happened again and here are the 2 error messages:

[Error] Failed to load resource: the server responded with a status of 403 (Forbidden) (sidecar.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.min.map, line 0)
Issue 1:
Challenge Name

https://www.freecodecamp.com/challenges/sift-through-text-with-regular-expressions

Issue Description

Unable to edit the code at line that says //Change this Line

Clicking by mouse or using arrow keys on keyboard don't work, unless you go and edit some other line

and return to the line.

Issue is seen in Firefox and Chrome on mac and not on safari.

Browser Information

Browser Name, Version: Google Chrome, 49.0.2623.110 (64-bit), Mozilla Firefox 44.0.2.

Operating System: Mac OS X 10.11.3

Mobile, Desktop, or Tablet: Desktop

Your Code

No user code required.

Screenshot

I've uploaded a video of the issue to understand it more, as an image won't suffice here.

https://youtu.be/2ScYLKg3xpU

Issue 2:
In all the exercises, we the users are forced to press the enter key before writing any code.

Update:

We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.

The fix can be confirmed on the beta website.

The workaround currently on production website is:

Press the Enter key on the challenge editor and then proceed with the challenge.

Apologies for the inconvenience meanwhile.

Reach us in the chat room if you need any assistance.
Issue 1:
Environment

Windows build number: Version 10.0.18990.1
Windows Terminal version: 0.5.2762.0

Steps to reproduce

Open a couple more tabs than what fits in the window

Scroll the tab bar to see the new tabs

Expected behavior

Tabs should not be invisible.

Actual behavior

Some tabs are invisible, and one tab may be cut off. See the screenshot; the empty space between the last tab (which is cut off) and the "plus" button contains one invisible tab.

Resizing the window even a little makes the tabs appear.

Issue 2:
Environment

Windows build number: (powershell)

$psversiontable

Name Value

PSVersion 5.1.18362.145

PSEdition Desktop

PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}

BuildVersion 10.0.18362.145

CLRVersion 4.0.30319.42000

WSManStackVersion 3.0

PSRemotingProtocolVersion 2.3

SerializationVersion 1.1.0.1

Windows Terminal version (if applicable): Windows Terminal (Preview) 0.4.2382.0

Any other software?

No

Steps to reproduce

Open two tabs in the terminal.

In the first terminal, cd it into a path with a long name.

Expected behavior

Every tab name should be limited in a certain length or set adaptively. It should be easy to switch among tabs and easy to close.

Actual behavior

The tab name is too long but the terminal doesn't give it a length limit, and it strongly affects the function of following tabs.

There is no close button for the second tab.
Issue 1:
Challenge using-packagejson-the-core-of-any-nodejs-project-or-npm-package has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

The goal of the challenge is unclear :

You should precise that HyperDev has been renamed to Gomix

We don't have links to any boilerplates or any tutorial to start a project on Gomix

We don't know how to relate Gomix to the FCC challenges

It seems that all of the backend challenges feel the same.

Issue 2:
Not able to create Cloud9 account.

Its asking credit card details to create an account.
Issue 1:
In this code:

fn foo() {
match Some(x) {
Some(y) { fail!(); }
None { fail!(); }
}

fn bar() {
let mut i = 0;
while (i < 1000) {}
}

fn main() {}

foo is missing the close brace for the alt, but the resulting parse error message is very unhelpful:

src/test/compile-fail/bad.rs:12:13: 12:13 error: unexpected token: '<eof>'
src/test/compile-fail/bad.rs:12 fn main() {}
^

It would be much more helpful to report the error at the location where the un-closed brace was (in this case, after the alt in foo). I don't know how easy it would be to do with the current parser, though.

Issue 2:
fn x() { }
fn y() {
fn z() { }

Result:

a.rs:3:9:3:10: error: unexpected token: <eof>

Expected: something like of "missing } after function body which begins on line 2".
Issue 1:
In our research group we all have user accounts on a server where we each run our own experiments (Ubuntu behind the scenes). By default, everyone is downloading transformers models to their own home directory. Let's say we have 20 researchers, that might mean that we have 20 duplicates of "bert-base-cased" on the server (and of many other models). This is not efficient at all and takes too much room to our liking.

We have tried creating a 777 directory as TRANSFORMERS_CACHE globally, but that does not work. If I download a model, some of the downloaded files get a read/write access for me as the creator of the file. This means that others cannot use the model (permission denied).

Our suggestion or request would be to have an option when downloading a model to also set its permissions for all downloaded files. Preferably adjustable via a (system-wide) environment variable. This would probably need to be added in file_utils.py, similar to other options like "local_files_only".

I currently do not have time to work on this myself, but I am open to any feedback of course.

Issue 2:
EDIT: DataCollatorWithPadding already has the requested feature

🚀 Feature request

A DataCollatorWithPadding class that can pad attention_mask with any tokenizer class compatible with 🤗Transformers.

Motivation

It is common to have training examples with both input_ids and attention_mask. For batches of size larger than 1, you need to pad the examples to form congruent tensors. However, DataCollatorWithPadding pads input_ids but not attention_mask and there is apparently no way to instruct it to do so.

Your contribution

The method __call__ from DataCollatorWithPadding (code) is a wrapper for self.tokenizer.pad. For tokenizers of the class PreTrainedTokenizerBase, the pad method (code) has an argument return_attention_mask that cannot be forwarded from the __call__ method of DataCollatorWithPadding.

Perhaps an easy way to implement the issue without breaking everything is to add to DataCollatorWithPadding an attribute pad_attention_mask (maybe set to False for compatibility with the current code) and pass return_attention_mask=self.pad_attention_mask in the call to self.tokenizer.pad.

The current docstring of the pad method from PreTrainedTokenizerBase is quite confusing (see here). It refers to the return_outputs attribute, which is not defined anywhere and is not used anywhere in the code. It is perhaps an obsolete feature and I suppose that the issue arose when it was removed.

I could submit a PR, but I suppose that this is best brought to the attention of @sgugger. If not, sorry for bothering you Sylvain.
Issue 1:
Oleg Efimov opened SPR-6965 and commented

When trying to use Spring JDBC classes with Sybase through WebLogic JDBC driver, you get exception like "SQL Server is not one of the databases fully supported for procedure calls...".

Research shows that WebLogic driver returns "SQL Server" to "getDatabaseProductName" metadata call, unlike JConnect driver which returns "Sybase SQL Server". I also found corresponding issue CR120330 in documentation.

Affects: 2.5.6

Issue Links:

#10722 Cannot retrieve database metadata for Sybase ("duplicates")

Issue 2:
Chris Beams opened SPR-4200 and commented

The implementation of AbstractBeanFactory#containsBean() first checks to see if the bean is defined locally, and if not checks factory ancestry. The local check logic is identical to that implemented in #containsLocalBean(), and so can be eliminated and replaced with a call to that method.

Patch is attached and inline below. It's a very minor change, but does eliminate some duplicate code and help the user understand what's going on.

Index: ./src/org/springframework/beans/factory/support/AbstractBeanFactory.java

RCS file: /cvsroot/springframework/spring/src/org/springframework/beans/factory/support/AbstractBeanFactory.java,v

retrieving revision 1.194

diff -r1.194 AbstractBeanFactory.java

315,317c315,316

< String beanName = transformedBeanName(name);

< if (containsSingleton(beanName) || containsBeanDefinition(beanName)) {

< return (!BeanFactoryUtils.isFactoryDereference(name) || isFactoryBean(name));

—

if (containsLocalBean(name)) {

return true;

Affects: 2.5 final

Attachments:

patch.diff (607 bytes)
Issue 1:
The Waypoint: Add Rounded Corners with a Border Radius challenge http://freecodecamp.com/challenges/waypoint-add-rounded-corners-with-a-border-radius has an issue.

Screenshot 1 - on Google Chrome for Mac, Version 45.0.2454.85 (64-bit)

Screenshot 2 - Same browser as above

Action taken: I clicked inside the code editor

Note: Ad blocking, script blocking extensions were all disabled at that time. This issue has been found on Mozilla Firefox, Version 40.0.3

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

When this page is first loaded, it only shows code up to line 11. The rest of the code shows up when the blank space below line 11 is clicked, or when the code area is scrolled.
Issue 1:
Environment

Windows build number: 10.0.18363.476
PowerToys version: 0.13.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

After running PowerToys with FancyZones for a period of time, pressing number keys on the main keyboard (not Numpad).

Expected behavior

Numbers would appear on the field.

Actual behavior

1 would full screen, 2 would switch to first custom zone, 3 would switch to 3rd custom zone setting.

No number appear on the field.

Turning off FancyZones fixes this issue. However, turning it back on crashes the program.

Issue 2:
Summary of the new feature/enhancement

Hello :)

It would be very helpful if PowerToys Run could open urls/searches in the selected default browser.

Proposed technical implementation details (optional)

Via Regex or some similar technique the search bar could detect if the typed query qualifies as a web address and give you the option to open it in the default browser. One could also make it so that if there is no local result or for the query, a result appears that lets the user open the default browser with the given search. It could show up like a regular search result with an internet icon or the icon of the default browser instead of a file/program icon. This result could also always appear as either the first or last in the list.

If something like this is implemented one may also make it so that a specific user-given prefix like "wiki:" can hand over the given query to a specific web page's search similar to how it is possible in chrome to add custom search engines.
Issue 1:
This:

@decorator
class Classy{}

Transpiles into:

"use strict";

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

var Classy = function Classy() {
_classCallCheck(this, Classy);
};

Using .babelrc:

{
"presets": ["es2015"],
"plugins": ["transform-decorators"]
}

Issue 2:
I have two files

first app-size.srv.js

export class AppSizeService {
constructor() {
}
}

second app-size.dir.js:

import { AppSizeService } from 'app-size.srv';

if i use babel after concat in my gulpfile

gulp.task('scripts', () => { /* Scripts */
return gulp.src(paths.getScripts())
.pipe(plumber())
.pipe(concat('app.build.js'))
.pipe(babel())
.pipe(gulp.dest(paths.build))
.pipe(uglify())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(paths.build));
});

then i get error

Plumber found unhandled error:
TypeError in plugin 'gulp-babel'
Message:
D:/personal/alexander/projects/rt/client/src/app.build.js: Line 1: Duplicate declaration "AppSizeService"
> 1 | import { AppSizeService } from 'app-size.srv';

If i use babel before concat in my gulpfile then in the app.build.js file I have much duplicate code

"use strict";

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

var AppSizeService = require("app-size.srv").AppSizeService;
"use strict";

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

Object.defineProperty(exports, "__esModule", {
value: true
});

var AppSizeService = exports.AppSizeService = function AppSizeService() {
_classCallCheck(this, AppSizeService);
};

duplicate use strict

duplicate declaration of _classCallCheck and AppSizeService too

babel version: 4.7.16

gulp version: 3.8.11

gulp-babel version: 4.0.0

Maybe I do anything wrong?
Issue 1:
https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php#L536 - add duplicate slashesh and that not matching there:

https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php#L196

Bug is defined with SonataAdminBundle ACL.

Issue 2:
Sometimes i have problem: PDOException: Exception 'PDOException' with message 'SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block' in /../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php:546

I am using PostgreSql.