# Calculate Factorial in Python — Optimization — PyShark

In this article we will discuss how to calculate a factorial in Python.

• Introduction
• Factorial formula
• Calculating factorial in Python
• Factorial functions in Python
• Conclusion

# Introduction

Most often you would see factorials in combinatorics algebra and probability theory.

Factorials are used in permutations (calculating the number of ways to arrange some objects) and combinations (calculating the number of ways a subset of objects can be selected from a set of objects).

# Factorial formula

Basically, for any integer n, that is greater than or equal to 1 (n ≥ 1), the factorial is the product of all integers in range (1:n)and…

# Solve Quadratic Equation using Python — Optimization — PyShark

• Introduction
• Solving quadratic equation using Python
• Complete code
• Conclusion

# Introduction

In algebra, quadratic equations are widely used in a lot of tasks. A quadratic equation (second-degree polynomial) always has a squared term which differentiates it from our usual linear equations.

In this tutorial we will use the math library (prebuilt in Python) for solving quadratic equations using Python.

We begin with understanding the standard form of quadratic equation:

So how do we know if the equation has a solution? …

# Linear Programming with Gurobipy in Python

In this article we will discuss how to solve linear programming problems with Gurobipy in Python.

• Introduction
• Linear programming example
• Solving linear programming problem with Python
• Conclusion

# Introduction

Linear programming (LP) is a tool to solve optimization problems. It is widely used to solve optimization problems in many industries.

In this tutorial we will be working with gurobipy library, which is a Gurobi Python interface. Gurobi is one of the most powerful and fastest optimization solvers and the company constantly releases new features. You can learn more about their licenses here.

To continue following this tutorial we will need the following…

# Create a Keylogger using Python — Python Programming — PyShark

In this article we will discuss how to make a simple keylogger using Python.

• Introduction
• Press and release keys
• Create a sample log file
• Create a simple keylogger
• Conclusion

# Introduction

Keyloggers are a type of monitoring software used to record keystrokes made by the user with their keyboard.

They are often used for monitoring the network usage as well as troubleshoot the technical problems. On the other hand, a lot of malicious software uses keyloggers to attempt to get usernames and passwords for different websites.

To continue following this tutorial we will need the following Python library: pynput.

# System and Hardware Information using Python

In this article we will discuss how to get system and hardware information of your computer using Python.

• Introduction
• System information
• CPU usage
• Memory usage
• Conclusion

# Introduction

We often look at our system information and open the task manager to see the utilization of our CPU and RAM and look through the processes running.

There is a convenient way of retrieving such information using Python in a few lines of code.

To continue following this tutorial we will need the following two Python libraries: platform and psutil.

The platform module is already installed by default.

If you don’t…

# Cosine Similarity Explained using Python

In this article we will discuss cosine similarity with examples of its application to product matching in Python.

• Introduction
• Cosine Similarity (Overview)
• Product Similarity using Python (Example)
• Conclusion

# Introduction

A lot of interesting cases and projects in the recommendation engines field heavily relies on correctly identifying similarity between pairs of items and/or users.

There are several approaches to quantifying similarity which have the same goal yet differ in the approach and mathematical formulation.

In this article we will explore one of these quantification methods which is cosine similarity. …

# Extract Links from a Web Page using Python — Python Programming

• Introduction
• Get HTML content from URL
• Finding and extracting links from HTML
• Conclusion

# Introduction

URL extractors are a very popular tool for everyone involved in the digital space, from marketers to SEO professionals. It is also a big part for web scrapers in the programming community. These scripts range from very simple ones (like the one in this tutorial) to very advanced web crawlers used by the industry leaders.

Let’s see how we can quickly build our own URL scraper using Python.

# Encrypt and Decrypt Files using Python — Python Programming

In this article we will discuss how to encrypt and decrypt files using Python.

• Introduction
• Creating a key
• Encrypting a file
• Decrypting a file
• Complete Object-Oriented Programming Example
• Conclusion

# Introduction

In the evolving world of data and information transfer, security of the file contents remain to be one of the greatest concerns for companies. Some information can be password protected (emails, logins) while other information being transferred via emails or FTP lacks efficiency if protected by some keyword. …

# Google Sheets API using Python — Python Programming

• Introduction
• Creating a sample Google Sheets document
• Opening a Google sheet using Python
• Selecting/creating/deleting a worksheet using Python
• Editing data in a Google sheet using Python
• Conclusion

# Introduction

Accessing data from multiple sources using Python becomes a standard requirement for nearly any position in data science and analytics. Working with Excel spreadsheets and internal CSV files happens everywhere.

# Test Internet Speed using Python — Python Programming

In this article we will discuss how to test internet speed using Python using the speedtest-cli library.

• Introduction
• Installing the required library
• Description of methods
• Testing internet speed
• Conclusion

# Introduction

The internet connections in our homes and offices differ by internet service providers (ISPs), allowable traffic limit, and most importantly speed.

So what do we do when we want to test the speed our connection? Correct, we go on Google and lookup some speedtesting websites and proceed there.

How about trying to test internet speed using Python from your computer in less than 10 lines of code? … Data Scientist