Building a URL Shortener With FastAPI and Python

In this video course, you’ll build a URL shortener with Python and FastAPI. URLs can be extremely long and not user-friendly. This is where a URL shortener can come in handy. A URL shortener reduces the number of characters in a URL, making it easier to read, remember, and share. By following this step-by-step project, you’ll build a URL shortener with Python and FastAPI. At the end of this course, you’ll have a fully functional API-driven web app that creates […]

Read more

Python’s exec(): Execute Dynamically Generated Code

Python’s built-in exec() function allows you to execute arbitrary Python code from a string or compiled code input. The exec() function can be handy when you need to run dynamically generated Python code, but it can be pretty dangerous if you use it carelessly. In this tutorial, you’ll learn not only how to use exec(), but just as importantly, when it’s okay to use this function in your code. In this tutorial, you’ll learn how to: Work with Python’s built-in […]

Read more

How to Check if a Python String Contains a Substring

If you’re new to programming or come from a programming language other than Python, you may be looking for the best way to check whether a string contains another string in Python. Identifying such substrings comes in handy when you’re working with text content from a file or after you’ve received user input. You may want to perform different actions in your program depending on whether a substring is present or not. In this tutorial, you’ll focus on the most […]

Read more

Invasive procedures: Python affordances for performance measurement

When your Python code is too slow, you need to identify the bottleneck that’s causing it: you need to understand what your code is doing. Luckily, beyond pre-existing profiling tools, there are also a variety of ways you can poke and prod Python programs to get a better understanding of what they’re doing internally. This allows you to do one-time introspection, add profiling facilities to your program that you can turn on and off, build custom tools, and in general […]

Read more

Tutorial of Scatter Plot in Base R Language

Introduction In this article, we will understand how to create Scatter Plot in Base R language. R is very popular for providing rich visualization options out of the box. Firs, we will understand the syntax of plot() and then see how to use it for creating scatterplots. Syntax of Scatter Plot plot() function in R The basic syntax for scatterplot plot() function is shown below with commonly used parameters.    

Read more

Using Pi in Python with Numpy, Scipy and Math Library

Using Pi in Python A very trivial scenario that you will come across in coding is using the value of Pi in Python language. And as it turns out, there are multiple libraries Numpy (np.pi) , Scipy (scipy.pi), and Math (math.pi) with which you can use the value of Pi in Python. Let us see them one by one. i) Pi in Numpy – np.pi Here we import the Numpy library as np. And the value of pi can be […]

Read more

Quick Tutorial for Numpy Linspace with Examples for Beginners

What is Linspace() in Numpy Numpy Linspace() function is used to create a numpy array with evenly spaced numbers between the two intervals provided as input.  In this tutorial, we will see the syntax of np.linspace() and see various examples by using various parameters. Numpy Linspace: np.linspace() Syntax np.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0) start – This signifies the starting value of the sequence and can be a number or an array-like value. stop – This signifies the stop […]

Read more

Tutorial of Violin Plot in Base R Language with Examples

Introduction In this tutorial, we will see how to create Violin Plot in Base R language which is very popular for providing packages for rich visualization. First, we will understand the syntax of vioplot() and then see how to use it for creating violin plot. Syntax of Violin Plot vioplot() function in R The basic syntax for vioplot() function is shown below with a few commonly used arguments. The detailed syntax can be found here. vioplot(x,horizontal,col,rectCol,lineCol,colMed,border) x – It denotes […]

Read more

Tutorial of Line Plot in Base R Language with Examples

Introduction A line plot is a graph that connects multiple data points by making line segments between them. These points are ordered in one of their coordinate (usually the x-coordinate) values and are useful to investigate trends in our data set. In this tutorial, we are going to see how to create a line plot in R language with plot() function along with its syntax and various examples. Syntax plot() function for    

Read more
1 208 209 210 211 212 989