WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1477 on 2010-05-05 by trac user egonschiele, assigned to @pv.

This might be just a question of precision. In the following code, A2 is a singular matrix. NumPy calculates it's inverse and prints out a non-zero determinant even though the matrix A2 is clearly singular:

A = array([[.1,.01,.3],[.2,.99,.3],[.7,0,.4]])

I = identity(3)

A2 = A - I # this should be singular

print inv(A2) # prints out a singular matrix(!!)

print det(A2) # prints -2.33146835171e-18 instead of 0

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/777 on 2008-05-07 by trac user nick, assigned to unknown.

When resize is called on a 2d array, if the value of the "column resize" is greater than the current column size, a wrapping of the values occurs. I noticed this while trying to resize a diagonal matrix. Example:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import *
>>> from numpy.lib import twodim_base
>>> a = [1,2,3,4]
>>> a_diag = twodim_base.diag(a)
>>> print a_diag
[[1 0 0 0]
[0 2 0 0]
[0 0 3 0]
[0 0 0 4]]
>>> a_diag.resize((5,4))
>>> print a_diag
[[1 0 0 0]
[0 2 0 0]
[0 0 3 0]
[0 0 0 4]
[0 0 0 0]]
>>> a = [1,2,3,4]
>>> a_diag = twodim_base.diag(a)
>>> a_diag.resize((4,5))
>>> print a_diag
[[1 0 0 0 0]
[2 0 0 0 0]
[3 0 0 0 0]
[4 0 0 0 0]]
>>>

The documentation led me to believe that a column of 0's would be added (much like how a row of 0's was added when the number of rows was increased).

Nick Loadholtes - nick@ironboundsoftware.com
Issue 1:
Challenge Name

Target the Children of an Element Using jQuery

https://www.freecodecamp.com/challenges/target-the-children-of-an-element-using-jquery

and next challenge.

Issue Description

Look at duplicating "#target5" on left-well when refresh page or run tests (ctrl+enter). But when typing code in middle area - everything is good.

Browser Information

Browser Name, Version: Google Chrome 54.0.2840.99

Operating System: Windows 7

Mobile, Desktop, or Tablet: Desktop

Your Code

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");

});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Screenshot

Issue 2:
This is a duplicate of a ticket I opened here #2969
Issue 1:
Challenge http://www.freecodecamp.com/challenges/bonfire-mutations

I haven't actually managed to write a correct solution yet, but my last attempt passed even though I know it doesn't work. My solution:

function mutation(arr) {

var match = true;
var string = arr[0].toLowerCase();
var toCheck = arr[1].toLowerCase();

for(i=0; i<toCheck.length; i++) {
var matched = string.indexOf(toCheck[i]);
if (matched == -1) {
match = false;
} else {
match = true;
}
}
arr = match;
return(arr);

}

A test that could be added that will cause this to fail:

expect(mutation(['floor', 'xfor'])).to.be.false;

Issue 2:
Coding Bug.docx

Hi! After completing a few challenges, I think I encountered a bug. I followed the instructions on changing text color, and the text turned red, so I think I wrote this correctly. But the system won't send me to the next challenge, claiming I didn't do this right. See code input and the system response below. Can someone from CodeCamp admin fix this so I can continue funfun coding? Thanks!

My Code:

CatPhotoApp

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Response:

Your h2 element should be red.
Issue 1:
I'm doing some customization work on an OpenCart site and I noticed that the syntax highlighting in admin/model/catalog/product.php is all messed up.

Somewhere around the subtract field, Atom's highlighter gets stuck in "string" mode. This continues to line 137, where the code turns a uniform gray, and then it returns to normal on line 139.

Komodo Edit parses the same file correctly:

Atom 0.105.0, OS X 10.9.3.

Issue 2:
Consider a series of quoted strings in an array in ruby:

