What’s a Python Namespace Package, and What’s It For?

Python namespace packages are an advanced Python feature. You may have heard them mentioned in relation to the __init__.py file. Specifically, if you don’t include at least an empty __init__.py file in your package, then your package becomes a namespace package. For the most part, namespace packages and regular packages won’t behave differently when it comes to using them in your project. In fact, you’ve probably accidentally forgotten to include an __init__.py file in at least one package but didn’t […]

Read more

What is AI Ethics?

As AI continues to become more prevalent in our lives, it is crucial to consider the ethical implications of its use. Although AI can augment and revolutionize how we live, work, and interact with each other, it can also cause harm if not used or developed correctly. People can be wrongly imprisoned when facial recognition systems fail in law enforcement and the judicial system. People can be killed if self-driving cars fail to correctly see them as pedestrians on the […]

Read more

Highlights from Machine Translation and Multilinguality in February 2023

There were plenty of interesting pre-prints on arXiv in February. Here is a brief summary of three that I think are cool but could get lost in the hundreds of papers that went public. The unreasonable effectiveness of few-shot learning for machine translation Folks from Google experimented with few-shot MT based on language-model. Instead of using one of the cool huge language models we all know, they train their smaller ones. They prepare specific bi- and tri-lingual LMs (8B parameters; […]

Read more

Iterators and Iterables in Python: Run Efficient Iterations

Python’s iterators and iterables are two different but related tools that come in handy when you need to iterate over a data stream or container. Iterators power and control the iteration process, while iterables typically hold data that you want to iterate over one value at a time. Iterators and iterables are fundamental components of Python programming, and you’ll have to deal with them in almost all your programs. Learning how they work and how to create them is key […]

Read more

Writing Clean, Pythonic Code With namedtuple

Python’s collections module provides a factory function called namedtuple(), which is specially designed to make your code more Pythonic when you’re working with tuples. With namedtuple(), you can create immutable sequence types that allow you to access their values using descriptive field names and the dot notation instead of unclear integer indices. If you have some experience using Python, then you know that writing Pythonic code is a core skill for Python developers. In this video course, you’ll level up […]

Read more

Using NumPy reshape() to Change the Shape of an Array

The main data structure that you’ll use in NumPy is the N-dimensional array. An array can have one or more dimensions to structure your data. In some programs, you may need to change how you organize your data within a NumPy array. You can use NumPy’s reshape() to rearrange the data. The shape of an array describes the number of dimensions in the array and the length of each dimension. In this tutorial, you’ll learn how to change the shape […]

Read more

The Terminal: First Steps and Useful Commands

The terminal can be intimidating to work with when you’re used to working with graphical user interfaces (GUIs). However, it’s an important tool that you need to get used to in your journey as a Python developer. And once you level up your skill of using the terminal, it becomes an extremely powerful tool in your repertoire. With just a few commands in the terminal, you can do tasks that are impossible or at least very tedious to do in […]

Read more

Using the Terminal on Windows

The terminal can be intimidating to work with when you’re used to working with graphical user interfaces. However, it’s an important tool that you need to get used to in your journey as a Python developer. Even though you can substitute some workflows in the terminal with apps that contain a graphical user interface (GUI), you may need to open the terminal at some point in your life as a Python developer. In this Code Conversation, you’ll follow a chat […]

Read more

Prompt Engineering Lecture

Hi all! It’s finally here! Excited to finally publish our ~1 hour special lecture on prompt engineering techniques, applications, and much more. It includes code examples, exercises, and slides.  The lecture is divided into four parts: Part 1 — Introduction to Prompt Engineering Part 2 — Advanced Techniques for Prompt Engineering  Part 3 — Tools and Applications Part 4 — Conclusion and Future Directions Notebook:

Read more

Questions and answers about ChatGPT and large language models

There’s been a lot of media coverage of ChatGPT and language models lately, and I feel like not everything is being said quite right. That’s why I have prepared some questions and answers that hopefully help clarify what they are talking about. Questions: What is a (large) language model? What is ChatGPT? Are GPT-3.5 and ChatGPT the best things out there? Are there any available alternatives, ideally open source? How can ChatGPT speak multiple languages? Does it use machine translation? […]

Read more
1 98 99 100 101 102 908