--- myst: substitutions: bloc: python: 6-16 cpp: 6-16 --- # Simple example The following piece shows how to generate a sample using the `TSampling` class. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/sampler/bloc_codes_chapter/" + language + "/example." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc[language] + "\n" + "```" }} **Generation of a {{doe}} with stochastic attributes** 1. Generating a uniform random variable in [3., 4.] 2. Generating a gaussian random variable with a mean of 0.5 and a standard deviation of 1.5 3. Construct the sampler object requesting a sample of 1000 events, using the Lhs algorithm. 4. Method to generate the sample. 5. Draw the plot as the right side of {numref}`sampler_srs_and_lhs_plot`