states = ['AL', 'AK', 'AZ', 'AR', 'CO', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'RI', 'SC', 'SD', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY']

In atom, if this list stopped at MI syntax highlighting would resume as normal. However, it acts as if the rest of the file has a single quote at the top:

I'm using the Tomorrow theme but it shows up in others as well. This also happens in python, but the quote limit is one less and only the rest of the line is unquoted. Same with C, although again the quote limit changes. Very odd.
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

The npm module

ANSIBLE VERSION

ansible 2.2.2.0
config file = /home/drybjed/src/projects/devel/ansible.cfg
configured module search path = ['/home/drybjed/src/projects/devel/ansible/library', '/home/drybjed/src/projects/devel/debops-playbooks/playbooks/library', '/usr/share/ansible/library']

CONFIGURATION

Default configuration

OS / ENVIRONMENT

Debian, Ubuntu

SUMMARY

The invocation of the npm module always results in the changed=True status when the production=True option is enabled.

STEPS TO REPRODUCE

ansible localhost --become -m npm -a 'name=forever state=present global=True production=True'

EXPECTED RESULTS

The requested module has been installed and hasn't been changed.

ACTUAL RESULTS

The module reports the changed status on each invocation.

localhost | SUCCESS => {
"changed": true,
"invocation": {
"module_args": {
"executable": null,
"global": true,
"ignore_scripts": false,
"name": "forever",
"path": null,
"production": true,
"registry": null,
"state": "present",
"version": null
},
"module_name": "npm"
}
}

Issue 2:
Similar to this issue: #1616

When a task is skipped, it should not update the registered variable, e.g

- hosts: all
user: ubuntu
sudo: True
vars:
var1: True
tasks:
- name: one
command: /bin/echo one
when: var1
register: var2

- name: two
command: /bin/echo two
when: not var1
register: var2

- name: three
command: /bin/echo three
when: var2.changed

I expect task three should not be skipped.

If I change task two to register other variable then task three will not be skipped - but as it is skipped, it should not affect the running state.
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/13759/

Failed: [k8s.io] V1Job should fail a job {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:129
Aug 21 01:49:31.029: Couldn't delete ns "e2e-tests-v1job-nxzhu": namespace e2e-tests-v1job-nxzhu was not deleted within limit: timed out waiting for the condition, pods remaining: []
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:270

Previous issues for this test: #27704 #30127 #30602

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce/21728/

Failed: [k8s.io] V1Job should scale a job up {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:127
Aug 16 08:11:16.645: Couldn't delete ns "e2e-tests-v1job-gmj3l": namespace e2e-tests-v1job-gmj3l was not deleted within limit: timed out waiting for the condition, pods remaining: []
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:265

Previous issues for this test: #29976 #30464
Issue 1:
https://twisted.readthedocs.io/en/latest/core/howto/defer-intro.html#inline-callbacks-using-yield says "On Python 3, instead of writing returnValue(json.loads(responseBody)) you can instead write return json.loads(responseBody). This can be a significant readability advantage, but unfortunately if you need compatibility with Python 2, this isn’t an option.".

Issue 2:
Reported by @dangra

This issue manifests when mixing old paths and new ones for extensions and middlewares (this can happen for example while using a newer version of Scrapy in a project that hasn't updated to the new paths yet). Since paths aren't normalized, the same component can be loaded twice.

Take these settings for example:

# scrapy/settings/default_settings.py
EXTENSIONS_BASE = {
'scrapy.extensions.debug.StackTraceDump': 100, # new path
}

# myproject/settings.py
EXTENSIONS = {
'scrapy.contrib.debug.StackTraceDump': 200, # old path
}

While merging both dictionaries to build the list of components, the same StackTraceDump class is going to be loaded twice since it appears in two different keys.
Issue 1:
Summary

The theme chooser does not appear to work on my system. I cannot select a theme.

Setup

Ubuntu 15.04 with atom 1.0.0 amd64 freshly installed from .deb package.

Observed behaviour

Themes show up in the list of Core Themes and Installed Themes. However, when I click the drop-down selectors for UI Theme and Syntax Theme, they only show an empty white box, with 'One Dark' remaining selected.

Expected behaviour

I would have expected the names of installed themes to appear in the drop-down box so that I could select another theme.

Notes

Not sure if this is relevant or a separate bug, but searching for themes using the 'filter themes by name' box does not return any themes.

Issue 2:
I see that HiDPI support appears to mostly work in Atom, but with org.gnome.desktop.interface set to 2, atom launches with menu items of a crazy size:

Launching atom with --force-device-scale-factor=1 appears to have no effect.

$ atom --version
0.174.0-2f76597

This was built from source on Gentoo Linux manually, because there's no ebuild available :-(
Issue 1:
Describe the workflow you want to enable

It is not a new algorithm, I was just frustrated running Grid and Random SearchCV for hours without knowing when it ends. It should be easy to add a print statement to inform the user about the process. It could be a percentage (let's say 80% done), or just to inform which parameters have been used in each iteration, so the user knows it is working.

Describe your proposed solution

Either print parameters in each iteration

or

calculate how many iteration there are, and print the percentage done so far.

Describe alternatives you've considered, if relevant

No response

Additional context

No response

Issue 2:
By default writing to a logger would not go to STDOUT without a handler. One solution to this is to attach a handler when verbose is an integer and use the logger if it is passed in.

# Do not log
func(verbose=0)

# will create a stream handler to stdout
func(verbose=1)

# will write to the logger passed in
func(verbose=logger)
Issue 1:
python -m transformers.onnx --model=facebook/bart-large /home/sysadmin/downlaod/onnx_models/bart-large

Pytorch version: 1.9.0

transformers version: 4.9.1

platform: centos 7

python version: 3.7

The original bart model is aroud 2GB, But the transferred bart-large model is more than 3gb. This could because some shared weights are are duplicated in the onnx model

Issue 2:
System Info

transformers version: 4.25.1

Platform: Linux-5.10.147+-x86_64-with-glibc2.29

Python version: 3.8.10

Huggingface_hub version: 0.11.1

PyTorch version (GPU?): 1.13.1+cu116 (True)

Tensorflow version (GPU?): 2.9.2 (True)

Flax version (CPU?/GPU?/TPU?): not installed (NA)

Jax version: not installed

JaxLib version: not installed

Using GPU in script?: yes

Using distributed or parallel set-up in script?: no

Who can help?

@stas00 @ArthurZucker @sgugger

Information

The official example scripts

My own modified scripts

Tasks

An officially supported task in the examples folder (such as GLUE/SQuAD, ...)

My own task or dataset (give details below)

Reproduction

I am just trying to fine-tune "EleutherAI/gpt-neo-1.3B" for casuallm on google colab. Without anything, it gives out of memory error. I was checking what can I do and I found deepspeed. I added deepspeed='ds_config.json', to my training arguments in jupyter notebook and used configuration from the official page which is "ds_config_zero2.json".

Expected behavior

start training.
Issue 1:
I use electron 1.7.9 with node 7.9.0 on a raspberry pi

input list does get the actual value from the datalist.

I have a input element with a datalist in my electron application and it works just fine if i run my .html file in Chrome. If I start the electron app with "electron ." the input element is not working. My datalist is displayed but if i choose one its set in my input list as suggested but if I do a alert of the input-element I just get what I typed in and not the actual element what is in the datalist. At this point I can not figure out how to fix that or is there any possible solution? Another problem is that if I run my application locally with "./node_modules/.bin/electron ." the datalist elements don´t even show up.

Maybe anyone can help me out if there is a solution for this or a way how I can solve this.

Regards Michael

Issue 2:
Electron version: 1.7.3 beta

Operating system: Windows 7 x86_64 Professional

Clicking the pyramid icon on an input control associated with a data list and picking a value from the list, then evaluating value property of the input control, the value is expected to match the text chosen from the data list, which the input control is now showing.

Instead, the text returned by value property is an empty string, or at least the string that was manually typed into the input control prior.

Only manual editing of value of the input control, as you would with an ordinary text input without a n associated datalist, causes the value property to yield the same text that the input control is showing.

Using following markup to reproduce by loading up default Electron distribution and typing document.location = ...; /* path to file containing below text */ in Developer Tools console:

<!DOCTYPE html>
<html>
<body>
<input list="foobar">
<datalist id="foobar">
<option value="apple">
<option value="orange">
<option value="banana">
</datalist>
</body>
</html>
Issue 1:
Environment

Microsoft Windows [Version 10.0.18362.30]

Steps to reproduce

Just type any command that will fill your terminal window.

eg. C:\Users\Microsoft>dir

Expected behavior

I should be able to scroll to top of the page to see previous results using mouse/touch pad.

Actual behavior

I am not able to scroll to the top in the new Windows Terminal but I am able to scroll in the old command prompt.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18898.1000]

Windows Terminal version (if applicable): pulled and built today (WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe)

Steps to reproduce

Not entirely sure if this is intended behaviour or an issue to other users but I am not able to scroll through the new terminal with my touchpad on my Notebook (Alienware).

It works with my mouse but not with the touchpad. I can scroll through the native console/ poweshell though. Can somebody reproduce this?

Expected behavior

That I can scroll through the curren window-history using two-finger-touch on the touchpad.

Actual behavior

It wont scroll.
Issue 1:
Opening an issue to discuss this: should we think about moving the functionality to read online data sources to a separate package?

This was mentioned recently here #8842 (comment) and #8631 (comment)

Some reasons why we would want to move it:

This often needs much more urgent releases than pandas to fix changes in the remote sources. So with separate release cycle, this can speed up propagation of bugfixes to users

More general: to limit the scope of pandas as the core project, and to encourage that some people take ownership of this subproject (which is easier as a separate project?), publicize it separately, ..

Some questions that come to mind:

What should we move? (everything in remote_data.rst?)

Everything in io.data? (the DataReader function for Yahoo and Google Finance, FRED and Fama/French, and the Options class

Also io.wb (certain World Bank data) and io.ga (google analytics interface)?

Should we move it all to one separate project, or to multiple?

Are there outside of pandas already some packages like this? (possibilities to merge with that/collaborate/..)

Who would be interested to take this up? To be a maintainer of such a package?

Pinging some of the people have worked on these subpackages (certainly add others if you know):

@dstephens99 @MichaelWS @kdiether @cpcloud @vincentarelbundock @jnmclarty

@jreback @immerrr @TomAugspurger @hayd @jtratner

Issue 2:
Currently Series has a name member, which is useful for retaining the name of the sliced index/column when the Series is produced by slicing a DataFrame.

It would be useful for DataFrame similarly to have a name member, so that when a DataFrame is produced by slicing a Panel, the name of the sliced index is retained.

And while you're at it, may as well add name to Panel and even Panel4D...
Issue 1:
Bug Report

Current Behavior

When setting a value to an object using a dynamic + numeric key

The key is converted to a string (expected)

When I then use destructuring to receive the value it works using the numeric key

When I also take the ...rest of the object

Then I expect the rest not to contain the previously destructured key

BUT the key is still present in the rest

Input Code

REPL link (See console)

const key = 2;
const state = { [key]: 'foo', bar: 'baz' };
const { [key]: pluck, ...rest } = state;
const { [String(key)]: pluck2, ...rest2 } = state;
console.assert(
typeof Object.keys(state)[0] === 'string',
`Expected ${Object.keys(state)[0]} to be a string`
)
console.assert(
pluck === pluck2,
`Expected ${pluck} to be ${pluck2}`
)
// This fails:
console.assert(
Object.keys(rest).length === Object.keys(rest2).length,
`Expected ${JSON.stringify(rest)} to equal ${JSON.stringify(rest2)}`
)

Expected behavior/code

The destructured key should not be contained in rest even if a numeric key is used for destructuring

The assertions in above code should not throw when code is transpiled with babel and evaluated

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

{
"presets": ["preset-stage-3"]
}

Environment

Babel version(s): v6.26.0 (REPL), v7.2.2 (my machine)

Node/npm version: Node 11.4.0/npm 6.4.1

OS: MacOS 10.14.1

Monorepo: 🤷‍♂️

How you are using Babel: loader

Additional context/Screenshots

Works as expected in Chrome + Firefox Console

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

bug

Input Code

const a = { 1: 0, 2: 1, 3: 2 }
const i = 1
const { [i]: val, ...rest } = a

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

{
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}

Expected Behavior

rest should be

{
"2": 1,
"3": 2,
}

Current Behavior

rest is

{
"1": 0,
"2": 1,
"3": 2,
}

Possible Solution

indexOf compares with 3 equals and the object key is represented as string

babel/packages/babel-helpers/src/helpers.js

Line 469
in
88b7983

if (excluded.indexOf(key) >= 0) continue;

Context

running react-native application

Your Environment

using react native with expo

{
"expo": {
"sdkVersion": "21.0.0"
}
}

dont know about configuration
Issue 1:
I'm using IncrementalPCA.partial_fit within a loop over a large array that I read in from a file sequentially to avoid memory limitations. After 5 iterations, I'm getting an explained variance ratio of just the first component of 31.8... Each iteration of partial_fit uses 500 samples with 840 features. IncrementalPCA is initialized to keep 100 components.

code snippet:

Xarray = np.genfromtxt(f, skip_header=start_row, max_rows=increment, delimiter=',')
print "Xarray shape: {}".format(Xarray.shape)

while (Xarray is not None):

ipca.partial_fit(Xarray)
print "PCA after {} samples seen".format(ipca.n_samples_seen_)
print ipca.explained_variance_ratio_
start_row += increment
print "start_row: {}".format(start_row)
Xarray = np.genfromtxt(f, skip_header=start_row, max_rows=increment, delimiter=',')
print "Xarray shape: {}".format(Xarray.shape)

output snippet:

PCA after 2500 samples seen

[ 3.18056975e+01 4.98029267e-01 4.43883664e-01 4.08451255e-01

3.89128549e-01 3.77518999e-01 3.56542640e-01 3.33262109e-01

3.14950109e-01 2.98874660e-01 2.85867538e-01 2.81010422e-01

2.72842557e-01 2.63025294e-01 2.54989075e-01 2.50687686e-01

2.48726216e-01 2.35796452e-01 2.30737988e-01 2.21640908e-01

2.13462023e-01 2.01752219e-01 1.95959838e-01 1.95708886e-01

1.87027547e-01 1.82996412e-01 1.79610949e-01 1.74964506e-01

1.60011439e-01 1.49475301e-01 1.40894784e-01 1.35475019e-01

1.25310298e-01 1.22854195e-01 1.13804103e-01 1.13238117e-01

1.11017593e-01 1.07160756e-01 1.03961022e-01 9.42830621e-02

8.58979109e-02 7.65082305e-02 6.75815877e-02 6.48157108e-02

5.79329461e-02 5.49496091e-02 3.76775268e-02 2.08521555e-02

1.96837250e-02 1.37371817e-02 7.19341856e-03 6.08796477e-03

5.17738195e-03 4.85022397e-03 4.57451540e-03 3.69717201e-03

3.61169834e-03 2.89407860e-03 2.09412930e-03 1.62549028e-03

1.49595829e-03 1.30557971e-03 1.03945572e-03 9.26718009e-04

8.26675398e-04 7.57518243e-04 7.17753386e-04 5.67656331e-04

5.41295550e-04 4.92545563e-04 4.78711593e-04 4.42107099e-04

3.65606069e-04 3.57073238e-04 2.96661647e-04 2.73361497e-04

2.66919822e-04 2.45986959e-04 2.41616313e-04 2.34303943e-04

2.25211473e-04 2.15443298e-04 2.10465870e-04 2.05961013e-04

1.95109203e-04 1.85263196e-04 1.73445133e-04 1.69027180e-04

1.56755129e-04 1.52948248e-04 1.51477907e-04 1.48012761e-04

1.42888295e-04 1.40980522e-04 1.24088002e-04 1.14768643e-04

4.43898504e-05 2.33152703e-05 2.06950098e-05 1.62836044e-05]

start_row: 2500

Xarray shape: (500, 840)

Issue 2:
FastICA uses print to tell a user about that the number of components is larger than the number of available features (https://github.com/scikit-learn/scikit-learn/blob/51a765a/sklearn/decomposition/fastica_.py#L296). This makes it unnecessarily hard to catch the output and redirect it to a logger.

I propose to use warnings.warn, as in kernel approximation or qda.