Advent of Code: Solving Puzzles With Python

Advent of Code is an online Advent calendar where you’ll find new programming puzzles offered each day from December 1 to 25. While you can solve the puzzles at any time, the excitement when new puzzles unlock is really something special. You can participate in Advent of Code in any programming language—including Python! With the help of this Code Conversation, you’ll be ready to start solving puzzles and earning your first gold stars. In this video course, you’ll learn: What […]

Read more

The Python Rich Package: Unleash the Power of Console Text

Python’s Rich package is a tool kit that helps you generate beautifully formatted and highlighted text in the console. More broadly, it allows you to build an attractive text-based user interface (TUI). Why would you choose a TUI over a graphical user interface, or GUI? Sometimes a text display feels more appropriate. Why use a full-blown GUI for a simple application, when an elegant text interface will do? It can be refreshing to work with plain text. Text works in […]

Read more

Two kinds of threads pools, and why you need both

When you’re doing large scale data processing with Python, threads are a good way to achieve parallelism. This is especially true if you’re doing numeric processing, where the global interpreter lock (GIL) is typically not an issue. And if you’re using threading, thread pools are a good way to make sure you don’t use too many resources. But how many threads should your thread pool have? And do you need just one thread pool, or more than one? In this […]

Read more

Build Conway’s Game of Life With Python

Wouldn’t it be cool to build a Python game that only requires initial user input and then seems to take on a mind of its own, creating mesmerizing patterns along the way? You can do exactly that with Conway’s Game of Life, which is about the evolution of cells in a life grid. Implementing the Game of Life algorithm is a good exercise with many interesting challenges that you’ll have to figure out. Specifically, you’ll need to build the life […]

Read more

Python Basics Exercises: Modules and Packages

In Python Basics: Modules and Packages, you learned how to build an application by putting related code into separate files called modules. You also used the import statement to use modules in another file. In this video course, you’ll practice: Creating your own modules Using modules in another file through the import statement Organizing several modules into a package with __init__.py Along the way, you’ll also get some insight into how to tackle coding challenges in general, which can be […]

Read more

How to Render Markdown in a Django Application

One of Django’s most popular features is the admin interface. For developers, it provides an out-of-the-box tool kit to work with your project’s data models. And it gives non-technical administrators an intuitive user interface (UI) for interacting with the database and creating website content. However, the Django admin doesn’t provide a way to format text-based content. Using Markdown with Django is a great solution. Markdown is a plain text formatting language that can automatically convert to HTML for publishing on […]

Read more

Embeddings and Vector Databases With ChromaDB

Now that you understand the mechanisms behind ChromaDB, you’re ready to tackle a real-world scenario. Say you have a library of thousands of documents, and you need a way to search through them. In particular, you want to be able to make queries that point you to relevant documents. For example, if your query is find me documents containing financial information, then you want whatever system you use to point you to a financial document in your library. How would […]

Read more

Python Basics: Modules and Packages

As you gain experience writing code, you’ll eventually work on projects that are so large that keeping all the code in a single file becomes cumbersome. Instead of writing a single file, you can put related code into separate files called modules. You can put individual modules together like building blocks to create a larger application. In this video course, you’ll learn how to: Create your own modules Use modules in another file through the import statement Organize several modules […]

Read more

JupyterLab for an Enhanced Notebook Experience

Maybe you’ve already worked with Jupyter Notebooks from Project Jupyter to create documents containing runnable code. You can achieve even more with JupyterLab, a tool kit that you can use to document and share your research, teaching, and learning activities. It’s useful in a wide range of disciplines, from data analysis and data visualization to scientific study. JupyterLab enhances your notebooks by providing a browser-based interface that allows you to use multiple notebooks together effectively. In addition, it offers you […]

Read more

Document Your Python Code and Projects With ChatGPT

Having good documentation is a critical feature of any successful Python project. In practice, writing documentation is hard and can take a lot of time and effort, so some developers don’t like to do it. Luckily, with large language models (LLMs) and tools like ChatGPT, you can quickly document your Python code and projects. In Python, you can document your code using docstrings and then take advantage of them to enrich the project’s external documentation. ChatGPT can be of great […]

Read more
1 79 80 81 82 83 908