Types and Programming Languages Part 2 — Exception while handling exception

This is the second part of the Types and Programming Languages series. For your convenience you can find other parts in the table of contents in Part 1 — Do not return in finally Last time we saw what happens when we return in finally and that we shouldn’t do it. Today we explore a … Continue reading Types and Programming Languages Part 2 — Exception while handling exception

Types and Programming Languages Part 1 — Do not return in finally

This is the first part of the Types and Programming Languages series. For your convenience you can find other parts using the links below: Part 1 — Do not return in finally Part 2 — Exception while handling exception Many languages provide exception handling construct, typically in a form of try and catch blocks. While … Continue reading Types and Programming Languages Part 1 — Do not return in finally

RuntimeError: generator raised StopIteration in PySpark in Python 3.7.3

Recently I was debugging this simple PySpark code: First, we get some DataFrame. Next, we collect it to dictionary. It doesn’t matter how you create the dictionary, actually it could be a set or list as well. Finally, we do some filtering with lambda using in operator. I was running this in Python 3.7.3 and … Continue reading RuntimeError: generator raised StopIteration in PySpark in Python 3.7.3

Running Anaconda with DGL and mxnet on CUDA GPU in Spark running in EMR

Today I’m going to share my configuration for running custom Anaconda Python with DGL (Deep Graph Library) and mxnet library, with GPU support via CUDA, running in Spark hosted in EMR. Actually, I have Redshift configuration as well, with support for gensim, tensorflow, keras, theano, pygpu, and cloudpickle. You can also install more libraries if … Continue reading Running Anaconda with DGL and mxnet on CUDA GPU in Spark running in EMR