The New (computer) Testament image
The New (computer) Testament

In 2007, I have translated apoetry about computers and posted on perl monks for fun. Just copy pasting it here, just for fun. Note: Translated to English from a Malayalam …

read more
Django Signals image
Django Signals

Django Signalsallowsdecoupled(independent) applicationsget notified when certain events occur elsewhere in the framework with the help of 'signal dispatcher'. The'signal dispatcher' is Django's mechanism usedto send and receive messages between different …

read more
Create sitemap for static  pages in Django application image
Create sitemap for static pages in Django application

We have both static and dynamic pages in a Django application. How will we add static pages to sitemap? It is very simple. As first step, we have to include …

read more
Introduction to Angular JS image
Introduction to Angular JS

Angular JS is a framework in JavaScript. It is distributed as a JavaScript file and could be included in any HTML page with script tag. The angular JS extends the …

read more
Defining and sending django signals image
Defining and sending django signals

Defining signals class(providing_args=list) All signals areinstances. Theis a list of the names of arguments the signal will provide to listeners. This is purely documentational, however, as there is nothing that …

read more
How this site is built? image
How this site is built?

“We need a website with blog!”That was the call. Thank you for being here. This is the website site for Atemon Technology Consultants LLP. A software engineering firm needs a …

read more
Generators in Python image
Generators in Python

Generators are used to create iterators, but with a different approach. Generators are simple functions which return an iterable set of items, one at a time, in a special way. …

read more
The as-if rule image
The as-if rule

Allows any and all code transformations that do not change the observable behavior of the program. Explanation The C++ compiler is permitted to perform any changes to the program as …

read more
HttpRequest attributes image
HttpRequest attributes

Djangousesrequest and response objectsto pass state through the system. When a page is requested,Djangocreates an HttpRequestobjectthat contains metadata about therequest. Then Django loads the appropriate view, passing theas the first …

read more
Python sort arrays with sorted method image
Python sort arrays with sorted method

Python provides a methodwhich returns the sorted array and will not change the original array, where as with change the array in place. sorted This method sorts the list and …

read more
Concatenate two columns in results of SQL query in PostgreSQL image
Concatenate two columns in results of SQL query in PostgreSQL

Very often, you will have the requirement to concatenate two columns in a table, on the fly in SQL. For example, first name and last name needed to be combined …

read more
How to deal with “SubfieldBase has been deprecated. Use Field.from_db_value instead.” in Python image
How to deal with “SubfieldBase has been deprecated. Use Field.from_db_value instead.” in Python

How to deal with "SubfieldBase has been deprecated. Use Field.from_db_value instead."On upgrade to Django 1.9, we may now get the warning To fix this,you should just removeline and addand As …

read more
Get month name from month number image
Get month name from month number

How can we get the month name from the month number? For instance, if I have 3, I want to return march? Most simple method is to define a function …

read more
Install specific git commit with pip image
Install specific git commit with pip

To install specific git commit with pip, You can specify commit hash, branch name, tag. For the branch name and the tag, you can also install a compressed distribution. This …

read more
Python sort list of dict by calculated value image
Python sort list of dict by calculated value

We often need to sort a list of dictionaries by calculated value. Python's sorted is very powerful so that it can do literally anything with custom key function Assume that …

read more
Get the previous months name image
Get the previous months name

Often we need to get previous months name in python, especially, when we have to save report from previous month's name. In python its is pretty simple. 1. Get first …

read more
Get a file's size with C++ image
Get a file's size with C++

std:: experimental:: filesystem:: file_size (added in C++17) makes thisstraightforward. Returns the size of the regular file, determined as if by reading themember of the structure obtained by POSIX stat(symlinks are …

read more
Git aliases image
Git aliases

The term 'alias' is synonymous with a shortcut. Alias creation is a common pattern found in other popular utilities like `bash` shell. Aliases are used to create shorter commands that …

read more
Python 3 - Django: ImportError: No module named 'django.core.urlresolvers' image
Python 3 - Django: ImportError: No module named 'django.core.urlresolvers'

Python 3 - Django 2.x: ImportError: No module named 'django.core.urlresolvers' is a common error we get when we migrate from python 2.x to python 3.x and use latest Django > …

read more
Create sitemap using Django sitemap framework image
Create sitemap using Django sitemap framework

The sitemap framework is very flexible. We can use it to create sitemap for any item in the database, along with custom configurations. The very basic step is to addto …

read more
Python sort dictionaries(dict) by key or values image
Python sort dictionaries(dict) by key or values

Python dictionaries are key-value pairs. Some times we need to sort the dictionary by key or by value. In both cases we can do it by using the built in …

read more