How to Publish an Open-Source Python Package to PyPI

Python is famous for coming with batteries included, and many sophisticated capabilities are available in the standard library. However, to unlock the full potential of the language, you should also take advantage of the community contributions at PyPI: the Python Packaging Index. PyPI, typically pronounced pie-pee-eye, is a repository containing several hundred thousand packages. These range from trivial Hello, World implementations to advanced deep learning libraries. In this tutorial, you’ll learn how to upload your own package to PyPI. Publishing […]

Read more

CPUs, cloud VMs, and noisy neighbors: the limits of parallelism

Sometimes your program is slow not because of your code, but because of where it’s running. If you have other processes competing for the same limited hardware resources, your code will run more slowly. Once you add virtualization into the mix, those competing processes might be invisible… but they’re still there. In this article we’ll cover: The hardware limits of CPUs’ cores and “hyperthreads”. How operating systems deal with multiple processes that want to use limited number of CPU cores. […]

Read more

Build a URL Shortener With FastAPI and Python

In this tutorial, 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 tutorial, you’ll have a fully functional API-driven web app that creates shortened […]

Read more

Using Python Class Constructors

Class constructors are a fundamental part of object-oriented programming in Python. They allow you to create and properly initialize objects of a given class, making those objects ready to use. Class constructors internally trigger Python’s instantiation process, which runs through two main steps: instance creation and instance initialization. If you want to dive deeper into how Python internally constructs objects and learn how to customize the process, then this video course is for you. In this video course, you’ll: Understand […]

Read more

Linear Regression in Python

You’re living in an era of large amounts of data, powerful computers, and artificial intelligence. This is just the beginning. Data science and machine learning are driving image recognition, development of autonomous vehicles, decisions in the financial and energy sectors, advances in medicine, the rise of social networks, and more. Linear regression is an important part of this. Linear regression is one of the fundamental statistical and machine learning techniques. Whether you want to do statistics, machine learning, or scientific […]

Read more

Faster, more memory-efficient Python JSON parsing with msgspec

If you need to process a large JSON file in Python, you want: Make sure you don’t use too much memory, so you don’t crash half-way through. Parse it as quickly as possible. Ideally, make sure the data is actually valid up-front, with the right structure, so you don’t blow up half-way through your analysis. You can put together solutions with multiple libraries, of course. Or, you can use msgspec a new library that offers schemas, fast parsing, and some […]

Read more

pandas GroupBy: Your Guide to Grouping Data in Python

Whether you’ve just started working with pandas and want to master one of its core capabilities, or you’re looking to fill in some gaps in your understanding about .groupby(), this tutorial will help you to break down and visualize a pandas GroupBy operation from start to finish. This tutorial is meant to complement the official pandas documentation and the pandas Cookbook, where you’ll see self-contained, bite-sized examples. Here, however, you’ll focus on three more involved walkthroughs that use real-world datasets. […]

Read more

Deploying a Flask Application Using Heroku

In this video course, you’ll create a Python Flask example application and deploy it using Heroku, making it publicly available on the web. Heroku removes much of the infrastructure burden related to building and running web applications, allowing you to focus on creating an awesome app. Besides deploying the app, you’ll use Git to track changes to the code, and you’ll also configure a deployment workflow with different environments for staging and production. Using this setup, you’ll be able to […]

Read more

Python News: What’s New From April 2022

April 2022 saw the return of the PyCon US conference in person in Salt Lake City. During the conference, Python developers met for the annual Language Summit, and Anaconda announced PyScript, a way to write Python directly inside HTML. Earlier in the month, the Python Software Foundation (PSF) welcomed its new executive director. Read on to dive into the biggest Python news from the past month! PyScript: Python in Your Browser During his keynote at PyCon US, Anaconda CEO Peter […]

Read more

Machine Translation and Multilinguality 04/2022

Another month is over, so here is my overview of what I found most interesting in machine translation and multilinguality. Rotation ciphers as regularizers A paper accepted to ACL 2022 from Simon Fraser University experiments with using rotation ciphers on the source side of MT as a data augmentation technique. They tested it in low data scenarios and it seems to work quite well, which actually seems quite strange to me. It’s just systematic replacing characters with different characters – […]

Read more
1 170 171 172 173 174 927