Python consumes a lot of memory or how to reduce the size of objects?

A memory problem may arise when a large number of objects are active in RAM during the execution of a program, especially if there are restrictions on the total amount of available memory. Below is an overview of some methods of reducing the size of objects, which can significantly reduce the amount of RAM needed … Continue reading Python consumes a lot of memory or how to reduce the size of objects?

Bash for Everyone — Part 1

I’ve divided this post into two parts, first, one will be focused on bash and the second one will be on Unix commands and useful one-liners. Table of Contents Part-1 -- Shell Scripting  Pipelines Bash - Bourne Again Shell Compound Statements Running bash scripts File permissions Part-2 Shell Scripting Shell scripting is a computer programming which … Continue reading Bash for Everyone — Part 1

Introducing Pandas-Sets: Set-oriented Operations in Pandas

I frequently find myself storing standard Python set objects in DataFrame columns. This usually happens when I have some kind of a tags or labels column for each observation. It can also be the output of a groupby operation where the end result needs to be a list-like (or set-like) object before it's aggregated. Using set operations (union, intersection etc.) can come in handy in … Continue reading Introducing Pandas-Sets: Set-oriented Operations in Pandas

Summarize whole paragraph to sentence by Extractive Approach​

To catch a quick idea of a long document, we will always to do a summarization when we read an article or book. In English, the first (or first two) sentence(s) of each article has a very high chance of representing the whole article. Of course, the topic sentence can be the last sentence in … Continue reading Summarize whole paragraph to sentence by Extractive Approach​