WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Using {% raw %} in templates does not stop jinja2 variable substitution

ansible 1.4 -devel 4f13967

[playbook.yml]

---
- name: "test raw template output"
hosts: localhost

vars:
myvar: "foo"

tasks:
- local_action: template src="mytemplate.j2" dest="/tmp/myoutput.txt"

[mytemplate.j2]

Test: Preserve curly braces, and NOT perform variable substitution:

First Attempt:
{% raw %}
- { include: "{{ myvar }}" }
{% endraw %}

[/tmp/myoutput.txt]

Test: Preserve curly braces, and NOT perform variable substitution:

First Attempt:

- { include: "foo" }

NOTE: template output performs variable substitution even inside the {% raw %} block.

REFERENCE: Workaround suggested by Brian Coa https://groups.google.com/forum/#!topic/ansible-project/Bn1ZFu5Pfb0

Issue 2:
I have a variable hbase_standalone that's set to false in defaults but for my current host it's true. And here's how my dependencies look like:

dependencies:
- { role: hadoop, when: not hbase_standalone }
- { role: oracle-jdk }

So hadoop role is not included, that's fine, but oracle-jdk is also ignored! Works fine if I change the order though:

dependencies:
- { role: oracle-jdk }
- { role: hadoop, when: not hbase_standalone }

Mac OS, ansible 1.8.1.
Issue 1:
Version

2.5.22

Reproduction link

https://codesandbox.io/embed/vue-template-b6c06?fontsize=14&hidenavigation=1&theme=dark

Steps to reproduce

When the initial value of a is equal to true and b is equal to false, the child component was created twice.

When the initial value of a is equal to false and b is equal to true, the child component was created once.

When the initial value of a and b are same, the child component was created twice.

What is expected?

The child component is created the same number of times in different cases

What is actually happening?

The child component is created the different number of times in different cases

Issue 2:
Version

2.6.10

Reproduction link

https://codesandbox.io/s/vue-template-wn53r

Steps to reproduce

Just see the code and the console info.

What is expected?

Child component mounted once.

What is actually happening?

Child component mounted twice.
Issue 1:
pandas/pandas/plotting/_core.py

Lines 2649 to 2666
in
3a7f956

def bar(self, x=None, y=None, **kwds):

"""

Vertical bar plot

.. versionadded:: 0.17.0

Parameters

----------

x, y : label or position, optional

Coordinates for each point.

**kwds : optional

Keyword arguments to pass on to :py:meth:`pandas.DataFrame.plot`.

Returns

-------

axes : matplotlib.AxesSubplot or np.array of them

"""

return self(kind='bar', x=x, y=y, **kwds)

import pandas as pd
import numpy as np
import matplotlib
get_ipython().magic(u'pylab inline')

# In[17]:
df = pd.DataFrame({'id': range(1,11), 'normcolor': np.random.rand(10), 'count': np.random.randint(0,100,(10))})

# In[21]:
colors = matplotlib.cm.hsv(df['normcolor'])
df.plot.bar('id','count', color=colors) # return plot with not color variation

# In[22]:
plt.bar(df['id'], df['count'], color=colors) # returns plot as expected

Current Output

Correct Output

Issue 2:
Code Sample, a copy-pastable example if possible

>>> df = pd.DataFrame({"A": range(4), "color": ['red', 'blue', 'blue', 'red']})
>>> ax = df.plot.bar(y='A', color=df['color'])
>>> [p.get_facecolor() for p in ax.patches]
[(1.0, 0.0, 0.0, 1.0),
(1.0, 0.0, 0.0, 1.0),
(1.0, 0.0, 0.0, 1.0),
(1.0, 0.0, 0.0, 1.0)]

Problem description

It plots correctly but it does not pick the right color per bar. it only pick the color of the first value in the list.

it was working perfectly in pandas 0.19.2

Expected Output

the plot should contain a different color as the list is being passed. Similar to matplotlib behavior and the old pandas version

Output of pd.show_versions()

pandas: 0.20.2

pytest: None

pip: 9.0.1

setuptools: 36.0.1

Cython: None

numpy: 1.12.1

scipy: 0.19.1

xarray: None

IPython: 5.4.1

sphinx: None

patsy: None

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: 2.0.2

openpyxl: None

xlrd: 1.0.0

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: 0.9999999

