Yes, you read that right! Machine learning can make music. This article will show you how we can generate simple piano compositions using a Neural Network Model in Keras. I would like to thank Sigurður Skúli for their tutorial as it proved to be a great source of reference and understanding in writing this article.

THE BASIC IDEA

A Piano composition is basically a sequence of two things:

  1. Notes

The idea that we will be using in our machine learning model is that:

Given a sequence of notes and chords, our model should be able to suggest a suitable note/chord that should…


In this short post I’ll be showing you guys how you can get started with scraping web pages by using Python and BeautifulSoup. If you are still unfamiliar with Python you should definitely check out my other post where I have tried to show how Python as a programming language can be highly robust and flexible depending on the task at hand.

Things we’ll be needing:

Python 3.x and BeautifulSoup4 (Python module)

Getting BeautifulSoup4 for Python 3.x

Run the following command in your terminal.

What we’’ll be scraping…

Ok so first of all not every website can be scraped by using bs4. For example google images is not prone to scraping using…


A little Python🐍 never hurts!

Most Programmers generally prefer languages like C, C++ and Java for achieving competitive programming tasks. For the most part, this is because C and C++ are inherently faster than Python and Java, but also because many programmers feel naturally comfortable with C/C++ given they wrote their first ever programs using them.

But I’m here to tell you that sometimes knowing even very basic Python can go a long way when it comes to solving small programming tasks as fast as you can!

So here’s a short example to convince you that yes — Python can…


👏🏼😂

Welcome to the first of many more to come “Code minus minus” posts. The main aim of this series of articles is to suggest small programming tricks that may help save crucial time for the programmer during competitive programming tasks by mostly reducing the length of the code to be written to achieve the same task.

So let’s talk about 2D arrays, shall we?

Almost every competitive programming contest consists of one or more problems on 2D arrays in which it is required to lookup the cells adjacent (above, below, left and right) to some particular cell.

Shreyans Jain

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