ENH: integrate: multidimensional integration of array-valued functions

For reference, this work is being completed as part of my internship at Quansight Labs, which runs until the end of September.
Reference issue
Addresses #20252.
What does this implement/fix?
This PR would enhance support for multidimensional integration ("cubature") through a new function scipy.integrate.cubature.
One of the current gaps in the capabilities of scipy.integrate is support for array-valued multidimensional integrals. At the moment, there is support for multidimensional scalar-valued integrands through dblquad, tplquad and nquad, and separate support for 1D array-valued integrands in quad_vec, but not for simultaneously array-valued and multidimensional integrands.
Furthermore, dblquad, tplquad and nquad are implemented as iterated 1D integrals using quad, which means integration in a moderate number of dimensions can be slow. quad is implemented as a wrapper around the Fortran library QUADPACK, which makes it difficult to support other array APIs like _tanhsinh does.
These functions and quad_vec also do not support custom integration rules, which means it is hard to compute tricky multidimensional integrals with singularities.
This new cubature function has an interface similar to quad_vec but works towards resolving these issues by:

Supporting array-valued multidimensional integrands (and scalar/1D integrals as a special case).
Using an adaptive algorithm implemented in Python similar to quad_vec, with the eventual goal of supporting the array API. This works by subdividing the region being integrated until a tolerance is reached, rather than computing iterated 1D integrals.
Allowing custom integration rules, which are classes with an estimate(f, a, b) method and an estimate_error(f, a, b) method. There is built-in support for Cartesian products of 1D rules like Newton-Cotes, Gauss-Legendre, Gauss-Kronrod, and support for "true cubature" rules like Genz-Malik which only work in $N>1$ dimensions, but also methods available to let users write their own rules.

Additional information
Interface details

Interface details (dropdown)
cubature is implemented in integrate/_cubature.py and has the signature:
cubature(f, a, b,
	rule="gk21",
	rtol=1e-05, atol=1e-08,
	max_subdivisions=10000,
    args=(), kwargs=None)

f can be any callable which accepts arrays of shape (npoints, ndim) and outputs arrays of shape (npoints, output_dim_1, ..., output_dim_2). cubature will then return an array of shape (output_dim_1, ..., output_dim_n) for the integral over the region specified by corners a and b, given as rank-1 arrays of length ndim.
rule is a string specifying the underlying cubature rule to use, and supports the same options as the quadrature option in quad_vec: gk21, gk15 and trapezoid.
rule can also be an instance of a new class, Rule, which lives in integrate/_rules/_base.py. This is a general interface for numerical integration algorithms:
class Rule:
	def estimate(self, f, a, b, args=(), kwargs=None): ...
	def estimate_error(self, f, a, b, args=(), kwargs=None): ...

There are then several subclasses. If a subclass does not implement error_estimate, then a default error estimator is used. The subclasses are:

FixedRule, which is a rule implemented as the weighted sum of function evaluations at fixed nodes. For example, Gauss-Legendre quadrature.
NestedRule, which is a rule where the error is estimated as the absolute difference between two underlying rules.
NestedFixedRule, which is a rule where the error is estimated as the absolute difference between two underlying fixed rules.
ProductFixed, which finds the n-dim cubature rule from the product of n 1D fixed rules
ProductNestedFixed, which finds the n-dim cubature rule from the product of n 1D nested fixed rules

Implementations are then given in integrate/_rules for:

GaussKronrodQuadrature, a NestedFixedRule implementing Gauss-Kronrod quadrature
GaussLegendreQuadrature, a FixedRule implementing Gauss-Legendre quadrature
NewtonCotesQuadrature, a FixedRule implementing Newton-Cotes (trapezoid) quadrature
GenzMalikCubature, a NestedFixedRule implementing Genz-Malik cubature

This Rule class and its subclasses are currently not exposed as part of the public API.

Examples
(Examples taken from the docstring of cubature).

