Sampling non-uniform distributions, simulating a nuclear decay detector, and setting a cross-section limit with pseudo-experiments