2 weeks

Internationalization and Localization with Django



Django offers full internationalization and localization support. It allows you to translate your application into multiple languages and it handles locale-specific formatting for dates, times, numbers, and timezones. Internationalization (frequently abbreviated to i18n) is the …


Read more · 13 min


2 weeks, 1 day

Django Sessions



Django provides a session framework that supports anonymous and user sessions.  Session data is stored on the server side, and cookies contain the session ID unless you use the cookie-based session engine. The session …


Read more · 4 min


2 weeks, 3 days

APACHE KAFKA



Apache Kafka is a distributed data store optimized for ingesting and processing streaming data in real-time. Streaming data is data that is continuously generated by thousands of data sources, which typically send the data …


Read more · 14 min


2 weeks, 5 days

Class method vs Static method in Python



Class methods are methods that are called on the class itself, not on a specific object instance. Therefore, it belongs to a class level, and all class instances share a class method. A class method is …


Read more · 8 min


2 weeks, 5 days

Python property() Function



Python’s property() is the Pythonic way to avoid formal getter and setter methods in your code. This function allows you to turn class attributes into properties or managed attributes. Since property() is a built-in function, you can use it without …


Read more · 11 min


3 weeks, 3 days

Multi-Version Concurrency Control



Multi-version concurrency control (MVCC) is currently the most popular transaction management scheme in modern database management systems (DBMSs). Although first proposed in 1978 MIT Ph.D. dissertation, it is used in almost every major relational …


Read more · 12 min


3 weeks, 4 days

Matplotlib In Python



Matplotlib is one of the most popular Python packages used for data visualization. It is a cross-platform library for making 2D plots from data in arrays. Matplotlib is written in Python and makes use …


Read more · 10 min


3 weeks, 4 days

Pandas in Python



Pandas is an open-source Python Library providing high-performance data manipulation and analysis tool using its powerful data structures. The name Pandas is derived from the word Panel Data – an Econometrics from Multidimensional data. Pandas …


Read more · 19 min


3 weeks, 5 days

NumPy in Python



NumPy stands for ‘Numerical Python’. It is a package for data analysis and scientific computing with Python. NumPy uses a multidimensional array object, and has functions and tools for working with these arrays. The …


Read more · 14 min


4 weeks, 1 day

Generating QR Codes and Barcodes in Python



QR code (quick response code) is a type of matrix barcode (or two-dimensional barcode) invented in 1994 by the Japanese automotive company Denso Wave. In practice, QR codes often contain data for a locator, identifier, …


Read more · 11 min


1 month

Bit Manipulation



Computers represent all data internally as sequences of bits. Each bit can assume the value 0 or the value 1. The bitwise operators are used to manipulate the bits of integral operands both signed …


Read more · 45 min


1 month

Bit Tricks for Competitive Programming



Competitive Programming is a mental sport that enables you to code a given problem under provided constraints. The aim of competitive programming is to write source code of computer programs which are able to …


Read more · 31 min


1 month

Dynamic Programming



Dynamic programming is an optimization approach that transforms a complex problem into a sequence of simpler problems; its essential characteristic is the multistage nature of the optimization procedure. More so than the optimization techniques …


Read more · 9 min


1 month

Graph Data Structure And Algorithms



Graph theory may be said to have its beginning in 1736 when EULER considered the (general case of the) Königsberg bridge problem: Does there exist a walk crossing each of the seven bridges of …


Read more · 36 min


1 month

Topological Sorting



Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge u v, vertex u comes before v in the ordering. Topological Sorting for a graph …


Read more · 18 min


1 month

Coding Patterns: Two Pointers Technique



Two pointers pattern is typically used for searching pairs in a sorted array. Given a sorted array nums (sorted in ascending order), having N integers, find if there exists any pair of elements (nums[i], nums[j]) such …


Read more · 7 min


1 month

Coding Patterns: Two Heaps



What is a Heap?                            

A heap is a special Tree-based data structure in which the tree is a complete Binary Tree in …


Read more · 18 min


1 month

Coding Patterns: K-way Merge



In computer sciencek-way merge algorithms or multiway merges are a specific type of sequence merge algorithms that specialize in taking in k sorted lists and merging them into a single sorted list. …


Read more · 17 min


1 month

Coding Patterns: Top K Numbers



 Top K numbers pattern is very useful to solve the problems that ask us to find the top / smallest / frequent K elements among a given set.

If the problem asking us to find the top / smallest / frequent K elements among a given set, we …


Read more · 8 min


1 month

Coding Patterns: Modified Binary Search