Vector-valued 1D integral (dropdown)
A simple 1D integral with vector output. Here $f(x) = x^n$ is integrated over the interval $[0, 1]$ for ten values of $n$. $f$ returns an array, so all ten integrals are done simultaneously. Since no rule is specified, the default "gk21" is used, which corresponds to GaussKronrodQuadrature(21). Since the spatial dimension of the integrand is 1D, this could also be done using quad_vec.
>>> import numpy as np
>>> from scipy.integrate import cubature
>>> from scipy.integrate._rules import GaussKronrodQuadrature
>>> def f(x, n):
...    return x.reshape(-1, 1)**n  # Make sure x and n are broadcastable
>>> res = cubature(
...     f,
...     a=[0],
...     b=[1],
...     args=(
...         # Since f accepts arrays of shape (npoints, ndim) we need to
...         # make sure n is the right shape
...         np.arange(10).reshape(1, -1),
...     )
... )
>>> res.estimate
 array([1.        , 0.5       , 0.33333333, 0.25      , 0.2       ,
            0.16666667, 0.14285714, 0.125     , 0.11111111, 0.1       ])

Tensor-valued 7D integral (dropdown)
A 7D integral with arbitrary-shaped array output. Here $f(\pmb x) = \cos(2\pi r + \pmb \alpha^\top \pmb x)$ for some $r$ and $\pmb \alpha$, and the integral is performed over the unit hybercube, [0, 1]^7.
>>> import numpy as np
>>> from scipy.integrate import cubature
>>> from scipy.integrate._rules import GenzMalikCubature
>>> def f(x, r, alphas):
...     # f(x) = cos(2*pi*r + alpha @ x)
...     # Allow r and alphas to be arbitrary shape
...     npoints, ndim = x.shape[0], x.shape[-1]
...     alphas_reshaped = alphas[np.newaxis, :]
...     x_reshaped = x.reshape(npoints, *([1]*(len(alphas.shape) - 1)), ndim)
...     return np.cos(2*np.pi*r + np.sum(alphas_reshaped * x_reshaped, axis=-1))
>>> np.random.seed(1)
>>> res = cubature(
...     f=f,
...     a=np.array([0, 0, 0, 0, 0, 0, 0]),
...     b=np.array([1, 1, 1, 1, 1, 1, 1]),
...     rule=GenzMalikCubature(7),
...     kwargs={
...         "r": np.random.rand(2, 3),
...         "alphas": np.random.rand(2, 3, 7),
...     }
... )
>>> res.estimate
 array([[-0.61336595,  0.88388877, -0.57997549],
		[-0.86968418, -0.86877137, -0.64602074]])

Difficulties and next steps
It would be great to get some suggestions on the interface, especially around having NestedRule and NestedFixedRule.
Currently the following are not supported:

Infinite endpoints
Accepting a points parameter like quad_vec
Broadcastable endpoints
Non-rectangular regions

It is our hope that this will be added before the end of the internship (end of September), depending on how much further work is required for this PR.
A future PR can also update quad_vec to accept the 1D rule interface proposed here, perhaps just by using its existing "quadrature" argument. This would allow for plug-and-play rules in adaptive quadrature and would work nicely with integration methods such as tanh-sinh.
Many thanks to @izaid and @ev-br, who have given lots of valuable support for this PR.

Thanks @ollybritton this is a very needed and nice addition. Here are two immediate comments from my side;
1- Why cub and not cubature? It does not seem like a good abbreviation given its very specific function.
2- I think the OOP parts are a bit too much abstracted. Not saying it is bad but typically there is a very nice rule that many people voiced over decades; "if you have a class which has two methods one of which is __init__ that should have been a function. ". I think it also applies here. I think this is the most famous one :) https://www.youtube.com/watch?v=o9pEzgHorH0

Thanks this looks nice and a useful thing to add!
Some questions:

