Posts

Showing posts from January 28, 2019

Using multiprocessing to preprocess images

Image
1 I am trying to get my feet wet using multiprocessing in python. As such, I am trying to operate an image preprocessing pipeline using multiprocessing. I have all my images in a directory called image_files and I have a list of all the filenames that are inside this directory. I split the list into two chunks a and b and pass each to its own multiprocessing.Process where a method called preprocess_image is doing the preprocessing on each image. Following a tutorial on how to calculate square roots using multiprocessing I came up with a working code (see below). This code works, however, speed matters and I am not sure whether it is appropriate to define two methods doing basically the same or if it would be faster to use only a single method and simply pass a and b to the same target in multiprocessing....

General formula of $lim_{n to infty} (1+a_n)^{b_n}$ where $b_n to infty$

Image
2 $begingroup$ What is the general formula of $$lim_{n to infty} (1+a_n)^{b_n} quad text{where} quad lim_{n to infty} b_n = infty?$$ For example we have $$lim_{nto infty} left(1 + frac1nright)^n = e$$ Now I want a general formula for $lim_{n to infty} (1+a_n)^{b_n}$ . I know if $a_n to A neq 0$ then the answer is infinity. But I am not sure about what will happen when $a_n to 0$ . Maybe the answer is $e^c$ where $c = lim _{n to infty} b_n a_n$ . But even if this is the answer, I want the proof. It seems it must be a famous problem but unfortunately, I couldn't find the answer in math.SE. If an answer exists with proof, please post its link in the comments and I will delete my question. sequences-and-series limits exponential-function exponentiation ...