Want to make a blogging site for your blogs? Start building your customizable blogging sites using Django.

How to Make a Blogging Site Using Django (Python Library)

Note: In this tutorial, I am using a free bootstrap template from startbootstrap. You can find the code of this tutorial in Github. Below I am giving the URL.

Setup Project

  1. Open created folder. Run cmd, set a path
  2. Create a Virtual Environment and activate it.
# create
$ python -m venv myvenv
#activate
$ myvenv\Scripts\activate

4. Install Django

$ pip install django==3.1.5

5. Start a project

$ django-admin startproject django_blog

6. Change Directory

$ cd django_blog

7. Start a app

$ django-admin startapp blog

8. Create 3 necessary folders —

  • templates (for html’s)
  • static_in_env (for…


Want to learn Machine Learning? Start with these 10 books.

Top 10 Books on Machine Learning For Absolute Beginners, Beginners and Experts

What is Machine Learning?
Wikipedia — Machine learning (ML) is the study of computer algorithms that improve automatically through experience. It is seen as a subset of artificial intelligence. Machine learning algorithms build a model based on sample data, known as “training data”, in order to make predictions or decisions without being explicitly programmed to do so. Machine learning algorithms are used in a wide variety of applications, such as email filtering and computer vision, where it is difficult or unfeasible to develop conventional algorithms to perform the needed tasks.

Top 10 Applications of Machine Learning:

  1. Image Recognition
  2. Speech Recognition


I this tutorial, I am going to show you that how to implement ANN from Scratch for MNIST problem.

Artificial Neural Network From Scratch Using Python Numpy

Necessary packages

  • sklearn(Sci-kit learn) : for machine learning.
  • numpy : for dot product, matrices multiplication, etc; related to arrays.

Install this packages using pip:

pip install matplotlib
pip install sklearn
pip install numpy

Importing Necessary functions

  • classification_report, confusion_matrix : for checking accuracy of the model.
  • train_test_split: for splitting the data in train set and test set.
# %matplotlib inline
from sklearn.datasets import fetch_openml
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.model_selection import train_test_split
plt.style.use('ggplot')

Downloading data

Here I…


Perform a Hough Transform to find lanes within our region of interest and trace them in red.

Finding Road Lane Lines Using OpenCV Python

The Pipeline

The pipeline itself will look as follows:

  • Convert original image to HSL
  • Isolate yellow and white from HSL image
  • Combine isolated HSL with original image
  • Convert image to grayscale for easier manipulation
  • Apply Gaussian Blur to smoothen edges
  • Apply Canny Edge Detection on smoothed gray image
  • Trace Region Of Interest and discard all other lines identified by our previous step that are outside this region
  • Perform a Hough Transform to find lanes within our region of interest and trace them in red
  • Separate left and right lanes
  • Interpolate line gradients to create two smooth lines

Importing Necessary Libraries and Read Image

import cv2 #install using "pip…


Implementing hand detection using OpenCV-Python with Cosine Theorem for Finger Counting Problem.

Hand Detection and Finger Counting

By seeing above image now you are very excited for implement it (like me). So not wasting too much time let’s jump to the code.

OpenCV

OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products.

Importing Libraries

  • numpy: for handling arrays as well as for math [pip install numpy]
import cv2 as cv
import numpy as np

Reading Image

img_path = "data/palm.jpg"
img = cv.imread(img_path)
cv.imshow('palm image',img)


Implementing Sequence-to-Sequence model with LSTM and Attention Mechanism in Python for Text Summarization Problem.

Seq2Seq

Importing necessary packages

Importing necessary packages, if you have not this packages, you can install it through ‘pip install [package_name]’.

  • numpy: for handling arrays.
  • pandas: for DataFrame.
  • re (regex): for cleaning text.
  • tensorflow (keras): for machine learning or deep learning.
  • nltk (NLP tool kit) : used for building Python programs that work with human language data for applying in statistical natural language processing (NLP).
  • attention: for attention mechanism (I am provided it on my github — below this article.)
import numpy as np import pandas as pd import re from keras.preprocessing.text import Tokenizer from nltk import download download('stopwords') from nltk.corpus import stopwords from…


Text Summarization

Finding a useful sentence from large articles or extracting an important text from a larger text is what we call a text summarization. But it is very difficult for human beings to find useful from large documents of text manually so we are using automatic text summarization. In this article, I am going to talk about the automatic text summary approach. So let’s get started.

Automatic text summarization

Automatic text summarization is a machine learning problem of extracting short, useful, or simply important text summaries from a long document.

Real-World Application of Automatic Text Summarization:

There are many applications of Automatic Text Summarization…


Here I am mentioned Top 5 Python Data Visualization Libraries That You Can Use For Your Machine Learning & Data Science Problems

5 Python Data Visualization Library

Data visualizations make big and small data easier for the human brain to understand, and visualization also makes it easier to detect patterns, trends, and outliers in groups of data.

Top 5 Python Data Visualization Library

  1. Seaborn
  2. ggplot
  3. pyplot
  4. pygal

Matplotlib

Installation: pip install matplotlib


Python Implementation of 5 Machine Learning Algorithm for Machine Learning Classification Problems

Image by mohamed Hassan from Pixabay

Hello Programmers!

Here I am gonna show How to Implement SVM, Logistics Regression, Naive Bayes, Decision Tree, Random Forest in Python using Scikit-learn or sklearn. And yeah this is too easy to implement, just write three lines of Python code, and you get your Decision Tree classifier.

Because this is beauty of sklearn (Scikit-learn).

Note: You can get this notebook in my Github, I give you link below.

So let’s dirty our hands by some coding.

First we need a dataset, and I have a dataset of Market where you have to predict that customer purchasing item or not.

What has in my Dataset?


Image by mohamed Hassan from Pixabay

A chatbot also known as “conversational agents” is a computer program that simulates human conversation through voice commands or text chats or both. Like other AI tools, Chatbots will be used to further enhance human capabilities and free humans to be more creative and innovative, spending more of their time on strategic rather than tactical activities.

Application of Chatbot

There are lots of applications for chatbots! These are the following some popular application that many Industries use:

  1. E-commerce bots: for ordering different-different Products.
  2. Content delivery — look at the Wall Street Journal and Tech Crunch!
  3. Event reservation — restaurant reservations, doctor appointments, movie…

Madhav Mishra

AI Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store