Aditya Chatterjee's Blog, page 196

August 19, 2020

“Show and Tell: A Neural Image Caption Generator” by Vinyals

This article explains the conference paper "Show and tell: A neural image caption generator" by Vinyals and others. Here we try to explain its concepts and details in a simplified manner and in a easy to understand way. This paper showcases how it approached state of art results using neural networks and provided a new path for the automatic captioning task.


Task

In a very simplified manner we can transform this task to automatically describe the contents of the image. This may sound simple as ...

 •  0 comments  •  flag
Share on Twitter
Published on August 19, 2020 22:46

August 18, 2020

Regex Expressions in Java

Regex -> Reg + ex i.e. Regular + Expressions


Regex Expressions are a sequence of characters which describe a search pattern. It is generally used for 'find', 'find and replace' as well as 'input validation'.

Most languages either contain regex expressions or contain the ability to create regex expressions such as Perl, Javascript et cetera. This article shall focus on how to write a Regex Expression in Java.


Writing Regex

Let us understand a regular expression with an example to check for a val...

 •  0 comments  •  flag
Share on Twitter
Published on August 18, 2020 06:19

Snake Game in Java (OOP design concepts)

In this article, we have explored how to design the classical Snake Game using Object Oriented Programming (OOP) concepts and implement it using Java.


Let us start immersing ourselves into it by fueling ourselves with some Nostalgia. Below is Snake Xenzia the Nokia.

snake_xenzia

The classic game that we are all acquainted with is actually surprisingly simple to implement and understand.


So lets get this straight, What do we need in our snake game?



A snake? Ofcourse!
Food for the snake!
A board.. where wil...
 •  0 comments  •  flag
Share on Twitter
Published on August 18, 2020 06:08

Introduction to 2-3 Trees

Introduction to 2-3 Trees

A 2-3 Tree is a tree data structure where every node with children has either two children and one data element or three children and two data elements. A node with 2 children is called a 2-NODE and a node with 3 children is called a 3-NODE. A 4-NODE, with three data elements, may be temporarily created during manipulation of the tree but is never persistently stored in the tree.

Introduction to 2-3 Trees

Nodes on the outside of the tree i.e. the leaves have no children and have either one or two data elements. All its...

 •  0 comments  •  flag
Share on Twitter
Published on August 18, 2020 05:48

August 17, 2020

A static Portfolio Website in Django

Reading time:30 minutes


In this article, we will be creating a static Django website and understand the structure of the Django framework. This article would cover all the commands for Windows users. For other operating systems, the commands are almost similar, you can find them on the net.


Pre-requisites for this article would be:



Basic Python
Basic HTML
Knowledge of CSS would be a plus
The basic working of Django

You can download a suitable version of Python officially from [here] (https://...

 •  0 comments  •  flag
Share on Twitter
Published on August 17, 2020 00:33

Solving Jigsaw Puzzles using Machine Learning

To solve Jigsaw Puzzles using Machine Learning, we have explored the paper "Unsupervised Learning of Visual Representations by Solving Jigsaw Puzzles". The paper describes a convolutional neural network (CNN) that aims to solve a pretext task, solving Jigsaw puzzles without manual labelling, and then to solve object classification and detection tasks.


Jigsaw-puzzles


The research in the paper has been done by Mehdi Noroozi and Paolo Favaro from University of Bern, Switzerland.


This paper introduces a new self...

 •  0 comments  •  flag
Share on Twitter
Published on August 17, 2020 00:23

August 16, 2020

Counting number of set bits (1) in a number (Brian Kernighan Algorithm)

Given an Integer and you have to count its set bits.


So here, Actually we have to find number of digits with value 1 in the given number when it is represented in its binary form.

i.e (5)10 = (0101)2

So number of count bits in 5 = 2

We have to just count number of 1's in given binary number.


We have explored two approaches:



Naive approach
Brian Kernighan Algorithm

Now how can we count ?


Naive Approach

As we know if we take AND of any number N with 1 then it returns the last or least signific...

 •  0 comments  •  flag
Share on Twitter
Published on August 16, 2020 14:30

Models in Django

Reading time:30 minutes


In this article, we'll be learning about Models in Django and how the database system works in Django.


How to store information?

Let us take an example, you want to create a social networking website in Django and we need a systematic way to define and store things such as user profiles and their details, posts, and their details, messages, comments, pages, and many more things. What do you think about how Django does that? How it will store this data?


Generally, when web...

 •  0 comments  •  flag
Share on Twitter
Published on August 16, 2020 11:39

August 15, 2020

tag in HTML web pages

<Button> tag in HTML web pages

Buttons are like the ears of the websites we create.When they are clicked, they listen to our options or choices and subsequently required actions take place.Be it navigating to other webpages,alerting,bringing changes like changing background color and so on,buttons are powerpunches of the webpage which respond to our punch.Buttons also give an aesthetic look to the webpages and make them pretty. Buttons can be formatted and styled using CSS. We can add javascript codes too to make the buttons...

 •  0 comments  •  flag
Share on Twitter
Published on August 15, 2020 17:13

Dictionary in Python

Dictionary in Python

A dictionary is a collection of key:value pairs which are unordered, changeable and indexed. In Python, dictionaries are written with curly brackets, and they have keys and values in them.


Dictionaries are sometimes called as associative arrays in other languages such as PHP.


The main operation on a dictionary is storing a value with some key and extracting the value through a key. It is also possible to delete a key:value pair using del keyword. If you use the same key for storing a different ...

 •  0 comments  •  flag
Share on Twitter
Published on August 15, 2020 10:10