WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

vmware_guest

It's also possible this is the root issue for this one : #21161

ANSIBLE VERSION

ansible 2.4.0.0
config file = /Users/spollock/ansible/fs-vmw-control/ansible.cfg
configured module search path = [u'/Users/spollock/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Python/2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

Although I am setting a static mac address with vmware_guest, it only works if this mac address is not already used somewhere on the vCenter. I even try to override by setting "force: yes" and it behaves the same. There is no error message given.

STEPS TO REPRODUCE

Try to set the mac using vmware_guest when the mac address already exists, it will change to automatic and assign a random mac. If it does not exist, it works.

force = yes has no effect.

- name: Launching machine "{{vcpreptargetkit}}{{vcprepelement[1:3]}}-{{vcpreptemplate}}"
vmware_guest:
validate_certs: no
hostname: "{{ vcenterhostname }}"
username: "{{ vcusername }}"
password: "{{ vcpassword }}"
datacenter: "{{ vcdatacenter }}"
cluster: "{{ vccluster }}"
template: "source template"
name: "machine name"
networks:
-name: "some port group"
mac: "00:50:56:00:01:01"
state: poweredoff
force: yes
delegate_to: localhost

EXPECTED RESULTS

Should have set the mac regardless.

ACTUAL RESULTS

Doesn't set the mac

No error messages are generated.

Issue 2:
Hi, we are trying to make use of with_items with include but have found that variables are not being expanded inside the include. I have constructed a simple test case:

inventory

localhost

host_vars/localhost

---
test_items:
- name: test1
property: 1
- name: test2
property: 2

main.yml

---
- hosts: localhost
gather_facts: no
vars:
testing: $test_items
tasks:
- name: debug in main
debug: msg={{ item.name }}
with_items: ${testing}

- include: tasks/debug.yml item=$item
with_items: ${testing}

task/debug.yml

---
- name: debug in the task
debug: msg={{ item.name }}

running the playbook results in:

% ansible-playbook -i inventory -c local main.yml -v

PLAY [localhost] **************************************************************

TASK: [debug in main] *********************************************************
ok: [localhost] => (item={'property': 1, 'name': 'test1'}) => {"item": {"name": "test1", "property": 1}, "msg": "test1"}
ok: [localhost] => (item={'property': 2, 'name': 'test2'}) => {"item": {"name": "test2", "property": 2}, "msg": "test2"}

TASK: [debug in the task] *****************************************************
ok: [localhost] => (item=$test_items) => {"item": "$test_items", "msg": "{{item.name}}"}

PLAY RECAP ********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0

the debug in main expands the variable correctly but in the include it is just the literal string.
Issue 1:
💻

Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

`class Test {

foo() {

var self = this;

var checkWithUserPromise = new Promise(function (resolve) {

self.userInputComplete = resolve;

console.log('--------------');

document.getElementById('Dialog').open();

});

return checkWithUserPromise;

}

}`

Configuration file name

No response

Configuration

No response

Current and expected behavior

Transpiled code used to be

checkWithUserForItemOrgAssociation(){var a=this,b=new Promise(function(b){a.userInputComplete=b,console.log("--------------"),document.getElementById("Dialog").open()});return b}

since @babel/transform 7.17.10 it is transpiled to

checkWithUserForItemOrgAssociation(){var a=new Promise(function(a){this.userInputComplete=a,console.log("--------------"),document.getElementById("Dialog").open()});return a}

which is obviously wrong.

Environment

node v16.13.0

npm 8.1.0

@babel/core 7.17.10

babel-preset-minify: 0.5.1

Possible solution

I had to use npm-shrinkwrap.json to enforce older @babel/transform sub dependency of @babel/core

Additional context

No response

Issue 2:
💻

Would you like to work on a fix?

How are you using Babel?

@babel/cli

Input code

Reproduced in Babel REPL.

Configuration file name

No response

Configuration

No response

Current and expected behavior

Enabling babel-plugin-minify-dead-code-elimination plugin destroys this scope for arrow functions inside classes.

The var _this = this workaround should not be eliminated as it is absolutely necessary for the this scope to work in locally defined arrow functions.

Environment

Babel version v7.17.11

Possible solution

No response

Additional context

I narrowed the problem down locally to @babel/traverse v7.17.10. By reverting that package to v7.17.9 this problem does not occur.
Issue 1:
Describe what you were doing when the bug occurred:

Went to the profiler

Did reload and record

Stopped Recording

Went to Flamegraph

Started paging through commits.

At around the 5th commit, this error was thrown.

Please do not remove the text below this line

DevTools version: 4.7.0-23309eb38

Call stack: at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:164298)