This appears to be heavily geared to h-adaptive integration. Does the design rule out p-adaptive integration if we decide we want to add it in the future? Likewise, what about MC/QMC (such as that offered by cuba)
Benchmarking. It would be nice to know how the performance compares (accuracy, function evaluations etc) to other implementations such as https://github.com/stevengj/cubature . There is a python wrapper https://github.com/saullocastro/cubature so this should not be too hard. Also, it would be good to compare the proposed rules, if one is strictly worse maybe it should not be included.

Thanks for the feedback, everyone!
@ilayn, 1: Definitely open to suggestions for better names, both for cub and for everything else. The only motivation for cub rather than cubature was to match quad and quad_vec. It seems most people think cubature would be better, so I'm happy to change it.
2: I agree that this does go quite OOP-heavy, especially with the classes like FixedRule, NestedRule and NestedFixedRule – this isn't really a definite choice but rather because of a lack of immediate better alternatives. I'm open to suggestions about how this could be simplified or made less abstract – the details around the Rule classe and its subclasses is the part of the interface that I am least happy with.
quad_vec currently takes the approach of just using functions with signature rule(a, b, f) -> est, err, round_err. I think the problem with just using functions like this is that there needs to be some way to access the nodes being used so that you can take arbitrary products of 1D quadratures. And the reason for splitting up the estimate and error_estimate is to allow for error estimation that doesn't depend on the specific rule being used.
@j-bowhay, 1: Yes, at the moment this only supports $h$-adaptive integration but it would be nice to support also $p$-adaptive integration and Monte Carlo methods. This is not ruled out by this design, it could be added in the future by extending the Rule interface. cub could then improve the estimate over a region/axis with high error by increasing the number of nodes/sample points rather than by subdividing.
One thing that might be difficult is supporting $h$-adaptive and $p$-adaptive integration simultaneously, e.g. with an integral like
$$
\int_{0}^{1}\int_{-1}^{1}\frac{y}{\sqrt{1-x^{2}}}\text dx\text dy
$$
it would be nice to be able to use a rule like tanh-sinh to handle the endpoint singularities for the $x$-axis, but potentially a different rule for the the $y$-axis. Then if you were to increase the number of nodes in tanh-sinh rather than subdividing the $x$-axis, I think you would have to also re-evaluate the function across the rest of the domain (although maybe this is fine?). Definitely welcome to suggestions about how this could work, or comments about whether supporting examples like this would be necessary in the first place.
2: I'm happy to do some benchmarks.
@lucascolley: Thank you for the suggestions and feedback, I also see some of the CI is failing so I'll address that and your comments today.

@j-bowhay I've run some benchmarks, both informally in a notebook and have also added some asv benchmarks to benchmarks/integrate.py. The results are mixed, for simple integrals that don't require any subdivision, cubature is 2-3x slower than stevengj/cubature using the Python wrapper.
For more complicated integrals, cubature can sometimes be 100x slower than stevengj/cubature which isn't ideal. In some high-dimensional situations cubature can be more competitive, ranging anywhere from 5x slower to ~2x faster (although these cases are rare). It's also difficult to compare stevengj/cubature to this new implementation using array-valued integrands since stevengj/cubature only supports 1D arrays (unless I am mistaken).
Since stevengj/cubature is GPLv3, I don't want to read the source because of licensing concerns. From profiling, I think the main reason that it can be 10x-100x faster is that it gets away with much fewer function evaluations than this cubature does – there's an example in the notebook above where it uses 30x more evaluations than stevengj/cubature for the same tolerances, so if the error estimation were improved it could be only 2-3x slower.

@j-bowhay I've run some benchmarks, both informally in a notebook and have also added some asv benchmarks to benchmarks/integrate.py. The results are mixed, for simple integrals that don't require any subdivision, cubature is 2-3x slower than stevengj/cubature using the Python wrapper.
For more complicated integrals, cubature can sometimes be 100x slower than stevengj/cubature which isn't ideal. In some high-dimensional situations cubature can be more competitive, ranging anywhere from 5x slower to ~2x faster (although these cases are rare). It's also difficult to compare stevengj/cubature to this new implementation using array-valued integrands since stevengj/cubature only supports 1D arrays (unless I am mistaken).
Since stevengj/cubature is GPLv3, I don't want to read the source because of licensing concerns. From profiling, I think the main reason that it can be 10x-100x faster is that it gets away with much fewer function evaluations than this cubature does – there's an example in the notebook above where it uses 30x more evaluations than stevengj/cubature for the same tolerances, so if the error estimation were improved it could be only 2-3x slower.

