stackabuse.com

Shell Sort in Java

Introduction Sorting algorithms are algorithms that rearrange a collection's members in a certain order. The order criteria can vary and it is typically user-defined. In practice, the order criteria is provided to the algorithm as a method that compares two objects and returns: 0: If the compared entities are considered equal 1: if the first entity is considered greater than the second -1: if the second entity is considered greater than the first That being said, this is most effectively done when the collection we're sorting contains...

stackabuse.com

Promises in Node.js

Introduction JavaScript is single-threaded, which means that everything, including events, runs on the same thread. If the thread is not free, code execution is delayed until it is. This can be a bottleneck for our application since it can really cause serious performance problems. There are different ways by which we can overcome this limitation. In this article, we'll explore the modern way to handle asynchronous tasks in JavaScript - Promises. Callbacks and Callback Hell If you are a JavaScript developer, you've likely heard of, if not...

stackabuse.com

Solving Systems of Linear Equations with Python's Numpy

The Numpy library can be used to perform a variety of mathematical/scientific operations such as matrix cross and dot products, finding sine and cosine values, Fourier transform and shape manipulation, etc. The word Numpy is short-hand notation for "Numerical Python". In this article, you will see how to solve a system of linear equations using Python's Numpy library. What is a System of Linear Equations? Wikipedia defines a system of linear equations as: In mathematics, a system of linear equations (or linear system) is a...

stackabuse.com

Python for NLP: Deep Learning Text Generation with Keras

This is the 21st article in my series of articles on Python for NLP. In the previous article, I explained how to use Facebook's FastText library for finding semantic similarity and to perform text classification. In this article, you will see how to generate text via deep learning technique in Python using the Keras library. Text generation is one of the state-of-the-art applications of NLP. Deep learning techniques are being used for a variety of text generation tasks such as writing poetry, generating scripts for movies, and even for...

stackabuse.com

Git: Switch Branch

In Git, branches allow you to create different versions of your code from a snapshot in the repository. So if you have a new feature to develop, a bug to fix, or code to rewrite, you can easily create a branch that won't affect the master branch of your codebase. When creating and using branches for such common development tasks, you'll often need to switch between branches, depending on the task you're currently working on. In this short article we'll look at the Git commands and options you can use to switch branches in a local...

stackabuse.com

Solving Sequence Problems with LSTM in Keras: Part 2

This is the second and final part of the two-part series of articles on solving sequence problems with LSTMs. In the part 1 of the series, I explained how to solve one-to-one and many-to-one sequence problems using LSTM. In this part, you will see how to solve one-to-many and many-to-many sequence problems via LSTM in Keras. Image captioning is a classic example of one-to-many sequence problems where you have a single image as input and you have to predict the image description in the form of a word sequence. Similarly, stock market prediction...

stackabuse.com

Git: Remove a File

As your project changes over time, at some point you'll likely need to remove a file, or an entire directory, from the repository. Since this involves more than changing the contents of a file, Git has a special command to handle removing files, which also takes some important flags depending on your use-case. In this short article we'll take a look at the git rm command and how to use it to remove files and directories from your repository. Removing a File The simplest usage of this command is to remove a single file from the repository,...

stackabuse.com

Git: Create a New Repository

When starting a new project, one of the first things you'll find yourself needing to do is creating a new Git repository. This not only helps you share the project with coworkers, or publicly, but it's also a great way to track updates to a young project that is bound to go through significant changes in its early life. With a full history of those changes, and helpful features like branches, you can more easily test out different designs/implementations for the project without losing previous work. As with anything in Git, there are a few...