at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163849)

at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:166664)

at Ul (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:342328)

at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:62450)

at tl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:71793)

at zl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:113765)

at Ic (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104502)

at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104430)

at Dc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104298)

Component stack: at Ul (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:342099)

at div

at div

at div

at Co (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:263571)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:366677

at n (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:276314)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:278724

at div

at div

at Xi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:325177)

at Ge (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:207026)

at sn (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:216342)

at Va (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:293773)

at us (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:371869)

Issue 2:
Describe what you were doing when the bug occurred:

I did profiling on a list, that gets updated on each pagination api call.

Once the profiling was done, I moved around in the Profiler to view the Flamegraph

Moving to second capture, the Profiler crashed.

DevTools version: 4.6.0-6cceaeb67

Component stack: in ec
in div
in div
in div
in So
in Unknown
in n
in Unknown
in div
in div
in rl
in Ze
in fn
in Ga
in _s
Issue 1:
TypeScript Version:

nightly (1.9.0-dev.20160430)

Code

var myMap = new Map();
myMap.set(0, "zero");
myMap.set(1, "one");
for (var [key, value] of myMap) {
alert(key + " = " + value);
}

Expected behavior:

Possibility to do a iteration over map.

Actual behavior:

The compiler raises the follow error: Type must have a '[Symbol.iterator]()' method that returns an iterator.

Issue 2:
The variable in a for-of loop contains undefined when the target is set to es6. For es5, everything works as expected.

TypeScript Version:

nightly (1.9.0-dev.20160428)

Code

for (const x of ["a", "b"]) {
x.substring;
}

tsconfig.json:

{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"strictNullChecks": true
}
}

Expected behavior:

Type of x is string in the loop body, no compile error.

Actual behavior:

Type of x is string | undefined, which gives an error.

@ahejlsberg
Issue 1:
struct A { a: Option<@mut A> }
fn main() {
let a = @mut A { a: None }; let mut v = Some(a); a.a <-> v;
io::println(fmt!("%?",a));
}

This causes the formatter to go into an infinite loop.

Nominating for maturity 3, since it's mostly likely a problem with the reflection api.