sqlalchemy: None

pymysql: None

psycopg2: 2.7.1 (dt dec pq3 ext lo64)

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None
Issue 1:
Bug report

Webpack v4.12 is not respecting setting the mode via config file.

What is the current behavior?

If I set the mode with module.exports in the webpack.config.js, I receive the configuration warning that the mode is not set.

If the current behavior is a bug, please provide the steps to reproduce.

If I make a webpack.config.js in the root with this configuration:

module.exports = {
mode: 'none'
};

And I run npm run webpack via the webpack in scripts in my package.json:

"scripts": {
"webpack": "webpack",
}

But I receive the configuration warning that the mode is not set.

configuration
0:0 warning The 'mode' option has not been set, webpack will fallback to
'production' for this value. Set 'mode' option to 'development' or
'production' to enable defaults for each environment.

What is the expected behavior?

Same exact config sets the mode just fine in v4.8 with no configuration warning.... but not in v4.12. The webpack documentation does not outline any sort of changes with this process https://webpack.js.org/concepts/mode/#mode-none -- so I'm guessing this is a bug.

Other relevant information:

webpack version: v4.12

Node.js version: v9.9

Operating System: macOS

Additional tools: VS Code

Issue 2:
Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?

When i load the files from scss in webpack.dev the filepath is good:

background: url('../imgs/photo.jpg');

But after build filepath is:

background: url('assets/imgs/photo.jpg');

I don't know why it changes ../ with assets.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

after npm run build the url image from css should be same as in scss file

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Node.js version: v10.16.0,

Webpack version: 4.36.1,

OS: Windows 10

Main Config:

Development Config:

Build / Production Config:

And this is my folder structure for development files:

And end build files:

As you can see from style.scss, the filepath: ../imgs/photo,jpg works perfectly.

But from the dist folder it changes to assets/imgs/photo.jpg.

And after i tried with resolve-url-loader it gives me this error after build:

config with resolve-url-loader:
Issue 1:
Migrated issue, originally created by jek (@jek)

[08:31](08:31) <Crys_> SA emits "like 'str%'" for startswith. However FB doesn't use an index for LIKE 'str%'
[08:32](08:32) <Crys_> I'd like to replace the op with Firebird's "STARTING WITH" statement.

Issue 2:
Migrated issue, originally created by Michael Bayer (@zzzeek)
Issue 1:
Hello everybody.

I must be crazy to keep on trying to run cutting-edge open-source software on my old (but quite stable...) XP laptop !

Version : julia-0.3.0-prerelease-8f1fbec-win32

"C:\Julia 0.3.0-prerelease\bin>julia" just crashes without a sigh ...

Here is the console outputs in test mode :

C:\Julia 0.3.0-prerelease\bin>test-julia.bat

fatal error during bootstrap:

(arg-error "table: arguments must come in pairs")

fatal error loading system image

You are doing a really great work !

Best regards, Stan.

Issue 2:
@Distributed.everywhere fails if you import Distributed

it works only if using Distributed
Issue 1:
Similar to react-router's Link, it would be nice to be able to customize CSS when a link is active, e.g with an activeClassName property.