I just want to add on a bit to this - and @ollybritton, please correct me if I get something wrong. We had a good look at benchmarking, and generally came to the following conclusion. It's either a question of getting the parallelization right (and we've now added basic support for that) or getting better error estimates in the rules. Regarding the latter, this is why we thought hard about a sensible rule API including the estimate_error method, so that these can be improved over time.
Essentially, the error estimates we have in there now might be a bit too strict. Error estimation for numerical integration is a bit of a dark art, and we'd like to get all the basic structures in place so that in the future we or others can optimize this to get the balance correct between accuracy and efficiency.
I think we are on track to be competitive with cubature once that is done, especially noting cubature is written in C with Cython bindings, whereas we've just used pure NumPy. And the work here is still fast enough as it is today.

If you have some identified parts of the code that are deemed to be blockingly slow, I can help with Cython/C translations.

Thanks @ollybritton for looking into this! I agree @izaid this looks quite encouraging given we are comparing compiled code and pure Python. I think there might be two further things that might be worth looking at:

Benchmarking the different rules you are proposing to add against each other. For example, it wouldn't surprise me if the trapezoid rule is strictly worse than the others for all but the simplest examples? In which case we probably wouldn't want to include it.
Function evaluation. Clearly, compiled code will be faster but is the number of function evaluations needed to achieve a given error competitive?

For both these questions it would be helpful to consider them for a range of tolerances. Ie I think following style of work-precision benchmarks for both runtime and function evaluations is helpful:

Of course, if you think this is a distraction from more important points please feel free to put your effort elsewhere!

If you have some identified parts of the code that are deemed to be blockingly slow, I can help with Cython/C translations.

Thanks @ilayn, this sounds helpful but we'd rather stick to pure Python for now as the current bottleneck in performance is with the error estimation technique rather than the actual computation, and because it would be nice to eventually support the array API. If using Cython/C would offer a speed-up big enough to outweigh the costs in maintainability then some help with this would definitely be appreciated.

and because it would be nice to eventually support the array API.

We discussed this a few times before. That's not really a blocker if it gets in front of performance.

If using Cython/C would offer a speed-up big enough to outweigh the costs in maintainability.

That's also no problem as we are converting everything c/cython. So please don't consider architectural problems just now at this stage.

To summarise the discussion here so far:

The new function was originally called cub, but this has now been renamed to cubature.
Some discussion around the OOP-heavy parts of the currently private rules interface since there are currently several simple and related classes: FixedRule, NestedRule, NestedFixedRule.
cubature is currently geared towards $h$-adaptive integration, but in the future it could also support $p$-adaptive integration by extending the rules interface.
Some benchmarks:

Compared to stevengj/cubature (written in C), this code can be anywhere from ~2x faster to ~100x slower depending on the specific example.
The performance bottleneck at the moment appears to be the number of function evaluations needed to reach a given tolerance, since the error estimates being used are stricter than those for stevengj/cubature.
For the same number of function evaluations, this is only 2x-3x slower. Because of the design of the rules API, improving this can be done relatively easily in the future by modifying the estimate_error method.
The performance gap could then hopefully be closed by tuning parallelization (for which there is now support via a workers argument to cubature) and by potential use of C/Cython bindings.

At the suggestion of @j-bowhay, more should be done benchmarking comparing this to other numerical integrators with work-precision graphs. This can be done after addressing the other next steps:

Infinite endpoints
Non-rectangular regions and variable transformations
Accepting a points parameter to better handle singularities
Broadcastable endpoints

@lucascolley Thanks for the feedback! That should all be addressed now.