Binary Search Tree is a node-based binary tree data structure that has the following properties:

  • The left subtree of a node contains only nodes with keys lesser than the node’s key.
  • The …


Read more · 9 min


1 month

Coding Patterns: Subsets



Set A is said to be a subset of Set B if all the elements of Set A are also present in Set B. In other words, set A is contained inside Set B. 


Read more · 11 min


1 month, 1 week

Coding Patterns: Cyclic Sort



Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array.  Cycle sort …


Read more · 18 min


1 month, 1 week

Coding Patterns: Depth First Search



Depth-first search is an algorithm for traversing or searching tree or graph data structures. Extra memory, usually a stack, is needed to keep track of the nodes discovered so far along a specified branch which …


Read more · 15 min


1 month, 1 week

Coding Patterns: Breadth First Search



Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at …


Read more · 22 min


1 month, 1 week

Coding Patterns: In-place Reversal of a Linked List



We will introduce in-place reversal of a linked list pattern, which is very useful to solve the problems involving reversal of a Linked List with the constraint that we need to do it in-place without using extra memory.


Read more · 14 min


1 month, 1 week

Coding Patterns: Merge Intervals



1. Brute Force Approach

simple approach is to start from the first interval and compare it with all other intervals for overlapping, if it overlaps with any other interval, then remove the other interval …


Read more · 9 min


1 month, 1 week

Coding Patterns: Fast & Slow Pointers



The fast and slow pointer technique (also known as the tortoise and hare algorithm) uses two pointers to determine traits about directional data structures. This can be an array, singly-linked list, or a graph. …


Read more · 11 min


1 month, 1 week

Coding Patterns: Sliding Window



The Sliding window is a problem-solving technique that aims to reduce the use of nested loop and replace it with a single loop, thereby reducing the time complexity. These problems are easy to solve …


Read more · 10 min


1 month, 1 week

Applications of String Matching Algorithms



String matching strategies or algorithms provide a key role in various real-world problems or applications. A few of its imperative applications are Spell Checkers, Spam Filters, Intrusion Detection System, Search Engines, Plagiarism Detection, Bioinformatics, Digital …


Read more · 17 min


1 month, 1 week

Analysis of Algorithm



When analyzing algorithms, recall that we only care about asymptotic behavior. Recursive algorithms are no different. Rather than solve exactly the recurrence relation associated with the cost of an algorithm, it is enough to …


Read more · 34 min


1 month, 1 week

Pattern Searching Algorithms




Pattern Searching algorithms are also known as String Searching Algorithm, which is  used to find a pattern or substring from another bigger string. There are different algorithms. The main goal to design these …


Read more · 11 min


1 month, 2 weeks

Z Algorithm



Z algorithm is an algorithm for searching a given pattern in a string, which is an efficient algorithm as it has linear time complexity. It has a time complexity of O(m+n), where m is …


Read more · 20 min


1 month, 2 weeks

Knuth–Morris–Pratt Algorithm for Pattern Searching



Knuth Morris Pratt (KMP) is an algorithm, which checks the characters from left to right. However, at whatever point a mismatch happens, it utilizes a preprocessed table called "Prefix Table" to skip characters examination …


Read more · 17 min


1 month, 2 weeks

Rabin–Karp algorithm



Rabin–Karp algorithm or Karp–Rabin algorithm is a string-searching algorithm created by Richard M. Karp and Michael O. Rabin in 1987 that uses hashing to find an exact match of a pattern string in a …


Read more · 19 min


1 month, 2 weeks

Trie of all Suffixes



Tries


A trie, pronounced “try” and also called digital tree or prefix tree, is a special data structure used to store strings that can be visualized like a graph. Comes from …


Read more · 14 min


1 month, 2 weeks

Manacher’s Algorithm



 

Manacher's algorithm is used to find the longest palindromic substring in linear time. It is required to solve sub-problems of some very hard problems. The problem statement it solves is: Given a string …


Read more · 26 min


1 month, 2 weeks

Searching Algorithms




Searching algorithms are used to find a specified element within a data structure. Numerous different searching algorithms exist, each of which is suited to a particular data structure of format of data. …


Read more · 32 min


1 month, 2 weeks

Suffix Array



 

A suffix array is a sorted array of all suffixes of a given string. After sorting the suffixes in lexicographical order, we can get the suffix array. Suffix arrays can also be formed …


Read more · 8 min


1 month, 3 weeks

Amortized Analysis



 


In computer science, amortized analysis is a method for analyzing a given algorithm's complexity, or how much of a resource, especially time or memory, it takes to execute. The motivation for …


