Python tutorials

Find what Taylor Swift is singing about using NLP with Python.

After the presale ticket sales opened for Taylor Swift’s “Eras” tour — her first tour since 2018 — a mad rush ensued, leading to “historically unprecedented demand” that snapped up 2 million tickets, the most tickets ever sold for one artist in a day. The aftermath, termed “Taylor Swift’s Ticketmaster meltdown” has become a prevalent topic, even taking political dimensions and stimulating bipartisan outrage from some Democrats and Republicans who have questioned whether Ticketmaster handled the Swift ticket rollout appropriately. […]

Read more

Using Python’s pathlib Module

Have you struggled with file path handling in Python? With the pathlib module, the struggle is now over! You no longer need to scratch your head over code like this: >>> >>> path.rsplit(”, maxsplit=1)[0] And you don’t have to cringe at the verbosity of something like this: >>> >>> os.path.isfile(os.path.join(os.path.expanduser(‘~’), ‘realpython.txt’)) In this video course, you’ll learn how to: Work with file    

Read more

Iterations on the Modern Data Stack

You might have noticed the dust on images in the icons and AWS UI. These are screenshot from 2016 (gulp), so reproducing these exact steps will be challenging to say the least. For example, at the time I felt generous enough to try Atom as my text editor — the redeeming value is that at least it was an Electron app. But S3 explorer? Fast forward five years, and, with some minor exceptions, it can still server as a valid […]

Read more

How to Get a List of All Files in a Directory With Python

Getting a list of all the files and folders in a directory is a natural first step for many file-related operations in Python. When looking into it, though, you may be surprised to find various ways to go about it. When you’re faced with many ways of doing something, it can be a good indication that there’s no one-size-fits-all solution to your problems. Most likely, every solution will have its own advantages and trade-offs. This is the case when it […]

Read more
1 2 3 131