Issue 2:
Im trying to integrate elastic APM (https://www.elastic.co/solutions/apm).

When I import elastic-apm-node (https://github.com/elastic/apm-agent-nodejs) package inside my pages/index.js it throws following error.

These dependencies were not found:
* async_hooks in ./node_modules/elastic-apm-node/lib/instrumentation/async-hooks.js
* child_process in ./node_modules/elastic-apm-node/lib/instrumentation/patch-async.js
* dns in ./node_modules/elastic-apm-node/lib/instrumentation/patch-async.js
* module in ./node_modules/require-in-the-middle/index.js
* net in ./node_modules/elastic-apm-node/lib/instrumentation/patch-async.js

When I import elastic-apm-js-base (https://github.com/elastic/apm-agent-js-base) It works but it tracks only on the browser and doesn't track anything running on serverside.

Example Code : https://github.com/sagartalla/elastic-apm-nextjs

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

Your Environment

Tech
Version

next
6.0.1

node
10.1.0
Issue 1:
I am using BÉPO keyboard layout and I am not able to produce a "" in the atom-text-editor. However it works fine in setting menu and in the command prompt (ctrl+shift+p menu), and everything word fine if I switch to a QWERTY or AZERTY layout.

Repro case: With standard windows BÉPO driver, inside a text editor tab, press AltGr+à (which is AtlGr+w in QWERTY, or to be precise 0xE011+0x1A from a scan code point of view) and observe it does not produce a backslash.

It may be similar to #1625

Issue 2:
Original issue: atom/atom#1625

Use https://atom.io/packages/keyboard-localization until this issue gets fixed (should be in the Blink upstream).
Issue 1:
It was accident i encounter this issue.

if i have a typescript file as follows

module myMoudle {

interface iTest {

t2:iTest;
x3:number;

}

class test implements iTest {

t2: iTest;

x3: number;

constructor(){

this.t2 = new test();

this.x3 = 1;

}

}

}

/*

*/

Correpsonding Javascript file contains JS + TS code and it is not commenting the typescript code properly. comment like /* /* instead of /* */. It does not matter if the comment has any thing inside or not. Test it from this link

http://www.typescriptlang.org/Playground#src=module%20myMoudle%20%7B%0D%0Ainterface%20iTest%20%7B%0D%0A%09%0D%0A%09t2%3AiTest%3B%0D%0A%09x3%3Anumber%3B%0D%0A%7D%0D%0A%0D%0Aclass%20test%20implements%20iTest%20%7B%0D%0A%09t2%3A%20iTest%3B%0D%0A%09x3%3A%20number%3B%0D%0A%09constructor()%7B%0D%0A%09%09this.t2%20%3D%20new%20test()%3B%0D%0A%09%09this.x3%20%3D%201%3B%0D%0A%09%7D%0D%0A%7D%0D%0A%0D%0A%7D%0D%0A%2F*%20%20%20%0D%0A%0D%0A*%2F

var myMoudle;

(function (myMoudle) {

var test = (function () {

function test() {

this.t2 = new test();

this.x3 = 1;

}

return test;

})();

})(myMoudle || (myMoudle = {}));

/*

module myMoudle {

interface iTest {

t2:iTest;
x3:number;

}

class test implements iTest {

t2: iTest;

x3: number;

constructor(){

this.t2 = new test();

this.x3 = 1;

}

}

}

/*

Issue 2:
Hi,

TS Version: 1.4

The following code:

var x: any;
/*
var bar;
*/

Emits the following JavaScript

var x;
/*
var bar;
var x: any;
/*
var bar;

Expected

var x;
/*
var bar;
*/
Issue 1:
What problem does this feature solve?

This feature will allow to do validation based on the value of other properties.

What does the proposed API look like?

Vue.component('my-component', {
props: {
propA: 'String',
propB: {
validator(value, props) {
switch(props.propA) {
case 'email':
return validEmail(value)
case 'tel':
return validTel(value)
default:
return true
}
}
}
}
})

Issue 2:
Version

2.6.10

Reproduction link

https://codepen.io/leevscript/pen/gOawPgP

Steps to reproduce

<template>
<ul>
<li v-for="num in nums" :key="num">{{num}}</li>
</ul>
</template>

<script>
export default {
data () {
return {
nums: [1, 2, 3]
}
},
mounted () {
this.nums = [2, 2]
}
}
</script>

What is expected?

normal

What is actually happening?

error

英文不太好，问题又比较复杂，所以就用中文了，抱歉。

当 oldCh 里的元素跟 newCh 里的元素匹配到且该元素不在 oldCh 的首尾且 newCh 里该元素有多个时，diff 算法会报错。

我知道 key 应该是唯一标识，但我理解这种情况不应该报错，因为很多数据由服务端返回，我们不能保证不会有重复元素。
Issue 1:
I tried using the @types/lodash package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

The following are the errors I get when doing a rebuild

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(244,13): error TS2300: Duplicate identifier ''.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(248,19): error TS2300: Duplicate identifier ''.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,21): error TS1005: ']' expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,22): error TS1005: ';' expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,23): error TS1128: Declaration or statement expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,33): error TS1005: ']' expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,34): error TS1005: ')' expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,35): error TS1128: Declaration or statement expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(11451,37): error TS1128: Declaration or statement expected.

/Users/amalla/workspace/sparqapp/node_modules/@types/lodash/index.d.ts(19448,1): error TS1128: Declaration or statement expected.