Read more · 10 min


3 months, 3 weeks

Link-Based vs. Array-Based Sequences



 

Advantages of Array-Based Sequences

• Arrays provide O(1)-time access to an element based on an integer index. The ability to access the kth element for any k in O(1) time is …


Read more · 4 min


3 months, 4 weeks

Fibonacci Sequence



The Fibonacci sequence is a series of numbers in which each number is the sum of the two that precede it. Starting at 0 and 1, the sequence looks like this: 0, 1, 1, …


Read more · 9 min


4 months, 4 weeks

Google Foobar Challenge



Recently, I was browsing on the internet and searching for some Python related concepts and then my browser split in half, asking me if I was “up for a challenge”. After a little googling, …


Read more · 33 min


7 months

The operating system Linux



Classification of UNIX/Linux
UNIX is a Multi-User/Multi-Tasking operating system and exists in many different versions:Solaris, AIX, XENIX, HP-UX, SINIX, Linux.
Operating System (OS): Sum of all programs which are required to operate …


Read more · 23 min


7 months, 1 week

Multithreading with Netmiko




Multithreading enables CPUs to run different parts(threads) of a process concurrently. The threading module comes with the standard Python library. 

Automation of networking is always comes with scale requirement, manage or …


Read more · 6 min


7 months, 1 week

What is Ansible?




Ansible has become a widely adopted tool for application deployment and infrastructure automation projects since its first release in early 2012. It is primarily intended for IT professionals, who use it for …


Read more · 12 min


7 months, 1 week

Network Security Using The Firepower APIs



 

 

Network Security protects your network and data from breaches, intrusions and other threats, which involves access control, virus and antivirus software, application security, network analytics, types of network-related security (endpoint, web, wireless), …


Read more · 8 min


7 months, 1 week

Automating AWS Cloud Networking Infrastructure



 

 

When dealing with AWS programmatically using the boto3 SDK, we will use two different credentials, an Access Key ID and a Secret Key, to authenticate against the API.You can install the newest …


Read more · 7 min


7 months, 2 weeks

Meraki Dashboard API Python Library




The Meraki Dashboard API Python library provides all current Meraki Dashboard API calls to interface with the Cisco Meraki cloud-managed platform. 


You can install it via PyPI:


Read more · 17 min


7 months, 2 weeks

RESTCONF and requests



One major drawback of NETCONF is its rather unmodern reliance on Extensible Markup Language (XML) as the language of choice for describing the data as well as the operations you want to carry out. …


Read more · 16 min


7 months, 2 weeks

Automating Your Network Tests and Deployments with pyATS and Genie



 

While pyATS and Genie are technically two libraries that pyATS is responsible for device connectivity, test definition, and reporting, and Genie is responsible for high-level capabilities such as parsing command-line interface (CLI) output …


Read more · 10 min


7 months, 2 weeks

NETCONF Protocol – Network Configuration Protocol




The Network Configuration Protocol (NETCONF) is a network management protocol allowing a network management system (NMS) to deliver, modify, and delete configurations of network devices. Standard application programming interfaces (APIs) are available …


Read more · 15 min


7 months, 2 weeks

NAPALM




NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support) is a Python library that implements a set of functions to interact with different router vendor devices using a unified API.


Read more · 13 min


7 months, 3 weeks

Configuring Network Devices Using Netmiko



 

Netmiko, developed by Kirk Byers, is an open source library designed to simplify SSH management across a wide range of network devices from various vendors including Cisco, Arista, and Juniper Networks. Netmiko is …


Read more · 17 min


7 months, 3 weeks

Connecting to Network Devices via SSH Using Paramiko



 

When administrating IT devices from a remote location, be it network equipment or servers, SSH has become the standard. With its secure transport and various authentication methods, it's a safe choice that is …


Read more · 13 min


7 months, 4 weeks

TCP/IP Networks



 

 

TCP stands for Transmission Control Protocol a communications standard that enables application programs and computing devices to exchange messages over a network. It is designed to send packets across the internet and …


Read more · 11 min


7 months, 4 weeks

Programming with Sockets



 

Python provides a good coverage on the low-level networking interface. It all starts with BSD(Berkeley Software Distribution) socket interface. As you can assume, Python has a socket module that gives you the necessary …


Read more · 28 min


8 months

IP and DNS



The IP address labels a machine's network interface with a numeric identifier, which also identifies the location of the machine, albeit with limited reliability. Domain Name System (DNS) is a core network service that maps …


Read more · 15 min


8 months

Interacting with Remote Systems



