Python | Print prime no between 1 to 100 This is an example of how to print all prime numbers between 1 and 100 using for loop. A prime number is a natural number greater …

Last updated 4 years, 5 months ago | 2978 views

Tags:- Python

Python | Encrypt and Decrypt using AWS KMS key in python with boto3 This is an example of how to encrypt and decrypt a text using the AWS KMS key. In this, we will use …

Last updated 4 years, 5 months ago | 4618 views

Tags:- Python Boto3 AWS KMS

Python | Get an AWS KMS Key description in python with boto3 The describe_key() function is used to get the key description. It takes KeyArn and returns a dictionary having KeyMetadata. These are some necessary items …

Last updated 4 years, 5 months ago | 2458 views

Tags:- Python Boto3 AWS KMS

Python | get all keys from AWS KMS in python with boto3 This is an example of how we can get all the CMK(Customer Master Key) from AWS KMS.  To get all keys from AWS …

Last updated 4 years, 5 months ago | 3463 views

Tags:- Python Boto3 AWS KMS

Django | Delete records in Django models Delete query performs an SQL delete query on all rows in the queryset and returns the number of objects deleted and a dictionary with the number of deletions …

Last updated 4 years, 7 months ago | 2201 views

Tags:- Django

Git add | add files to git This command adds the working directory changes to the staging area. It allows to include the updates to a particular file in the next commit. Git add doesn't affect …

Last updated 4 years, 7 months ago | 2251 views

Tags:- Git

Git init | Initialize a local Git repository The git init command creates a new Git repository in local. This is usually the first command you will run before working on a new project. git …

Last updated 4 years, 8 months ago | 1930 views

Tags:- Git

Git | git status to check the status of the current branch The git status command displays all the necessary information about the working directory and the staging area. git status It displays information like: …

Last updated 4 years, 8 months ago | 2001 views

Tags:- Git

Git | git checkout to Switch branch Git checkout is mostly used for switching from one branch to another. It is also used to check out files and commits. Switch to a branch This command …

Last updated 4 years, 8 months ago | 2069 views

Tags:- Git

Git | Git branch command to create, list, and delete git branch command is used to create a new branch, list all branches, and delete a branch. Branches allow developers to work on the same project …

Last updated 4 years, 8 months ago | 2262 views

Tags:- Git

Git clone | clone git repository Git clone command creates a local copy of the existing source code from a remote repository. git clone ssh://[email protected]/<username>/<repository-name>.git To clone a project from Github:  Click on the green button …

Last updated 4 years, 8 months ago | 2226 views

Tags:- Git

Django | Insert record in database using create() function create() create(**kwargs) Create function create a new object with the given `kwargs`, saving it to the database and returning the created object. It creates an object …

Last updated 4 years, 8 months ago | 1919 views

Tags:- Django

Django | order_by query set, ascending and descending order_by() The order_by function is used to sort the result-set in ascending or descending order. Ascending Order The order_by function sorts the records in ascending order by …

Last updated 4 years, 8 months ago | 2216 views

Tags:- Django

Python | Get the first 5 words from a string This can be done by using the `split()` and `join()` methods >>> massage = 'Today is a sunny day but tomorrow it might rain' >>> …

Last updated 4 years, 8 months ago | 3049 views

Tags:- Python

Django | Overriding the save method The save method is inherited from models.Model class. It is used to override the save method before storing the data in the database. This is used when there is …

Last updated 4 years, 9 months ago | 2628 views

Tags:- Django