Looks like all review feedback was addressed.
To keep the ball rolling, I think it makes sense to land this in about a week's time --- unless there are further comments of course. Or if someone needs more time to review?

I think it makes sense to land this in about a week's time --- unless there are further comments of course. Or if someone needs more time to review?

maybe worth giving a heads-up on the forum thread?

@j-bowhay Your review is listed as changes requested, so you're looking for some more time to review this, correct? No pressure, am just trying to avoid this PR falling through cracks :-).

Nah, next week sounds great :-)

Ok a very basic benchmark, still missing comparison with nquad and Steven Johnson's code but all I have time for in 20 minutes today.
I am still -1 on including Newton Cotes rules until there is a better justification for doing so. In this example using the "trapezoid" performs by far the worst and the error estimate seems to fail?

Details

from scipy.integrate import cubature
import numpy as np
import matplotlib.pyplot as plt

count = 0
def genz_malik_1980_f_1(x, r, alphas):
    r"""
    .. math:: f_1(\mathbf x) = \cos\left(2\pi r + \sum^n_{i = 1}\alpha_i x_i\right)

    .. code-block:: mathematica

        genzMalik1980f1[x_List, r_, alphas_List] := Cos[2*Pi*r + Total[x*alphas]]
    """
    global count
    count +=1

    npoints, ndim = x.shape[0], x.shape[-1]

    alphas_reshaped = alphas[np.newaxis, :]
    x_reshaped = x.reshape(npoints, *([1]*(len(alphas.shape) - 1)), ndim)

    return np.cos(2*np.pi*r + np.sum(alphas_reshaped * x_reshaped, axis=-1))

def genz_malik_1980_f_1_exact(a, b, r, alphas):
    ndim = len(a)
    a = a.reshape(*([1]*(len(alphas.shape) - 1)), ndim)
    b = b.reshape(*([1]*(len(alphas.shape) - 1)), ndim)

    return (-2)**ndim * 1/np.prod(alphas, axis=-1) \
        * np.cos(2*np.pi*r + np.sum(alphas * (a+b)/2, axis=-1)) \
        * np.prod(np.sin(alphas * (a-b)/2), axis=-1)

a = np.array([0, 0])
b = np.array([10, 10])
r = np.array([1/4])
alphas = np.array([9, 10])

gk21_err = []
gk21_count = []
gk15_err = []
gk15_count = []
trapezoid_err = []
trapezoid_count = []
genz_malik_err = []
genz_malik_count = []
for tol in np.logspace(-3, -12, num=10):
    res = cubature(genz_malik_1980_f_1, a=a, b=b, args=(r, alphas), rtol=tol, atol=tol)
    gk21_err.append(np.abs(res.estimate - genz_malik_1980_f_1_exact(a,b,r,alphas)))
    gk21_count.append(count)
    count = 0
    res = cubature(genz_malik_1980_f_1, a=a, b=b, args=(r, alphas), rtol=tol, atol=tol,
                   rule="gk15")
    gk15_err.append(np.abs(res.estimate - genz_malik_1980_f_1_exact(a,b,r,alphas)))
    gk15_count.append(count)
    count = 0
    res = cubature(genz_malik_1980_f_1, a=a, b=b, args=(r, alphas), rtol=tol, atol=tol,
                   rule="trapezoid")
    trapezoid_err.append(np.abs(res.estimate - genz_malik_1980_f_1_exact(a,b,r,alphas)))
    trapezoid_count.append(count)
    count = 0
    res = cubature(genz_malik_1980_f_1, a=a, b=b, args=(r, alphas), rtol=tol, atol=tol,
                   rule="genz-malik")
    genz_malik_err.append(np.abs(res.estimate - genz_malik_1980_f_1_exact(a,b,r,alphas)))
    genz_malik_count.append(count)

