python

Functional Programming with Python

Reading Time: 4 minutes What is Functional Programming? “Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data”. In other words, functional programming (FP) promotes code with no side effects and immutable variables. It is a declarative type of programming style. Its main focus is on “what to solve” in contrast to an imperative style where the main Continue Reading

How to install python in target host using Ansible

Reading Time: 3 minutes Ansible is an open-source automation engine that automates software provisioning, configuration management, and application deployment. It is quickly becoming the popular configuration management tool today. It lets you to control and config the target nodes from single host machine. As we know the only requirement in target machine is the modern version of python installed. But what if the python version is not installed on Continue Reading

An Introduction to Mako Templates in Python

Reading Time: 3 minutes Introduction to Mako Have you ever worked on a project in Python and thought to yourself, “Gee, it would be nice if I could dynamically generate web pages and/or text and have them directly interact with my program.” Well, you’re in luck because enter Mako templates. Mako is a template library and a Python Sever Page language, allowing content such as HTML, XML, and text Continue Reading

Marshmallow: Easy Serialization in Python

Reading Time: 2 minutes Introduction Marshmallow, stylized as “marshmallow”, is an object-relational mapping library which is used to convert objects to and from Python data types. It is often used alongside SQLAlchemy, an ORM that maps database schemas to Python objects. Marshmallow is often used to deserialize Python dicts to SQLAlchemy models and vice versa. Let’s focus on how to use Marshmallow. Creating Schemas First, we need to create Continue Reading

GitPython: How to use Git with Python

Reading Time: 4 minutes GitPython is a python library used to interact with git repositories. It is a module in python used to access our git repositories. It provides abstractions of git objects for easy access of repository data, and additionally allows you to access the git repository more directly using pure python implementation. Requirements for GitPython Python3 Git GitPython module pip and virtualenv, which come packaged with Python Continue Reading

Running Apache Airflow DAG with Docker

Reading Time: 3 minutes In this blog, we are going to run the sample dynamic DAG using docker. Before that, let’s get a quick idea about the airflow and some of its terms. What is Airflow? Airflow is a workflow engine which is responsible for managing and scheduling running jobs and data pipelines. It ensures that the jobs are ordered correctly based on dependencies and also manages the allocation Continue Reading

Build your first web application using Django

Reading Time: 3 minutes In our previous blog Introduction to Django, we discussed the Django’s features and architecture. In this blog, we will create a web application in Django. For starting a new project, go to the folder where you want your project to be and run the command: django-admin startproject django_proj django-admin Django’s command-line utility for administrative tasks.manage.py is automatically created in each Django project. manage.py does the Continue Reading

Data processing using ML Supervised classification algorithm to find accuracy

Reading Time: 5 minutes Machine learning is an application of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed. Machine learning focuses on the development of computer programs that can access data and use it to learn for themselves. Type of machine learning Supervised learning Unsupervised Learning Reinforcement Learning In Supervised Learning, algorithms learn from labeled data. After understanding Continue Reading

List in Python

Reading Time: 4 minutes In this blog, we are going to discuss the list data structure of python. The list is a collection which is: • Ordered : [1,2] is not equal to [2,1] • Allows duplicate members: [1, 1] is allowed. • Mutable: allows modification of elements of the list after its creation. • Dynamic: allows addition, modification or deletion of elements. The differentiating feature between arrays from Continue Reading