Python tutorials

Build a Personal Diary With Django and Python

A diary is a personal safe space. With the help of Django, you can create a diary on your own computer without storing data in anyone else’s cloud. By following along with the project below, you’ll see how quickly you can build a functioning web app in Django without any external dependencies. In this tutorial, you’ll learn how to: Set up a Django project Work with the standard SQLite database Make use of the Django admin site Create models and […]

Read more

Using Data Classes in Python

One new and exciting feature that came out in Python 3.7 was the data class. A data class is a class typically containing mainly data, although there aren’t really any restrictions. With data classes, you don’t have to write boilerplate code to get proper initialization, representation, and comparisons for your objects. In this course, you’ll learn how to: Define your own data classes Add default values to the fields in your data class Customize the ordering of data class objects […]

Read more

Python News: What’s New From August 2021?

Summer holidays have ended, and it’s back to school again. While it was a time of leisure and getting disconnected from the virtual world for many of us, the Python maintainers and contributors have been busy working during that same period. Just in August 2021, the Python community saw three new Python releases, bringing some important security fixes, optimizations, and brand-new features. Let’s dive into the biggest Python news from the past month! Python 3.10 Is Almost Ready On August […]

Read more

A Python Guide to the Fibonacci Sequence

With stacks, you’ll effectively see how each call in a recursive function is handled. The way each call is pushed onto the stack and popped off is exactly how the program is run, and it’ll clearly demonstrate how calculating large numbers will take a long time, if not optimized. Illustrating Visualization Using a Call Stack In a call stack, whenever a function call returns a result, a stack frame representing the function call is popped off the stack. Whenever you […]

Read more

Graph Your Data With Python and ggplot

In this course, you’ll learn how to use ggplot in Python to create data visualizations using a grammar of graphics. A grammar of graphics is a high-level tool that allows you to create data plots in an efficient and consistent way. It abstracts most low-level details, letting you focus on creating meaningful and beautiful visualizations for your data. There are several Python packages that provide a grammar of graphics. This course focuses on plotnine since it’s one of the most […]

Read more

How Long Does It Take to Learn Python?

You’ve probably found at least one blog post where the author reveals that they learned Python in a handful of days and quickly transitioned into a high-paying job. Some of these stories may be true, but they don’t help you prepare for a steady learning marathon. So, how long does it really take to learn Python, and is it worth your time investment? In this article, you’ll learn: What “learning Python” means and how you can measure your progress What […]

Read more

The best Docker base image for your Python application (August 2021)

When you’re building a Docker image for your Python application, you’re building on top of an existing image—and there are many possible choices. There are OS images like Ubuntu, and there are the many different variants of the python base image. Which one should you use? Which one is better? There are many choices, and it may not be obvious which is the best for your situation. So to help you make a choice that fits your needs, in this […]

Read more

Splitting Datasets With scikit-learn and train_test_split()

One of the key aspects of supervised machine learning is model evaluation and validation. When you evaluate the predictive performance of your model, it’s essential that the process be unbiased. Using train_test_split() from the data science library scikit-learn, you can split your dataset into subsets that minimize the potential for bias in your evaluation and validation process. In this course, you’ll learn: Why you need to split your dataset in supervised machine learning Which subsets of the dataset you need […]

Read more

Using Python Optional Arguments When Defining Functions

In this section, you’ll learn how to define a function that takes an optional argument. Functions with optional arguments offer more flexibility in how you can use them. You can call the function with or without the argument, and if there is no argument in the function call, then a default value is used. Default Values Assigned to Input Parameters You can modify the function add_item() so that the parameter quantity has a default value: # optional_params.py shopping_list = {} […]

Read more

Exploring the Python math Module

In this course, you’ll learn all about Python’s math module. Mathematical calculations are an essential part of most Python development. Whether you’re working on a scientific project, a financial application, or any other type of programming endeavor, you just can’t escape the need for math. For straightforward mathematical calculations in Python, you can use the built-in mathematical operators, such as addition (+), subtraction (-), division (/), and multiplication (*). But more advanced operations, such as exponential, logarithmic, trigonometric, or power […]

Read more
1 109 110 111 112 113 185