plt.loglog(gk21_err, gk21_count, "-.", label="cubature: gk21")
plt.loglog(gk15_err, gk15_count, "-o", label="cubature: gk15")
plt.loglog(trapezoid_err, trapezoid_count, "-v", label="cubature: trapezoid")
plt.loglog(genz_malik_err, genz_malik_count, "-p", label="cubature: genz_malik")
plt.xlabel("Function Evaluations")
plt.ylabel("Error")
plt.legend()
plt.show()

@j-bowhay Thanks for the benchmarks ! I've added in a comparison against stevengj/cubature and nquad below.

I've also additionally measured the number of points at which f is evaluated at and the time it took on my machine. Since the new code and stevengj/cubature are both vectorized, steveng/cubature uses less calls f(x) but over the course of all the calls, the sum of len(x) is higher. nquad is not vectorized, so the number of function evaluations and points used are the same.
The graphs are a bit oddly shaped, but I think this is a consequence of approximate error estimation. Reducing the tolerance might have made the library choose a better interval for subdivision just by luck. For all the libraries, often the actual error is several orders of magnitude better than the requested tolerance.
Here is the modified code: https://gist.github.com/ollybritton/24b6fb6b54217667064c2508d829b983.
It does indeed fail to convege using trapezoid and for all but the weakest tolerance using genz-malik (res.status == "not_converged").
I've also tried to run a similar benchmark for a 4-D integral over $[0, 10]^4$. The new cubature takes a long time but eventually returns when using gk15, gk21 or genz-malik. I'm struggling to bench steveng/cubature since it is producing segfaults and nquad didn't return anything in time. Reducing the bounds to $[0, 1]^4$ gives the following results:

(steveng/cubature was only tested for tolerances from $10^{-3}$ to $10^{-5}$ since otherwise it was using too much memory, and I have also ommited trapezoid here completely).
I agree about not including trapezoid, and even think that given genz-malik's poor performance it might not be worth including that either. They could always remain private for now and then if the Rules API were to be made public, people
could use them that way.

Thanks for the feedback! I've addressed this in the latest commits, added some more asv benchmarks and also improved some of the documentation. Should hopefully be almost ready now!

congrats 🎉 !

Well done on having your code merged Olly I know you've been working hard all summer :)


Add the possibility to save a profile

Hi, great piece of software and exactly what I've been looking for. As a feature request, I am asking to add a functionality to store and restore profiles. Thanks!

What I do as a workaround copy the .config/karabiner/karabiner.json to .config/karabiner/karabiner.json.otherconfig and back when needed.

I've taken @orkoden suggestion one further and made aliases in my .bash_profile file.  Then from the command line, I can switch profiles by typing the name of the user of my keyboard.
alias walt='cp ~/.karabiner.d/configuration/karabiner.json.walt ~/.karabiner.d/configuration/karabiner.json'
alias bo='cp ~/.karabiner.d/configuration/karabiner.json.bo ~/.karabiner.d/configuration/karabiner.json'

It seems this has been added in the latest version finally


Update to Envoy 1.11.1

Hello Envoy Community,
The Envoy security team would like to announce the forthcoming release of Envoy 1.11.1.
This release will be made available on Tuesday, the 13th of August 2019 at 10:00 PDT (17:00 GMT). This release will fix 5 security defect(s), all of them considered HIGH severity.
No further details or patches will be made available in advance of the release.

We will be doing a contour 0.14.2 release to match, we also need to include that change in master and 0.15 when it ships.

Fixed #1323 #1324


Allow to change batchExecutor's batchSize via command line

Currently the import/export tasks are executed in parallel in batches of 50:
https://github.com/jloosli/node-firestore-import-export/blob/6977df5972cf84c8ef9ca6c527f57b2aad1f722b/src/lib/firestore-helpers.ts#L47
This number can't be changed via command line, only by modifying the source code.
50 is too large for my computer - the export task times out and fails. Changing it to 5 fixes the issue for me. It would be nice to have an option to control this number without having to fork the package.

Changing it to 5 fixes the issue for me.

That wasn't true. I was probably just lucky that time. In fact, batchExecutor doesn't do its job at all, see https://github.com/jloosli/node-firestore-import-export/pull/346.
The issue is still relevant, though. Once it works, it can be useful to control the batch size limit via command line.