Issue 2:
lowdb-tests are failing on master, probably due to a typescript change. It looks like the If<...> types no longer work properly.

The good news is, in TS2.8 we can use conditional types, which do the same thing in a much more reliable way. I can make a PR for this, but I want to make sure we're OK with dropping support for TS 2.6-2.7.

I think it's worth dropping support because the types are very broken in TS2.8 right now. Anyone using TS 2.6 can still install @types/lowdb@ts2.6 to pin to the older version.

I tried using the @types/xxxx package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @typicode @niieani
Issue 1:
❓ Questions & Help

When using En-Fr XLMModel in transformers library,

I found that result from tokenizing a whole sentence is different from tokenizing words in the sentence and then concatenate.

My configuration is as below

(XLMModel, XLMTokenizer, XLMConfig, 'xlm-mlm-enfr-1024')

The result is as below

The ultimate goal is to 'detokenize' tokenized sentence which is

['I', 'love', 'swim', '##ing'] -> ['I', 'love', 'swimming']

In order to do this, I have to know the raw token's index for each tokenized tokens.

It would be great if anyone can help with this problem.

Issue 2:
🐛 Bug

Model I am using: Bert

Language I am using the model on: English

To Reproduce

Call bertTokenizer.tokenize("text", return_tokens_mapped_to_origin=True)

Result:

TypeError: _tokenize() got an unexpected keyword argument 'return_tokens_mapped_to_origin'

Expected behavior

The official documentation mentions a "return_tokens_mapped_to_origin" optional parameter that when set to True should return the index of each token in the initial given text.

https://huggingface.co/transformers/main_classes/tokenizer.html?highlight=return_tokens_mapped_to_origin#transformers.PreTrainedTokenizer.tokenize

Environment

OS: macOS Mojave

Python version: 3.7

PyTorch version: 1.3.0

PyTorch Transformers version (or branch): 2.2.1

Using GPU ? No

Additional context

In the source code this parameter is never used outside of the doc comment, neither in the base class nor in its implementations.
Issue 1:
Now the automated interface is not displayed with mouse like icons. It is difficult to understand what you are doing if you have not seen it yourself

Issue 2:
It would be nice to natively have support for a mouse helper. So if running in headful mode, or taking a screenshot, or video recording, one would see where the mouse is, text selections, drag & drops, and where it clicks during a failure.

@aslushnikov already had one in Puppeteer but it required installing it, but maybe it could be default-installed on the browserContext or page instead if wanted, or even for the browser. Having it out of the box would improve usability for all users. Especially during debugging.

puppeteer/puppeteer#4378 (comment)
Issue 1:
I am using SciPy (version 1.2.0) for some reasons with a simulation software.

In my case, I need to model the structure in the simulation software based on the results of calculation on variables. The results from the simulation software is the objective function.

However, mostly the design variables can not form the structure. If these infeasible variables pass into simulation software, it will generate a mistake which causes the optimization stop. How can I ask SLSQP to reject infeasible varibales strictly untill the feasible one generate and then pass the feasible one into simulation software to provide the objective value for optimization?

Issue 2:
Given a constrained optimisation problem, the L-BFGS-B routine (and perhaps others) step outside the prescribed bounds to estimate the gradient despite keep_feasible = True. Is this the correct usage of this parameter in Bounds?

Reprex below of a function where ub + eps results in an exception. I would have thought that when estimating the gradient at the upper bound, this should be done below the bound rather than always adding eps?

The workaround would be to manually specify eps as per this example and then redefine the bounds as Bounds(lb, ub - eps) however I wouldn't have thought this is ideal?

Reproducing code example:

import numpy as np
from math import log
from scipy.optimize import minimize, Bounds

eps = 1e-8

def f(x):
print(x)
return log(1 + eps - x)

f(0)
f(1)

x0 = np.array([0])
x_bounds = Bounds(np.array([0.]), np.array([1.]), keep_feasible = True)
res = minimize(fun = f, x0 = x0, method = 'L-BFGS-B', bounds = x_bounds, options = {'eps': eps})

Error message:

0
1
[0.]
[1.e-08] # lb + eps
[1.]
[1.00000001] # ub + eps is infeasible
Traceback ... in f
return log(1 + eps - x)
ValueError: math domain error

