Skip to main content

Posts

GitHub exact pull request method

  1.Fork this project. 2.clone those project on your local machine ``` git clone <link> ``` 3.create a new branch  ``` git branch [branch_name] ``` 4.switch the created branch ``` git checkout [branch name] ``` 5.check ``` git status ``` 6.change whatever like 7.pull  ``` git branch --set-upstream-to=origin/master [branch_name] ``` 8. ``` git add . ``` 9.Commit ``` git commit -am "update cp and rm command" ``` 10.finally push ``` git push origin [brach_name] ``` 11.see difference on repo and make some comment and create pull request.

Tracing Covid-19

  Density-based Clustering: Clusters are formed based on the density of the region — examples of this type: DBSCAN (Density-Based Spatial Clustering of Applications with Noise) and OPTICS (Ordering Points to Identify Clustering Structure). Hierarchal-based Clustering: Clusters are formed using a tree-type structure. Some clusters are predefined and then used to create new clusters — examples of this type: CURE (Clustering Using Representatives), BIRCH (Balanced Iterative Reducing Clustering, and using Hierarchies). Partitioning-based Clustering: Clusters are formed by partitioning the input data into k clusters — examples of this type: K-means , CLARANS    (Clustering Large Applications based upon Randomized Search). Mock Data Generator

Custom template doesn't show up Password change html in django....

  from django . contrib import admin from django . urls import path , include from django . views . generic . base import TemplateView from django . contrib . auth . views import PasswordResetView , PasswordResetDoneView , PasswordResetConfirmView , PasswordResetCompleteView urlpatterns = [ path ( 'admin/' , admin . site . urls ), #127.0.0.1:8000 path ( '' , include ( 'blog.urls' )), path ( 'accounts/' , include ( 'django.contrib.auth.urls' )), path ( '' , TemplateView . as_view ( template_name = 'home.html' ), name = 'home' ), path ( 'accounts/password/reset/' , PasswordResetView . as_view ( template_name = 'registration/password_reset_form.html' ), name = 'password_reset' ), path ( 'accounts/password/reset/' , PasswordResetDoneView . as_view ( template_name = 'registration/password_reset_done.html' ), name = 'password_...

Deploy django project on heroku

 check heroku ------------------------------------- heroku --version ---------------------------------------- In django project  $ pip3 install gunicorn $ pip install django-heroku $ pip install  python-decouple then, $ touch Procfile  edit this procfile -------------------------------------------------- web: gunicorn sample.wsgi sample means very first project wsgi.py file $ pip freeze > requirements.txt ---------------------------------------------------- import those things in settings.py file  --------------------- import django_heroku import dj_database_url from decouple import config Add middleware ' whitenoise.middleware.WhiteNoiseMiddleware ',  --------------------------------------------------  bottom of settings.py file   STATICFILES_STORAGE = ' whitenoise.storage.CompressedManifestStaticFilesStorage ' ---------------------------- then, django_heroku . settings ( locals ())   push github ------------- login heroku  $he...

Connect POSTgreSQL with Django

  First install all necessary step  $ sudo apt-get install python-pip python-dev libpq-dev postgresql postgresql-contrib Second $ sudo su - postgres $ psql Create User name with password  $ CREATE USER user_name WITH PASSWORD ' password ';   Create New Database $ CREATE DATABASE database_name WITH OWNER user_name ; Give permission  $ GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO user_name ; Update settings.py  DATABASES = { ' default ' : { ' ENGINE ' : ' django.db.backends.postgresql_psycopg2 ' , ' NAME ' : 'database_name ' , ' USER ' : ' user_name ' , ' PASSWORD ' : ' password' , ' HOST ' : ' localhost ' , ' PORT ' : ' 5432 ' , } }  Then, python3 manage.py migrate and finally create super user python3 man age.py createsuperuser