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 2 weeks, 3 days ago | 33 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 2 weeks, 6 days ago | 26 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 3 weeks ago | 45 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 3 weeks ago | 49 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 3 weeks, 1 day ago | 45 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://git@github.com/<username>/<repository-name>.git To clone a project from Github:  Click on the green button …

Last updated 3 weeks, 2 days ago | 37 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 3 weeks, 3 days ago | 35 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 3 weeks, 3 days ago | 42 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 3 weeks, 5 days ago | 31 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 2 months ago | 123 views

Tags:- Django

Python | Insert and Get data from an index in Elasticsearch To do so we need to import the Elasticsearch package and create an instance of that by providing the host and port. >>> from elasticsearch …

Last updated 2 months, 1 week ago | 141 views

Tags:- Python Elasticsearch

Python | Program to count the number of words in a string split() and len() method is used to get the number of words in a string. The split() method split a string into a list …

Last updated 2 months, 1 week ago | 90 views

Tags:- Python

CSS | Gradient Text There are three different CSS properties required to add a gradient overlay to a text. background-image: <gradient> background-clip: text text-fill-color: transparent background-image: <gradient> <gradient> will replace with any gradient style which …

Last updated 2 months, 1 week ago | 85 views

Tags:- CSS

Python | Ternary Operator python uses an if-else conditional statement in a single line to represent the Ternary Operator. [true] if [expression] else [false] Let's see an example of Ternary Operator a, b = 10, …

Last updated 2 months, 1 week ago | 115 views

Tags:- Python

Python | Create and delete an index in Elasticsearch To use the elastic search we need to import the Elasticsearch package >>> from elasticsearch import Elasticsearch now create an object of Elasticsearch search class by providing …

Last updated 2 months, 1 week ago | 177 views

Tags:- Python Elasticsearch