android Semantic segmentation

Hello,
can tensorflow for android be used for semantic segmentation?
Thank you
Lafi

i want to ask the same question ?
@tensorflowbutler
System information

**Have I written custom code : No
**OS Platform and Distribution : windows 10
**TensorFlow installed from binary
**TensorFlow version :1.6
Python version: 3
**Bazel version *:N/A
CUDA/cuDNN version: cuda 9 - cudnn 7
GPU model and memory: geforce gtx 960 - 4 GB
Exact command to reproduce: N/A

This question is better asked on  StackOverflow since it is not a  bug or feature request. There is also a larger community that reads questions there. Thanks!


convert testTwoDomainsManagedByOneOperatorSharingPV in ItOperatorTwoDomains.java to Junit5

convert testTwoDomainsManagedByOneOperatorSharingPV in ItOperatorTwoDomains.java from Junit4 to Junit5
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/993/

@xiancao have you looked into any existing tests which are using two domains to see if you can change those domains for this test?


removed "Bridge" namespacing

As we discussed I removed the Bridge namespacing. It is a "break change" though. So I added the change to the readme.md, updated to version 2.0. Up to you if you want to include this now.
Thought I needed to change something for delta decorations in the minimap. I didn't, it is already possible. That is why I made this change as well. No need to update (if you agree), but perhaps you can use it when you will make some other changes.

Hi @MarijnPessers. Hope you're well.
As it would be harder to pull this PR after other commits in the repo, I've made the same changes manually. They're available in v2.0.0. So, I'm closing this PR as added. Thanks a lot.


Public visdom server for sharing

Wouldn't it be nice to have a public visdom server where anyone can add .json files from their projects and share to others? With stars and comments... Clearly, it'll help people to see the best scenarios of how others use visdom in real projects. We can already share files with -readonly flag option set. It was only the first step in sharing visdom to people.
I think Facebook can provide a server or two for this matter :)
PS. I'd ask this question on a forum if you had one :)

Indeed it sounds nice, however it relies on someone being interested in creating, hosting, and maintaining this visualization sharing site. At the moment I don't know anyone here with the interest and bandwidth to do that. Last I checked on this (#78) the role of visdom as research project tooling rather than a product has not changed.
Community adoption is a strong driver of this decision, and at the moment it's very hard for us to measure that. (I realize a forum would be useful for that as well, but it's also something I don't have the bandwidth to investigate at the moment).


What are all the values for neovim.mode?

in when expressions?

https://github.com/asvetliakov/vscode-neovim/blob/d366766f397954078e5b9eeb01532913fb90b48f/src/mode_manager.ts#L34-L44
There are the obvious ones here, insert, visual, normal.
There is however the possibility for others like select and replace, depending if nvim sends them.
You can reopen if your question was not answered.

Oops, it looks like I gave you a completely wrong response. Will investigate further, sorry.

The best I can find is :help vim-modes. It looks like the extension uses the mode directly sent from neovim, but I don't know where the reference for that api is.
I think I found a good reference here though:
https://github.com/asvetliakov/vscode-neovim/blob/d366766f397954078e5b9eeb01532913fb90b48f/src/test/utils.ts#L7-L26

@theol0403 has provided completed list. Also i may be wrong but vim/neovim allows to define custom modes too

@theol0403 has provided completed list. Also i may be wrong but vim/neovim allows to define custom modes too


Authorization Manager - Failed ( microsoft/dynamics-nav:generic)

Evening
I am trying to do a:
docker run -e accept_eula=Y -v C:\Users\Palle\Desktop\NAV2015u38:c:\navdvd microsoft/dynamicsnav:generic
The installation seems to start but unfortunately I am getting an error:
Installing NAV
Starting Local SQL Server
Starting Internet Information Server
Installing Url Rewrite
Installing Report Viewer
Installing OpenXML
Copying Service Tier Files
Copying Web Client Files
Copying Windows Client Files
Copying PowerShell Scripts
Copying UpgradeToolKit
Copying ClientUserSettings
Copying ReportBuilder
AuthorizationManager check failed.
Any Idea what could be wrong?
Thanks
Palle