Scipy/Numpy/Python version information:

1.1.0 1.14.5 sys.version_info(major=3, minor=6, micro=6, releaselevel='final', serial=0)
Issue 1:
Environment

Windows build number: 10.0.18362.0
Windows Terminal version: 0.5.2681.0
Powershell Core: 6.2.1

Powershell Modules:
posh-git: 1.0.0
PSReadLine: 2.0.0

I'm not able to reproduce this bug outside git repos, so I think this is somehow related to posh-git (or maybe the PS1 variable).

I'm not sure if this is a problem with posh-git or the terminal itself, so I'm posting here looking for some guidance.

Steps to reproduce

If you're using posh-git, open the terminal on a GIT repository and type something with 3 or more characters.

Actual behavior

The line moves one column left.

Update

Digging a little bit more into this I've found that this doesn't happen on a branch with no upstream tracking — which is represented by that 3 vertical lines character on posh-git.

So maybe it's related with the ≡ character?

Issue 2:
Environment

Microsoft Windows [Version 10.0.18995.1]
Windows Terminal version (if applicable): 0.5.2681.0

Steps to reproduce

set copyOnSelect to false

Expected behavior

select text

remove selection

clipboard remains unchanged

Actual behavior

select text

remove selection

clipboard is overwritten with previously selected text
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.4

Steps to reproduce this issue

GenericService泛化调用

使用oninvoke、onreturn、onthrow

FutureFilter无法正常回调

Expected Result

StaticContext.getKey(invoker.getUrl(), invocation.getMethodName(), Constants.ON_INVOKE_METHOD_KEY)

返回

com.alibaba.boot.dubbo.demo.consumer.DemoService:1.0.0.sayHello.oninvoke.method

Actual Result

StaticContext.getKey(invoker.getUrl(), invocation.getMethodName(), Constants.ON_INVOKE_METHOD_KEY)

返回

com.alibaba.boot.dubbo.demo.consumer.DemoService:1.0.0.$invoke.oninvoke.method

预期是：

String methodName = invocation.getMethodName();
if("$invoke".equals(methodName)) {
Object[] arguments = invocation.getArguments();
methodName = (String) arguments[0];
}

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
test case, from #3583:

from sqlalchemy import *
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import *

Base = declarative_base()

class A(Base):
__tablename__ = "test_a"

id = Column(Integer, primary_key=True)
b_rel = relationship(
"B", collection_class=set, cascade="all, delete-orphan"
)
b = association_proxy("b_rel", "value", creator=lambda x: B(value=x))

class B(Base):
__tablename__ = "test_b"
__table_args__ = (UniqueConstraint("a_id", "value"),)

id = Column(Integer, primary_key=True)
a_id = Column(Integer, ForeignKey("test_a.id"), nullable=False)
value = Column(String)

e = create_engine("sqlite:///:memory:", echo=True)
# e = create_engine('postgresql:///test', echo=True)
Base.metadata.create_all(e)
# e.execute('TRUNCATE test_a, test_b;')
s = Session(e)

a = A()
a.b = {"x", "y", "z"}
s.add(a)
s.commit()

print("\nadding existing element to set")
a.b.add("x")
s.flush()

print("\nassigning same items to set")
a.b = set(a.b)
s.flush()

since this issue was added the association proxy has been highly modified

Migrated issue, originally created by Michael Bayer (@zzzeek)

the "clear" here is clumsy and originally thought was the ultimate cause of the original issue in #2637 it's not. Might be nicer if we had a bulk replace built in for those collections, would emit fewer events.

def __set__(self, obj, values):
if self.owning_class is None:
self.owning_class = type(obj)

if self.scalar:
creator = self.creator and self.creator or self.target_class
target = getattr(obj, self.target_collection)
if target is None:
setattr(obj, self.target_collection, creator(values))
else:
self._scalar_set(target, values)
else:
proxy = self.__get__(obj, None)
if proxy is not values:
proxy.clear()
self._set(proxy, values)

Issue 2:
Migrated issue, originally created by Anonymous

After executing table.tometadata(metadata), the new table's new column's info dictionaries are references to the original columns' dictionaries instead of a copy of the dictionary.

If this is by design for some reason, no hard feelings, close ticket, but seems bad design to me to have the new instances of the columns referencing the original columns' info dictionaries.