Create a PostgreSQL Database in Docker

PostgreSQL is a well-known relational DBMS that provides a variety of features, such as built-i

continue

Machine learning models

A machine learning model is defined as a mathematical representation of the output of the training p

continue

Deep learning and Machine learning

Deep learning models are a class of ML models that imitate the way humans process information. The m

continue

Important files from Django to Fastapi

views => controllers & routersurls => routersserializers => schemasmodels => models

continue

Data Science Packages

Deploy Django Project

Step 1: Set Up a Virtual Private Server (VPS)Choose a VPS provider and create a server instance.Conf

continue

retrieve method in Viewsets

def retrieve(self, request, *args, **kwargs): instance = self.get_object() serialize

continue

use paginate and filters in list method

To apply the filter_backends, filterset_class, ordering_fields, serializer_class, and pagination_cla

continue

show “on” or “off” icons for calculated
boolean fields

@admin.register(Hero) class HeroAdmin(admin.ModelAdmin): list_display = ("name", "is_immortal",

continue

run script in django

1) write in terminal:export DJANGO_SETTINGS_MODULE=mysite.settings 2) use this code first line of sc

continue

Dump & Restore postgres

To dump a PostgreSQL database located at a specific IP address and restore it to a new database, you

continue

Start Neo4j

Neo4j provides drivers which allow you to make a connection to the database and develop applications

continue

Custom Exception

importsfrom rest_framework.exceptions import PermissionDenied from rest_framework import status defi

continue

Pagination in django

Example code:from rest_framework.pagination import PageNumberPagination from rest_framework.response

continue

Differences between
has_object_permission and has_permission

We have following two permission methods on BasePermission class:def has_permission(self,

continue

Data Visualization

Before jumping into the term “Data Visualization”, let’s have a brief discussion on the term “Data S

continue

Aggregating and Annotating Objects

The Django web framework includes a default object-relational mapping layer (ORM) for inte

continue

image base64 encoded

# with open(str(MEDIA_ROOT)+'/pdf/background.png', 'rb') as image_file: # encoded_backgro

continue

Context in Views

In Django REST Framework, the `APIView` class and the `ModelViewSet` class handle the context dictio

continue

connect to postgresql db

Here are a few steps you can take to resolve connect to db with another IP:Verify the PostgreSQL ser

continue

API-View vs View-Set in drf

In Django REST Framework (DRF), you can choose between `APIView` and `ViewSet` depending on your spe

continue

Setup PostgreSql

To create a database and an owner with a password in PostgreSQL, you can follow these steps:1. First

continue

Access PostgreSQL-DB server on local

To access and use your PostgreSQL database on your local machine, you will first need to ensure that

continue

Popular methods in Serializer file

In Django, serializers are used to convert complex data types, such as Django model instances, into

continue

Aggregate in Django

# response_work_projects = [] # for report in report_statics: # workpertea

continue

Permissions In Django

1) Custom PermissionsTo create custom permissions for a given model object, use the permissions

continue

In Django, filed lookups

In Django, field lookups are used to perform queries on model fields to retrieve specific data from

continue

Reverse lookup in Django

In Django, reverse lookup refers to the process of accessing related objects in a database relations

continue

Aggregating and Annotating Objects in
Django

OverviewThe Django web framework includes a default object-relational mapping layer (ORM) 

continue

ViewSets & APIViews in Django

In Django, you can use either ViewSets or APIViews to create APIs for your web application. Here are

continue

Supervised vs Unsupervised vs
Reinforcement

Machine Learning is a part of Computer Science where the efficiency of a system improves itself

continue