Time Series Prediction using LSTM with PyTorch in Python

Time series data, as the name suggests is a type of data that changes with time. For instance, the temperature in a 24-hour time period, the price of various products in a month, the stock prices of a particular company in a year. Advanced deep learning models such as Long Short Term Memory Networks (LSTM), are capable of capturing patterns in the time series data, and therefore can be used to make predictions regarding the future trend of the data. […]

Read more

Asynchronous Tasks Using Flask, Redis, and Celery

Introduction As web applications evolve and their usage increases, the use-cases also diversify. We are now building and using websites for more complex tasks than ever before. Some of these tasks can be processed and feedback relayed to the users instantly, while others require further processing and relaying of results later. The increased adoption of internet access and internet-capable devices has led to increased end-user traffic. In a bid to handle increased traffic or increased complexity of functionality, sometimes we […]

Read more

Coroutines in Python

Introduction Every programmer is acquainted with functions – sequences of instructions grouped together as a single unit in order to perform predetermined tasks. They admit a single entry point, are capable of accepting arguments, may or may not have a return value, and can be called at any moment during a program’s execution – including by other functions and themselves. When a program calls a function its current execution context is saved before passing control over to the function and […]

Read more

Understanding OpenGL through Python

Introduction Following this article by Muhammad Junaid Khalid, where basic OpenGL concepts and setup was explained, now we’ll be looking at how to make more complex objects and how to animate them. OpenGL is very old, and you won’t find many tutorials online on how to properly use it and understand it because all the top dogs are already knee-deep in new technologies. To understand modern OpenGL code, you have to first understand the ancient concepts that were written on […]

Read more

Advanced OpenGL in Python with PyGame and PyOpenGL

Introduction Following the previous article, Understanding OpenGL through Python where we’ve set the foundation for further learning, we can jump into OpenGL using PyGame and PyOpenGL. PyOpenGL is the standardized library used as a bridge between Python and the OpenGL APIs, and PyGame is a standardized library used for making games in Python. It offers built-in handy graphical and audio libraries and we’ll be using it to render the result more easily at the end of the article. As mentioned […]

Read more

Quicksort in Python

Introduction Quicksort is a popular sorting algorithm and is often used, right alongside Merge Sort. It’s a good example of an efficient sorting algorithm, with an average complexity of O(nlogn). Part of its popularity also derives from the ease of implementation. We will use simple integers in the first part of this article, but we’ll give an example of how to change this algorithm to sort objects of a custom class. Quicksort is a representative of three types of sorting […]

Read more

Using cURL in Python with PycURL

Introduction In this tutorial, we are going to learn how to use PycURL, which is an interface to the cURL library in Python. cURL is a tool used for transferring data to and from a server and for making various types of data requests. PycURL is great for testing REST APIs, downloading files, and so on. Some developers prefer using Postman for testing APIs but PycURL is another suitable option to do so as it supports multiple protocols like FILE, […]

Read more

Dimensionality Reduction in Python with Scikit-Learn

Introduction In machine learning, the performance of a model only benefits from more features up until a certain point. The more features are fed into a model, the more the dimensionality of the data increases. As the dimensionality increases, overfitting becomes more likely. There are multiple techniques that can be used to fight overfitting, but dimensionality reduction is one of the most effective techniques. Dimensionality reduction selects the most important components of the feature space, preserving them and dropping the […]

Read more

Insertion Sort in Python

Introduction If you’re majoring in Computer Science, Insertion Sort is most likely one of the first sorting algorithms you have heard of. It is intuitive and easy to implement, but it’s very slow on large arrays and is almost never used to sort them. Insertion sort is often illustrated by comparing it to sorting a hand of cards while playing rummy. For those of you unfamiliar with the game, most players want the cards in their hand sorted in ascending […]

Read more

Unit Testing in Python with Unittest

Introduction In almost all fields, products are thoroughly tested before being released to the market to ensure its quality and that it works as intended. Medicine, cosmetic products, vehicles, phones, laptops are all tested to ensure that they uphold a certain level of quality that was promised to the consumer. Given the influence and reach of software in our daily lives, it is important that we test our software thoroughly before releasing it to our users to avoid issues coming […]

Read more
1 872 873 874 875 876 910