Browsing All posts tagged under »python«

Generating randoms from a specified CDF

March 9, 2017

0

This post deals with generating random numbers given a CDF (Cumulative distribution function). CDF may be specified as an analytical function or as a table of values. We also assume that we have a source of pseudo-random uniformly distributed numbers. Probability Integral Transform At the core of this issue is the ‘Probability Integral Transform’.  It states that, […]

Parallel Bulk Image Resizing – Python

June 28, 2016

0

Usually multi-threaded programming can be typically. One typically will need a queue to maintain the inputs. From this thread-safe queue the threads pick an input, act on it and save the result. This can usually take up most of the afternoon depending on the job. This recipe is adapted from [link]. It introduces a way […]