• Accessing SSH terminals with paramiko                         
• Transferring files through SFTP                  …


Read more · 9 min


8 months

Engaging with E-mails



 

E-mail is one of the most popular ways of digital communication. Python has a rich number of built-in libraries for dealing with e-mails.


The mail that you send from your …


Read more · 12 min


8 months, 1 week

Object-oriented programming



 

"Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of attributes, and code, in the form of functions known as methods. …


Read more · 15 min


8 months, 1 week

A Handy Security Checklist



 

-Don't trust data from a browser, API, or any outside sources: This is a fundamental rule. Make sure that you validate and sanitize any outside data.

-Don't keep SECRET_KEY in version control: As …


Read more · 5 min


8 months, 1 week

Deployment



Once you have a working website or reusable app, you will want to make it public. Deploying websites is one of the most difficult activities of development with Django, because there are lots of …


Read more · 13 min


8 months, 2 weeks

Why asynchronous?



 

Like most WSGI-based web frameworks, Django is synchronous. When a client
requests a web page, the request reaches Django through a view and passes through
various lines of code until the …


Read more · 12 min


8 months, 2 weeks

Testing



 

There are many different kinds of tests, so many, in fact, that companies often have a dedicated department, called quality assurance (QA), made up of individuals who spend their day testing the software the …


Read more · 8 min


8 months, 2 weeks

The collections module



The collection Module in Python provides different types of containers. A Container is an object that is used to store different objects and provide a way to access the contained objects …


Read more · 2 min


8 months, 3 weeks

Descriptors



 Descriptors are the basis of complex attribute access in Python. They are used internally to implement properties, methods, class methods, static methods, and super. They are objects that define how attributes of another class can be accessed. …


Read more · 2 min


8 months, 3 weeks

Structural Pattern Matching



Structural pattern matching introduces a match statement and two new soft keywords: match and case. As the name suggests, it can be used to match a given value against a list of specified "cases" …


Read more · 5 min


8 months, 3 weeks

Secrets Module




The nature of random numbers generated by the random module is sufficient for statistical purposes. It uses the 
Mersenne Twister pseudorandom number generator. It has a known uniform distribution and a long enough …


Read more · 2 min


8 months, 3 weeks

Formatting strings with f-strings




F-strings, also known as formatted string literals, are one of the most beloved Python features that came with Python 3.6. Introduced with PEP 498, they added a new way of formatting strings. 

Using …


Read more · 3 min


8 months, 3 weeks

Type-hinting Generics



 

Type-hinting annotations allow you to annotate variable, argument, and function return types with type definitions. These type annotations serve documentational purposes, but can also be used to validate your code using external tools. 

There …


Read more · 1 min


8 months, 3 weeks

Graphlib Module



 

A graph is an ordered pair G=(V,E), where Vis a finite set and E ⊆ VxV. The elements of V are called nodes or vertices,and the elements of E are called edges.


Read more · 3 min


8 months, 3 weeks

Assignment expressions




Expressions and statements are the key building blocks of almost every programming language. The difference between them is really simple: expressions have a value, while statements do not.

Think of statements as consecutive …


Read more · 1 min


8 months, 3 weeks

zoneinfo module




Python, starting from version 3.9, makes access to the information regarding current 
and historical time zones easier than ever. The Python standard library provides a 
zoneinfo module that is an …


Read more · 2 min


8 months, 3 weeks

Positional-only parameters



There are two ways in which function arguments can be provided to functions:
• As a positional argument
• As a keyword argument

def concatenate(first: str, second: str, delim: str):  …


Read more · 2 min


8 months, 3 weeks

Recent Python Language Additions



The majority of the changes are related to Python's standard library, the CPython interpreter, the Python API, and CPython's C API.

In terms of the two latest versions of Python, we can distinguish …


Read more · 6 min


8 months, 3 weeks

Productivity Tools



Probably the most flexible productivity tool of all time will be Bash together with common standard utilities found in every POSIX and UNIX-like operating system. Knowing them all thoroughly is probably impossible for an …


Read more · 2 min


8 months, 3 weeks

Containerization versus virtualization



 

There are two main ways that system-level isolation techniques can be used for development purposes:

• Machine virtualization, which emulates the whole computer system

• Operating system-level virtualization, known also …


Read more · 2 min


8 months, 3 weeks

Poetry as a dependency management system



 

Poetry is quite a novel approach to dependency and virtual environment management in Python. It is an open-source project that aims to provide a more predictable and convenient environment for working with the Python packaging ecosystem.


Read more · 3 min