WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
it would be nice if there was a way to generate extra data before dispatching to a module

something like this (bad example to get the idea across)

@app.route('//wiki', module=vcswiki)
def user_wiki(username):
g.wiki = get_wiki_for_user(username)

@app.route('/help', module=vcswiki)
def help_wiki():
g.wiki = get_help_wiki()

Issue 2:
The module branch support variable modules. Something like this:

wiki = Module(__name__, url_prefix='/<user>')

Then each function registered is passed 'user' as first parameter. This already works as far as I can see, however it would be better if that value can be attached to g instead. What should work (not tested) is this:

@wiki.before_request
def attach_user():
g.wiki_user = request.view_args.pop('user', None)

The problem with this is that URLs generated still need that user attached, so url_for needs some kind of support for that. However I am not entirely sure how that should look like.
Issue 1:
Visible-* classes applied to li items that are part of a list-inline styled list do not render inline, as the display: block !important; overrides the display: inline-block; for the list.

Demo - http://www.bootply.com/73333#

Consider a fix of

.list-inline > li.visible-sm { display: inline-block !important; }

and similar at for the -md and -lg classes at the correct breakpoints.

Issue 2:
related to issues #8500 , #7808 , #4929 ; using .hidden-sm to hide span within .nav > li > a . Because class is display: block above -sm then text wraps to new line. Would you consider .hidden-* classes to be display: inline-block instead ?

Here's a jsfiddle of the two cases - but the repercussions could be greater outside of this situation so probably needs more consideration... http://jsfiddle.net/jholl/P86yf/
Issue 1:
Q
A

Bug report?
no

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4

After upgrading to Symfony 3.4 beta1, I'm seeing a ton of deprecations like this one:

The "Twig_Extension::getName()" method is deprecated since 1.26 (to be removed
in 2.0), not used anymore internally. You should not extend it from
"Symfony\Bridge\Twig\Extension\LogoutUrlExtension"

@sstok suggested on the Symfony Slack chat to require Twig 1.26 as the minimum version, because that's the one which deprecated getName() and the first version where we can remove it without making the applications fail.

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4

The Debug component detects usages of deprecated methods since #23816.

Problem is that the TwigBridge's Twig extensions are all implementing Twig\Extension::getName() which is deprecated since Twig 1.26 (only via @deprecated phpdoc annotations to avoid unexpected deprecation notices, see twigphp/Twig#2148).

As a result, using symfony/debug 3.4 + symfony/twig-bridge 3.4 + twig 1.x triggers the following deprecation:

The "Twig_Extension::getName()" method is deprecated since 1.26 (to be removed in 2.0), not used anymore internally. You should not extend it from "Symfony\Bridge\Twig\Extension\AssetExtension".

Same for every Twig extension provided by TwigBridge (16)
Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

lib/ansible/modules/clustering/consul_kv.py

ANSIBLE VERSION

ansible 2.3.0.0

ansible 2.4.0.0

SUMMARY

Currently the consul_kv module does not provide any extra diff output (when running ansible with the so useful --diff option).

Diff output (we could make it optional, by an extra optional parameter like 'diffView') should be easy to add using the module.exit_json diff return attribute containing both the old and new value for the updated key, in following fashion:

index, existing = consul_api.kv.get(key)
...
# to support diff-mode, just need following block:
if existing and existing['Value']:
ansible_diff = {'before': existing['Value'], 'after': value}
else:
ansible_diff = None

module.exit_json(changed=changed,
index=index,
key=key,
data=stored,
diff= ansible_diff
)

Note: Untested code

Update: I've already tested the new --diff successfully in a duplicated consul_kv.py file. TODO make a PR etc

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

lxc_container

ANSIBLE VERSION

ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]

CONFIGURATION

OS / ENVIRONMENT

N/A

SUMMARY

