Sign in

Works at @impressAI
Photo by Roberto Carlos Roman Don on Unsplash

I am assuming you all might know what a Fibonacci sequence is, For those who don’t know, it’s the sequence of numbers such that each number is the sum of the two preceding ones, starting from 0 and 1. For example please refer to the following sequence.

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765

Why Fibonacci?

The question of finding a specific number from the series is what you could expect is a basic coding interview. Anyone from a coding background would know how to do this. …


Photo by Annie Spratt on Unsplash

This article is to show you how easy it is to make a simple file upload API using Django viewsets. There are other alternatives to do the same but in this article, we will be using a viewsets, a serializer, and Django default routing to make an API to upload any file.

I am writing this post to mention what I had been faced with when dealing Django rest framework file upload initially, which will support those who are trying to find out how to do so.

This article is just to shows how to make an API to upload…


Photo by Andy Kelly on Unsplash

This article is the very beginning of my blog series explaining the deep learning textbook by Ian Goodfellow and Yoshua Bengio and Aaron Courville.

Disclaimer: If I am wrong please correct me, I will try my best to explain things in a much simpler and easier way.

You remember things well enough when you take good notes.

Yes, writing down something seems to help us understand it better. On the other hand, not writing down things simply asks forgetting. …


Photo by Safar Safarov on Unsplash

It took me hours to figure out how to add pdb to my Django project which resides in a Docker for software development. So I thought it would be great to make an article about it.

There can be mistakes in what I wrote and the things that I have conveyed, I am always ready to change or admit my mistake if found convincing.

Initialization

A sample project is created to demonstrate:

https://github.com/Joel-hanson/django-docker-pdb

Docker setup


Photo by Artur Tumasjan on Unsplash

This article is to show how we can do one of the advanced serializer usages called Dynamically modification fields. Dynamic modifying fields can make a Django rest framework API act like graphQL endpoint by retrieving only the required fields from the model, which is our primary goal for this article.

Once a serializer has been initialized, the dictionary of fields that are set on the serializer can be accessed using the .fields attribute. Accessing and modifying this attribute allows you to dynamically modify the serializer.

Modifying the fields argument explicitly helps you to do curious stuff, such as modifying the…


Photo by Daniel Cheung on Unsplash

This article is about the deployment of the API flask application to Heroku server and having a continuous integration with Github.

We will be continuing the above article for deploying our API application. In brief, the above article follows a step by step process for creating our API application using Flask. The application can generate a random name and email on every request that hit the API.

Part 2. Deploy the Application

To begin we have to commit and push our code to a Github repository. If you had followed the previous article you will be currently having a folder called flask_api and a file…


Photo by Ciprian Boiciuc on Unsplash

This article is for the beginner who is looking to create an API using the flask. We will be creating an API that can return a random name and email for every request that reaches the API.

Let's build an API!!

Goals:

  1. Build the application.
  2. Deploying the application.

Install Flask and Faker

pip install flask
pip install Faker

Check if the flask is installed and working fine, make a file called hello.py with the following code.

# hello.py
from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
return "Hello World!"

And run the following code in the path where the file is created.

$…

Joel Hanson

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