1 day agoRegular Expression — Python-Part IIIThis is my final post on Regex series. Here are my part I and part II series. We’ll go over groupings, lookahead assertion and search and replace functions in regular expression. Let’s buckle up and dive in! Grouping Groups are marked by ( , ) metacharacters. They have the same meaning…Regex In Python6 min readRegex In Python6 min read
Published in Towards Dev·6 days agoRegular Expression — Python — Part III wrote about Python’s re package which allows us to compile regular expressions into objects and perform matches in the part I of the Regular Expression series. Here, we’ll dive into compilation flags and more pattern powers. Let’s see examples of each of the flags: import re >>> p…Regular Expressions3 min readRegular Expressions3 min read
Published in Python in Plain English·Jan 1Regular Expression— Python — Part IIt’s going to be the end of the year 2022 and I haven’t yet written any article for the month of December. So let’s give a look into Python’s re package’s special characters and interfaces to the Regular Expression RE engine: . (Dot) In default mode, matches any characters except…Regular Expressions5 min readRegular Expressions5 min read
Nov 14, 2022Amdahl’s law and Gustafson’s lawBeen learning more about parallel computing. Amdahl’s law and Gustafson’s law gives us way to evaluate increase in speed based on resources available. First let’s dive into Amdahl’s law. The ratio of how much of our problem is parallel and how much is sequential will dictate the limits of speed…Parallel Computing4 min readParallel Computing4 min read
Nov 7, 2022Global Interpreter Lock in PythonGlobal Interpreter Lock (GIL) is a feature of a Python language and something one must be aware about when trying to use more than one processor of a computer. GIL in a nutshell is a lock that lets only one thread to access Python interpreter at a time. In this…Global Interpreter Lock4 min readGlobal Interpreter Lock4 min read
Published in Nerd For Tech·Oct 24, 2022weakref module in PythonBeen a while, two months and two weeks to be exact, since I wrote the last article. Without further ado, I am writing about weakref module in Python. Let’s dive in. The module allows Python programmer to create weak reference to objects. …Weakreference3 min readWeakreference3 min read
Published in Towards Dev·Aug 8, 2022Software Version SemanticsLabeling software versions had been a mystery till recently when I came across semantic versioning site while reading documentation on FastAPI. Before that the labels were given by a Release Engineer! The Semantic Versioning Specification has formal convention on determining version number of new software releases. Software using this Semantic…Semantic Versioning3 min readSemantic Versioning3 min read
Published in Geek Culture·Jun 21, 2022Modulo operator in PythonIt’s been more than a month, I have not written new learnings. So here I am going to write about modulo operator in Python. Got stumbled by modulo operator for negative numbers. I had come across it once. So here I am listing how modulo operates. A quick primer on…Modulo3 min readModulo3 min read
Published in Python in Plain English·May 8, 2022An Introduction to Dataclass Decorators in PythonSomething new I came across while storing data stream to Python class is Dataclass! Let’s dive in. dataclass is a decorator imported from dataclasses module and generates special methods such as __init__ , __repr__ to user-defined classes. Let’s see an example: On running the file, we get: Generated special…Dataclass3 min readDataclass3 min read
Apr 25, 2022generators in __init__.py file — PythonIf you have come across application directories in python, you must have seen directories converted to packages with __init__.py file. The basic function of the file is to initialize a directory just like in class where we use __init__ method to initialize a class. That was my understanding, until recently…Initialization4 min readInitialization4 min read