Hello, In this part I will explain in-place rotation of a 2D matrix, without using another matrix for storing, so that we just change the original matrix.

Photo by Karla Hernandez on Unsplash

I will explain the case when the degree of rotation is 90 degrees as a ground case and then talk about other cases like -90, 180, 270.

Hello, I will explain 5 interpretations of matrix multiplication which are necessary to know for machine learning and data science.

Photo by Nathan Fertig on Unsplash

A reminder about matrix notation:


Hello, I will explain two algorithms to find the kth even and the kth odd numbers in the Fibonacci series.

Photo by Chris Liverani on Unsplash

If you haven’t heard of it, Fibonacci series is this:

Photo by Tim Carey on Unsplash

Explaining what is lambda function in python and how to use it professionally.

A lambda function is an anonymous function to use only once. The form is:

lambda arguments : expression

It can take any number(even 0) of arguments, but must have one expression . do NOT put parenthesis around arguments, just separate them with comma.

I have divided the story into 18 parts.

  1. Defining and calling together


Hello, we are gonna solve a puzzle regarding palindrome numbers.

Photo by Alvaro Reyes on Unsplash

A palindrome number is read the same backwards like 121 or 1221.

Let’s see how to write an algorithm that returns true if a positive integer is palindrome and false otherwise. I’m using python language. there are different ways of doing so but we want to come up with an algorithm with linear time complexity which means the running time of it should increase linearly versus the number of digits of the input. I’m using python language. we should check if the number is equal to it’s reverse.

Method 1: without conversion to string

The while loop creates the reverse of input and the best thing…


Photo by Sam Barber on Unsplash

Hello, We are going to explore various ways of reversing objects (string, list, …) in python.

Reversing a list with reverse() method

This method does not take any arguments and return anything. It just reverses the original list.

full stack and deep learning in AWS

Photo by Photos Hobby on Unsplash


In this Project I trained an algorithm to classify facial expressions. The algorithm used is AWS SageMaker image classification algorithm which is a supervised learning algorithm. It takes an image as input and outputs one or more labels assigned to that image. It uses a convolutional neural network (with ResNet architecture) that can be trained from scratch or trained using transfer learning. After the model is created from training, I made it externally available by creating a REST API.

This project was done for learning and practice after finishing a 4-week 8-session course, “deep learning & full stack in AWS”…

sepehr vafaei

Studied Mechanical Engineering and Computing Science+Loves art

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