What is the exact docker run command?
Long shot: It might be because the folder with the NAVDVD is on your desktop, which might have permissions.

docker run -e accept_eula=Y -v C:\nav2015:c:\navdvd microsoft/dynamicsnav:generic
Unfortunately was the problem not solved by unpacking the DVD to a new folder.
I have tried upper/lowercase foldername (just to see if it changed anything - it didn't),

There is nothing called microsoft/dynamicsnav:generic
it is called microsoft/dynamics-nav:generic, which I assume you must be using, else you wouldn't get that far. Did you try to follow some of the troubleshooting items on my blog to see if you can run basic WindowsServerCore containers?
Thanks

Just for curiosity, the same error message (AuthorizationManager check failed) can be seen here #128 as well.

The missing dash (-) was a copy/paste issue from my commandline. It's there!
I am running the the command elevated as administrator.
I have tried your troubleshooting guide: no 1, 3, 4, 7 with no problems. WIndowsServerCore works quite fine.
I have tried NAV2015 update (37,35,34,30)
Furthermore I have tried NAV 2017 Update 13 in either case the Docker log says:
Installing NAV
Starting Local SQL Server
Starting Internet Information Server
Installing Url Rewrite
Installing Report Viewer
Installing OpenXML
Copying Service Tier Files
Copying Web Client Files
Copying Windows Client Files
Copying PowerShell Scripts
Copying UpgradeToolKit
Copying ClientUserSettings
Copying ReportBuilder
AuthorizationManager check failed.

Are you running Windows 10?
have you tried to insert -m 4G to give the container 4GB memory?

Yes! -m 4G same error its only the generic image that giving me the troubles.
Just tried:
docker pull microsoft/dynamics-nav:2017-cu13-dk
docker run --rm --name nav2017u13 -h nav2017u13 -e accept_eula=Y -m 4G -e clickonce=Y -e usessl=N -e username="admin" -e password="Passw0rd" microsoft/dynamics-nav:2017-cu13-dk
which works nicely.

I just tried the generic which works fine here.
Any chance that you could try another machine?

Is the machine domain-connected?

http://tgnp.me/2011/09/powershell-authorizationmanager-check-failed-resolution/
– Occasionally, with the ExecutionPolicy set to “RemoteSigned” or “Unrestricted”, this error may occur if the script was downloaded from the internet using Internet Explorer and IE has “blocked” the file. Right-click the file, select “Properties” and click “Unblock”.
Did you unblock the NAVDVD zip file?

YES!!!
As Freddy 🥇  pointed out, the image zip-files is blocked before it was unzipped.
What I did was: unblocked the file, unzipped the filed, unzipped the DVD to C:\NAV2015 (and C:\NAV2017) and then I tried to do a:
docker run -e accept_eula=Y -e usessl=N -m 4G -v C:\NAV2015:c:\navdvd microsoft/dynamics-nav:generic (and C:\NAV2017)
They both works!!! THANKS a LOT!!!
The spin-up took merely 103 seconds. I am amazed!
And yes in order to do a: install-module navcontainerhelper -force in powershell I had to do a
Set-ExecutionPolicy RemoteSigned (also in powershell)
which seems to have gotten me into this mess.
Have a great evening
Palle


It take more than 20 minutes to install ruby after the tar ball is downloaded

I'm trying to install ruby with ruby-build standalone on my Ubunto 14.04 machine. The tar ball is downloaded quite fast but after that it take like forever to install ruby 2.3.0. I tried to remove and reinstall it and at the time of writing this post it more than 20 mins already.
I'm wondering is there any FLAG to print out the progress or at least the log so I could now that it is not hang?

I'm sorry it seems like this is totally normal. Log will be printed out with the  -v flag. I just didn't expect that the build will take that long.