Issue 2:
Whenever %? is used on a data structure with cycles (such as servo's util::tree), it will traverse cycles and run out of stack. This could be fixed with some expensive but easy thing like keeping a list of already-traversed boxed things, and declining to traverse twice.
Issue 1:
The status quo, as I understand, is that the following is valid code:

"The quick red fox jumped over the lazy dog." |> length |> sqrt |> log

However, the following is not:

"The quick red fox jumped over the lazy dog." |> length |> hypot(9)

The way around this is using a stabby lambda, as in

"The quick red fox jumped over the lazy dog." |> length |> x -> hypot(x, 9)

This is on the whole workable, but a tad clumsy. I wonder if this could possibly be reframed to work a little more like magrittr, where the operator automatically feeds the result of the previous operation into the next one as its first argument. I appreciate there is a degree of sacrificing the theoretical purity of the operator here (as of course this would mean the correspondence between f |> g and f ○ g, but perhaps it would be a more convenient tool. Potentially, as a separate operator.

What do you think?

Issue 2:
Would it be possible to allow calling any function on Any so that the value is passed to the function as the first parameter and the parameters passed to the function call on the value is added afterwards?

ex.

sum(a::Int, b::Int) -> a + b

a = 1
sum(1, 2) # = 3
a.sum(2) # = 3 or
1.sum(2) # = 3

Is it possible to indicate in a deterministic way what a function will return in order to avoid run time exceptions?
Issue 1:
Code Sample, a copy-pastable example if possible

#coding=utf-8
from django.forms.models import model_to_dict
from django.db import connection
import os,sys
import time,datetime
from .models import RegistrationTable
import pandas as pd

def insert_db(data,SupplierPaymentDict,company_name,chinese_name):
return 0

Problem description

if i import pandas 0.19.2 into the programe ，only type

import pandas will make the error。

the error is ，if i use mod_wsgi4.4+apache2.4+django1.10.4 to run a website，i will got “127.0.0.1 is respording”，but if i use django‘runserver like “ python manage.py runserver "，it will work well。

but if i roll back to 0.18.0，all is ok

Output of pd.show_versions()

# Paste the output here pd.show_versions() here
>>> pandas.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.13.final.0

python-bits: 32

OS: Windows

OS-release: 7

machine: AMD64

processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.19.2

nose: 1.3.7

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.25.2

numpy: 1.12.0

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.2.0

tables: 3.2.2

numexpr: 2.6.1

matplotlib: 2.0.0

openpyxl: 2.4.1

xlrd: 1.0.0

xlwt: 1.2.0

xlsxwriter: 0.9.6

lxml: 3.7.2

bs4: 4.5.3

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: 1.1.5

pymysql: 0.7.9.None

psycopg2: None

jinja2: 2.9.4

boto: 2.45.0

pandas_datareader: None

Issue 2:
import pandas as pd
import numpy as np

data = np.random.randn(5, 100, 5)
panel = pd.Panel(data, items=list("AACDE"))

panel.iloc[0] # ValueError: Wrong number of dimensions

fr = panel.loc["E"]
fr.values.shape # (5, 100, 5) wrong

So this is another contrived example that I got from just running a battery of tests on random objects. Basically having a duplicate item key will bork the Panel.

I'm actually not sure whether Panel is meant to be a collection of uniquely identified DataFrames, or more like a generic 3d container that has convenient semantics for its axes. I think at one point it was the former, but as more things pull from generic it's becoming the later?
Issue 1:
A callback after change animations have ended.

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

Expected Behavior

Kind of onChangeEffectsEnd.

Current Behavior

onChange is fired right on click, before animations start.

Context

On tab click I redirect (link behavior). I want to redirect after animations end.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.30

React
16.2.0

browser
Chromium 63.0.3239.132

Issue 2:
The value supplied to a determinate circular progress component doesn't appear to manifest properly. The circles appear "overfilled" relative to the values provided.

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

Expected Behavior

I expect that when I pass a value of 20 to the circular progress component, the resulting circle would be 20% full. I expect that when the value passed is 50, the circle would be 1/2 full, and that it would have to be 100 to appear "completely" full.

Current Behavior

When I pass a value of 20 to the circular progress, it appears roughly 1/3 full. When I pass a value of 50, it appears about 3/4 full, and a value of 85 completely fills the circle.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/5305x6z9z4

Make a CircularProgress with a value of 20

Make a CircularProgress with a value of 50

Make a CircularProgress with a value of 85

Context

I am trying to show a series of "gauges" that show what percentage of a whole is represented.

Your Environment

Tech
Version

Material-UI
"^1.0.0-beta.33"

React
"^16.2.0"

browser
Chrome

etc
Issue 1:
The switch to the new installers seems to result in rustup.sh deleting the rustc. It downloads and installs rustc fine, then downloads cargo, but the installer for that first deletes rustc as legacy, and then installs cargo, meaning cargo works fine... but there's no compiler.

Snippet of output at the end of installing rustc/beginning of installing cargo.

...
install: installing /usr/local/share/man/man1/rustc.1
install: installing /usr/local/share/man/man1/rustdoc.1
install:
install: verifying installed binaries are executable

Rust is ready to roll.

rustup: Extracting cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
install: looking for install programs
install:
install: found mkdir
install: found printf
install: found cut
install: found grep
install: found uname
install: found tr
install: found sed
install:
install: processing ./rustup-tmp-install/cargo-nightly-x86_64-unknown-linux-gnu/install.sh args
install:
install: CFG_DESTDIR :=
install: CFG_PREFIX := /usr/local
install: CFG_LIBDIR := /usr/local/lib
install: CFG_MANDIR := /usr/local/share/man
install:
install: validating ./rustup-tmp-install/cargo-nightly-x86_64-unknown-linux-gnu/install.sh args
install:
install: verifying platform can run binaries
install: verifying destination is writable
install: verifying destination is not the same as source
install: removing legacy file /usr/local/bin/rust-lldb
install: removing legacy file /usr/local/bin/rustc
install: removing legacy file /usr/local/bin/rustdoc
install: removing legacy file /usr/local/lib/libarena-4e7c5e5c.so
install: removing legacy file /usr/local/lib/libflate-4e7c5e5c.so
install: removing legacy file /usr/local/lib/libfmt_macros-4e7c5e5c.so
...

cc @brson

Issue 2:
Spawned off of a note from PR #22532 on commit 1246d40

The following program:

#[repr(usize)]
enum Foo {
A = 0xffffffffffffffff_usize,
B,
C
}

fn main() {
println!("Hello World: {:x}", Foo::A as usize);
println!("Hello World: {:x}", Foo::B as usize);
println!("Hello World: {:x}", Foo::C as usize);
}

compiles and prints:

Hello World: ffffffffffffffff
Hello World: 0
Hello World: 1

My personal preference would be for a compiler error due to the implicit overflow, with a note saying that the programmer should explicitly assign some value to Foo::B. (And thus they can opt into the current behavior by assigning it B = 0,; then Foo::C would continue to be assigned 1 as today.)
Issue 1:
A bit random, but I just read some style guidelines of a larger python project which suggested to use

arr.shape = (100, 10)
# Instead of:
arr = arr.reshape(100, 10)

I very much dislike this use, because the ndarray container should be considered immutable IMO. It also is practically pretty useless, the only gain is that you implicetely add an assertion:

arr = arr.reshape(100, 10)
assert arr.base is not None

Assuming you don't actually want to have the side effect of changing the shape of the array at another place as well (which maybe is reasonable in very rare cases, but horrifies me a bit).

Anyway, reading that suggestion, I think it really is time that we add a copy=None kwarg, so that you can do arr = arr.reshape(100, 10, copy=False) (or copy=True) to be explicit about it without modifying the container.

The only reason that never happened, is because we already have Reshape and NewShape functions in the C-API. Frankly, thats annoying, but for all I care it would be a good start to just add it to the python API without changing the C level one.

Issue 2:
Inspired by my discussion with @charris in #9810, I would like to propose adding an optional copy argument to np.reshape() and ndarray.reshape().

Proposed semantics:

copy=None: copy only if necessary (default).

copy=True: always copy.

copy=False: never copy. Raise an error if the data cannot be reshaped without a copy.

This would allow users to ensure desired behavior for reshape and alleviate the primary use case for modifying ndarray.shape.
Issue 1:
Hello,

I came across this minor inconsistency in shape when using different optimization methods provided by the minimize interface to optimize 1D scalar functions:

In [1]: from scipy.optimize import minimize

In [2]: import numpy as np

In [3]: x = np.linspace(0, 10, 100)

In [4]: y = x + np.random.normal(size=len(x), scale=3)

In [5]: def affine_function(theta):
...: return x * theta

In [5]: chi_sqr = lambda theta: np.sum((affine_function(theta) - y) ** 2)

In [6]: result_nm = minimize(chi_sqr, x0=1, method='Nelder-Mead')

In [6]: result_nm.x
Out[6]: array([ 1.17421875])

In [7]: result_p = minimize(chi_sqr, x0=1, method='Powell')

In [7]: result_p.x
Out[7]: array(1.1742389466088772)

I would expect result_nm.x and result_p.x to be of the same shape.

PS: that divergence seems not exist when minimizing higher dimension scalar functions.

In [8]: import scipy; scipy.__version__
Out[8]: '0.19.1'

In [9]: import numpy; numpy.__version__
Out[9]: '1.13.1'

Cheers,

Zé

Issue 2:
For 1D problems some optimizers return the result as a scalar (Powell, COBYLA), some

as a list with one element.

There are other optimizers that need the Jacobian, I did not check them.

from scipy.optimize import minimize, rosen

o = ['Nelder-Mead', 'Powell', 'CG', 'BFGS', 'L-BFGS-B',
'TNC', 'COBYLA', 'SLSQP']

for k in o:

x0 = [1.3] #, 0.7, 0.8, 1.9, 1.2]
res = minimize(rosen, x0, method=k, tol=1e-6)

print(k, res.x)

print()

for k in o:

x0 = 1.3 #, 0.7, 0.8, 1.9, 1.2]
res = minimize(rosen, x0, method=k, tol=1e-6)

print(k, res.x)

print()

for k in o:

x0 = [1.3, 0.7]
res = minimize(rosen, x0, method=k, tol=1e-6)

print(k, res.x)
Issue 1:
As of change #2356, the following code gives the correct result in the batch compiler:

declare function f<T>(x: T, y: (p: T) => T, z: (p: T) => T): T;
f(0, x => null, x => x.blahblah);

Namely, we infer T to be number, and we get an error on blahblah.

However, there are a few things still wrong:

The language service does not show the correct result. It shows both x's to be number, but if you hover on f, you will see that it was instantiated to any, instead of number.

If you add another overload, the wrong type argument gets inferred:

declare function f<T>(x: T, y: (p: T) => T, z: (p: T) => T): T;
declare function f();
f(0, x => null, x => x.blahblah);

Now suddenly blahblah is not an error, and the second x is any.

In theory, if this overload is not assignable, but it has already fixed the type parameter T, and another overload comes along with a type parameter in the same position, that second type parameter will not get fixed. I don't have a good repro for this, but it is certainly a possibility in theory.

All of these issues happen because when a function expression parameter causes a type parameter to get fixed, it only does so if it is affected by the type of that type parameter. I believe the right thing here is that if a function parameter aligns with the type parameter, it should still fix it, even if it has already been assigned a type in the past. That way, it will fix the type parameter no matter which signature is being visited, or whether this signature has been visited before.

I consider this bug a followup to bugs #2127 and #2182.

Issue 2:
As of change #2356, the following code gives the correct result in the batch compiler:

declare function f<T>(x: T, y: (p: T) => T, z: (p: T) => T): T;
f(0, x => null, x => x.blahblah);

Namely, we infer T to be number, and we get an error on blahblah.

However, there are a few things still wrong:

The language service does not show the correct result. It shows both x's to be number, but if you hover on f, you will see that it was instantiated to any, instead of number.

If you add another overload, the wrong type argument gets inferred:

declare function f<T>(x: T, y: (p: T) => T, z: (p: T) => T): T;
declare function f();
f(0, x => null, x => x.blahblah);

Now suddenly blahblah is not an error, and the second x is any.

In theory, if this overload is not assignable, but it has already fixed the type parameter T, and another overload comes along with a type parameter in the same position, that second type parameter will not get fixed. I don't have a good repro for this, but it is certainly a possibility in theory.

All of these issues happen because when a function expression parameter causes a type parameter to get fixed, it only does so if it is affected by the type of that type parameter. I believe the right thing here is that even if a function parameter does not align with the type parameter, it should still fix it. That way, it will fix the type parameter no matter which signature is being visited, or whether this signature has been visited before.

I consider this bug a followup to bugs #2127 and #2182.