This issue is a follow-up (but it's not a duplicate: that issue was about something different but still contains relevant messages) for the ansible/ansible-modules-extras#1998.

In short, if you change the container_config it's easy to reach the state when the config contains duplicates.

I understand lxc allows some configuration directives to present multiple times in the config, but at least the module could de-duplicate the entries that are guaranteed to be unique.

Eg: lxc.start.auto. Having duplicates for it really can cause issues when you expect (or do not) the container to start on the host restart, but due to multiple duplicate lines arbitrarily ordered - the outcome is basically random.

What I suggest: what if the module kept the list of directives that are guaranteed to be unique and for those only kept the currently set values, and removed everything else.

STEPS TO REPRODUCE

- name: Create a container
lxc_container:
name: container-to-demonstrate-duplicate-issues
template: ubuntu
state: started
template_options: "--release xenial"
container_config:
- "lxc.start.auto = 1"

then change to lxc.start.auto = 0

EXPECTED RESULTS

There should be just one lxc.start.auto in the container's config file.

ACTUAL RESULTS

There are 2 entries
Issue 1:
Please fill out the below information:

Your Windows build number: 10.0.18362.356

What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

I can open the find box by right-clicking the title bar and select from the menu. But I can't open it with Ctrl + F shortcut.

My /etc/inputrc is the default.

# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.

# Be 8 bit clean.
set input-meta on
set output-meta on

# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.

# set convert-meta off

# try to enable the application keypad when it is called. Some systems
# need this to enable the arrow keys.
# set enable-keypad on

# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys

# do not bell on tab-completion
# set bell-style none
# set bell-style visible

# some defaults / modifications for the emacs mode
$if mode=emacs

# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert

# mappings for "page up" and "page down" to step to the beginning/end
# of the history
# "\e[5~": beginning-of-history
# "\e[6~": end-of-history

# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward

# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word

$if term=rxvt
"\e[7~": beginning-of-line
"\e[8~": end-of-line
"\eOc": forward-word
"\eOd": backward-word
$endif

# for non RH/Debian xterm, can't hurt for RH/Debian xterm
# "\eOH": beginning-of-line
# "\eOF": end-of-line

# for freebsd console
# "\e[H": beginning-of-line
# "\e[F": end-of-line

$endif

Issue 2:
Environment

Windows build number: 10.0.18362.295
Windows Terminal version (if applicable): 0.3.2171.0

Any other software?

Clink v0.4.9 [git:2fd2c2] (http://mridgers.github.io/clink)

Steps to reproduce

open a cmd tab

edit the settings and change fontFace for the cmd profile to something invalid (apending "ZZZ" for example)

Expected behavior

terminal uses a default font and does not crash

Actual behaviour

terminal terminates

This would sound like a perfect dupe of #550 only I am running 0.3.2171.0 and that was "fixed" in 0.3.2142.0

Terminal does not terminate if you start cmd.exe without autorun extensions (clink) with the /D flag.

If you have powershell tabs open terminal still terminates and you loose work (which is why I beleive this is a terminal bug and not a clink one)
Issue 1:
I am working with 4/5/6D arrays and I have found so many bugs caused by supplying 4 indexes to a 5D array, which just silently returns an (essentially random) element.

I think this should be considered a bug as it is very easy to do by mistake and leads to data corruption.

Is this regarded as a feature? What is the reasoning behind it, rather than requiring colons to fill out the missing indexes?

Issue 2:
There are some aspects of getindex.

Let A is a n-dimensional array, say 4-dimensional with size(A) == (2,3,2,2),

Dimensions left out get flattened into the last indexed dimension, so for example

A[i, k]==A[i,:,:,:][k] for k in 1:12

This seems to be a consistent generalization of A[:] transforming the array to a vector.

Also additional indexes of the form 1, : and equivalent 1:1 (additional to the n dimensions) can be provided. For example

A[2,3,2,2, 1, 1] ~ Int64 A[2,3,2,2, :, 1] ~ 1x1x1x1x1 Array{Int64,5}

(In both cases as usual the trailing integer-indexed dimension are removed)

Which behaviors are desired, which are artifacts from the implementation, which should be documented?
Issue 1:
Numpy silently assigns zeroes instead of the correct array if the array has a negative fraction.

Reproducing code example:

A = np.array([[3,2,4],
[2,1,3],
[1,2,4]])
b = A[1,0:3] - 0.66*A[0,0:3]
A[1,1:3] = b[1:3]

A

Output:

array([[3, 2, 4],
[2, 0, 0],
[1, 2, 4]])

Numpy/Python version information:

OS: Windows 10

Numpy version : 1.14.5

Python version : 3.6.6

1.14.5 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1600 on 2010-09-02 by trac user steveb, assigned to unknown.

When a record type is defined using a dictionary, dtype doesn't allow zero length arrays.

np.dtype([('val1', np.float32, (0,))]) # OK
np.dtype({'names': ['val1'], 'formats':[(np.float32, (0,))]}) # Throws TypeError

It isn't clear to me why they shouldn't be allowed in this case.
Issue 1:
Open a TS file and paste this code:

export type {
CreateHandle,
EffectCallback,
Inputs,
PropRef,
Reducer,
Ref,
StateUpdater,
} from "https://esm.sh/preact@10.5.14/hooks";
export {
useCallback,
useContext,
useDebugValue,
useEffect,
useErrorBoundary,
useImperativeHandle,
useLayoutEffect,
useMemo,
useReducer,
useRef,
useState,
} from "https://esm.sh/preact@10.5.14/hooks";

You will see that type completions and hover are not working. Now remove the export type statement. Type completions and hover work again.

Issue 2:
If you try to import type a type from a module which has a X-TypeScript-Types header, the language server does not properly handle this and reports that the import does not have the named export.
Issue 1:
Do you want to request a feature or report a bug?

Feature

What is the current behavior?

If a component's render method throws an error, it leaves React in an inconsistent state.

Subsequent renders attempt to update the inconsistent component and result in errors like "Cannot read property 'getHostNode' of null".

Proposed behavior

React could catch the error from the render method, set an "inconsistent state" flag and re-throw it.

Afterwards, if React is about to update the previously rendered component, but this flag is set, it could discard or unmount the existing component and perform a fresh render, as if the container were empty.

Which versions of React, and which browser / OS are affected by this issue?

I've encountered the inconsistent state problems in 15.5 and 15.6

Issue 2:
So I'm trying to put some graceful error handling in case 1 of my views crap out:

var MyGoodView = React.createClass({
render: function () {
return <p>Cool</p>;
}
});

var MyBadView = React.createClass({
render: function () {
throw new Error('crap');
}
});

try {
React.render(<MyBadView/>, document.body);
} catch (e) {
React.render(<MyGoodView/>, document.body);
}

However, MyGoodView does not get rendered w/ the following stack trace:

Seems like error throw React in a bad state where renderedComponent is undefined, thus cannot be unmounted. How do I handle this scenario?
Issue 1:
localSeries = pd.date_range("2018-7-1", periods=1, freq="30T", tz="Europe/London")
print(localSeries.to_period("30T")[0].start_time)
#Timestamp('2018-07-01 00:00:00')
print(localSeries.to_period("30T")[0].start_time.tz)
#None
print(localSeries.to_period("30T")[0].end_time.tz)
#None
print(localSeries[0].tz)
#<DstTzInfo 'Europe/London' BST+1:00:00 DST>

While this may be useful for monthly/quarterly granularity data, it causes a problem for half-hourly data or similar around clock change, because the local times are used but the time-zone knowledge is dropped without warning.

Issue 2:
This might be quite a bit of work, maybe leave for post 0.8.0
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

ansible-vault

ANSIBLE VERSION

ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/hymie/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]

CONFIGURATION

DEFAULT_VAULT_PASSWORD_FILE(/root/ansible.password.change/ansible.cfg) = /usr/local/bin/redactedprogram

OS / ENVIRONMENT

Red Hat Enterprise Linux Workstation release 6.9 (Santiago)

SUMMARY

My ansible.cfg file specifies a default vault password. I am unable to override this with a different vault password.

STEPS TO REPRODUCE

$ cat ansible.cfg
[defaults]
vault_password_file = /usr/local/bin/redactedprogram

$ echo "hi there" | ansible-vault encrypt_string --ask-vault-pass
New Vault password:
Confirm New Vault password:
ERROR! Only one --vault-id can be used for encryption. This includes passwords from configuration and cli.

$ echo "hi there" | ansible-vault encrypt_string --vault-password-file=/tmp/foo
ERROR! Only one --vault-id can be used for encryption. This includes passwords from configuration and cli.

$ echo "hi there" | ansible-vault encrypt_string --vault-id=@prompt
New vault password (default):
Confirm vew vault password (default):
ERROR! Only one --vault-id can be used for encryption. This includes passwords from configuration and cli.

EXPECTED RESULTS

I expect the supplied command-line options to override the configuration file defaults and specify (or allow me to specify) the encryption password.

ACTUAL RESULTS

I get the above errors that the pre-configured default vault-id cannot be replaced.

Issue 2:
Issue Type:

“Bug Report”

Ansible Version:

ansible 1.7 (devel 05eb6aa) last updated 2014/06/26 13:36:36 (GMT +000)

Environment:

Centos 5/6

Summary:

when using git module, if ssh://git@192.168.1.89:1357/, the host check process breaks.

Steps To Reproduce:

have a git repo available over ssh on port 22

have a working git checkout with ssh://git@fqdn/

try with ssh://git@fqdn:22/

Expected Results:

It should work as expected, on port 22 and on non-standard ports.

Actual Results:

(let me add that the host key IS in known_hosts)

with accept_hostkey = False

failed: [127.0.0.1] => (item=..) => {"failed": true, "item": ".."}

msg: 192.168.1.89:22 has an unknown hostkey. Set accept_hostkey to True or manually add the hostkey prior to running the git module

with accept_hostkey = True

failed: [127.0.0.1] => (item=..) => {"failed": true, "item": ".."}

msg: failed to add 192.168.1.89:22 hostkey: getaddrinfo 192.168.1.89:22: Name or service not known

The problem seems to come from ansiwork/lib/ansible/module_utils/known_hosts.py

get_fqdn does not remove the port.
Issue 1:
After installing the 1.8.4.0 VS 2015 Typescript tools I'm getting an unexpected build error:

Build: File 'COMPUTE_PATHS_ONLY.ts' not found.

After perusing other issues with this error I dug into

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Typescript

And also found

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\Typescript

I don't know if it's related but for giggles I replaced the Microsoft.TypeScript.targets in v14.0 with the same file I found in v15.0 and the issue went away. Is this v15 stuff mis-installed? I don't have a VS v15.

Issue 2:
I'm currently using VS 2015 with TS 1.7.6. This was after a short stint with 1.8.6 after it was auto updated to that version. Now I'm getting 'COMPUTE_PATHS_ONLY.ts' not found. I've seen the descriptions of how to unload the project and remove the import lines but that was breaking typescript for other members of the team. How can I remove this error so I can peacefully return to 1.7.6? Thanks...below are my first few lines from my project. Further down I have the tools version line for 1.7. At the bottom is the usual import project for the MSBuildExtensionsPath32 for the TypeScript.targets
Issue 1:
This works fine:

function test(): [number, string] {
return [1, "a"];
}

But this...

async function test(): Promise<[number, string]> {
return [1, "a"];
}

gives the following error:

main.ts(2,9): error TS2322: Type '(number | string)[]' is not assignable to type '[number, string]'.
Property '0' is missing in type '(number | string)[]'.

It appears that [1, "a"] has instead been inferred to be an array of number | string, which is not what I want.

Issue 2:
There appears to be a typing bug with the return values from async functions, perhaps limited to tuples. Examples:

// Works!
function test(): [boolean, number] {
return [true, 1];
}

// Works!
function test2(): Promise<[boolean, number]> {
return Promise.resolve([true, 1]);
}

// Doesn't work
async function test3(): Promise<[boolean, number]> {
return [true, 1]; // Error here!
}

The error is:

Type '(boolean | number)[]' is not assignable to type '[boolean, number]'.
Issue 1:

Issue 2:
Hi guys, I have a strong feeling that this issue is not bootstrap but rather chrome, but it may be interesting to you too.

http://codepen.io/sirinity/pen/fLuFG

Tooltip in combination with a list of display: inline-block elements seems to remove empty text nodes when appearing, thus bringing blocks closer together.

I am seeing this on

Windows 7 Opera 19

Chromium 32.0.1700.102 Ubuntu 12.04

Cannot test chrome at the moment, but I am sure it will replicate in chrome too.

P.S. Couldn't find any similar issue and hope it is not a duplicate
Issue 1:
"Be happy the 520 bridge didn't get destroyed" edition

#6864 Disallow implicitly duplicated enum values

❌ : Highly precedented in other C-style languages

#471 Permit an implementing class to ignore private methods of the implementee class

❌ Reconsider as a type operator

#6758 Allow --name=value commandline switch format

❌ Suggestion from 👻 ?

#7256 Disallow void in truthyness positions

👍 Very good check

#7071 require of .json file

👍 Accepting PRs

#6808 Start a deprecation path for module

❌ TSLint is the path

#3792 Allow export default namespace foo { and other export default combos

👍 Accepting PRs

#7347 Allow rest args in non-final positions

🕙 Revisit if this pattern becomes more prevalent

#6094 Provide a way out for incompatible derived class method signatures

#6895 Outersection types

🕙 Revisit in context of type operators

#7234 Constraints as inference sites

👍 Accepting PRs or maybe we'll get to it

Issue 2:
TypeScript Version:

1.8.7

Code

let firstValue = 1;
let secondValue = 2;
[firstValue, secondValue] = [3, 4];

Expected behavior:

var firstValue = 1;
var secondValue = 2;
var _a;
_a = [3, 4], firstValue = _a[0], secondValue = _a[1];

Actual behavior:

var firstValue = 1;
var secondValue = 2;
_a = [3, 4], firstValue = _a[0], secondValue = _a[1];
var _a;

Closure Compiler reports _a as unreachable code / use before definition. While this works at runtime, it's not a good practice and looks like a bug in tsc.
Issue 1:
I have some data that I have used to generate a stacked bar graph.

by_conclusion = measles_data.groupby(["AGE", "CONCLUSION"])
counts_by_cause = by_conclusion.size().unstack().fillna(0)
ax = counts_by_cause.plot(kind='bar', stacked=True)

However, I get a pretty crowded x-axis:

So, I try to use set_xticks to try and thin them out, either as an argument to plot, or as a separate command:

ax.xticks(arange(0,80,10))

However, for some reason, the labels end up being downscaled by a factor of 10:

(might be hard to see, but it is printing "0.0, 1.0, 2.0, ..." instead of "0, 10, 20, ...")

Its not clear why this is happening, or how to get around it, so I'm either going about this wrong or its a bug. I get the same behavior when I try using MaxNLocator:

ax.xaxis.set_major_locator( MaxNLocator(nbins = 7) )

The data are here

Issue 2:
After a concat of two DataFrames with the same columns. I want to consolidate some data and remove NaNs in some columns by values in other columns. I ended up with a DataFrame that magically had additional columns.

This is the minimum example that I can give to reproduce the faulty behaviour using current master (70de129):

df1 = pd.DataFrame([{'A':None, 'B':1},{'A':2, 'B':2}])
df2 = pd.DataFrame([{'A':3, 'B':3},{'A':4, 'B':4}])
df = pd.concat([df1, df2], axis=1)

>>> df1
A B
0 NaN 1
1 2 2

[2 rows x 2 columns]

>>> df2
A B
0 3 3
1 4 4

[2 rows x 2 columns]

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

[2 rows x 4 columns]

Now replacing NaNs in the 0 column with (corresponding) values in the 2 column ('A'), I expected to simply write a 3 into NaN (which it did), but it actually added a column '0' at the end of the DataFrame even though iloc is not supposed to enlarge the dataset. Clearly a bug.

inds = np.isnan(df.iloc[:, 0])
df.iloc[:, 0][inds] = df.iloc[:, 2][inds]

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

[2 rows x 5 columns]