A video is a sequence of images (called frames). This article will discuss how to create a video from images using Python. We will discuss three methods of doing this:
Continue readingCategory Archives: Python
Install urllib2 for Python 3
A short answer (TL;DR): urllib2 is a built-in library in Python 2 that has been replaced with the urllib package in Python 3. The urllib module comes pre-installed in Python 3; therefore, you don’t have to install it.
Continue readingGet the Size of a NumPy Array in Python
You can see this topic in two ways – determining the number of elements in a NumPy array or getting the memory size of the array. Let’s discuss this two.
Continue readingConvert XLSX to CSV in Python
XLSX is a file extension for Microsoft Excel spreadsheets, while CSV is a Comma-Separated Value file.
Continue readingCheck for Palindrome Using Python
A sequence (string/number/phrase) is said to be a palindrome if the sequence reads the same backward as forward. For example, madam, civic, refer, 14541, and level.
Continue readingAsk a Question in Python
Asking questions in Pyhton entails asking a question and accepting an answer from the user.
Continue reading__file__ is not defined in Python
The dunder __file__ is a variable that stores the path to the Python module/script being imported (executed). It is generated when the actual module or script is executed.
Continue readingString Builder in Python
Let’s start with Java language. Strings in Java, by default, are immutable – objects whose state cannot be modified after it is defined. The opposite of an immutable object is mutable.
Continue readingSet Environment Variable in Python Script
All environment variables (both system and user variables) can be assessed on the os.environ attribute in Python.
The attribute returns a dictionary of all environment variables with keys as the variable names and values as environment values. The resulting dictionary supports all the operations of a native Python dictionary.
Continue readingRemove Punctuation with NLTK in Python
When working on an NLP project, removing punctuation marks from text data is a crucial pre-processing step to filter useless data (punctuation marks are not valuable for the most part).
Continue reading