  A well motivated method for demonstrating that an experiment resists any
classical explanation is to show that its statistics violate generalized
noncontextuality. We here formulate this problem as a linear program and
provide an open-source implementation of it which tests whether or not any
given prepare-measure experiment is classically-explainable in this sense. The
input to the program is simply an arbitrary set of quantum states and an
arbitrary set of quantum effects; the program then determines if the Born rule
statistics generated by all pairs of these can be explained by a classical
(noncontextual) model. If a classical model exists, it provides an explicit
model. If it does not, then it computes the minimal amount of noise that must
be added such that a model does exist, and then provides this model. We
generalize all these results to arbitrary generalized probabilistic theories
(and accessible fragments thereof) as well; indeed, our linear program is a
test of simplex-embeddability.
