How Do You Choose Python Function Names?

One of the hardest decisions in programming is choosing names. Programmers often use this phrase to highight the challenges of selecting Python function names. It may be an exaggeration, but there’s still a lot of truth in it. There are some hard rules you can’t break when naming Python functions and other objects. There are also other conventions and best practices that don’t raise errors when you break them, but they’re still important when writing Pythonic code. Choosing the ideal […]

Read more

Unified Database: Laying the foundation for large language model vertical applications

Large language models (LLMs) have become a valuable technology in areas such as content creation, language comprehension, and intelligent dialogue, or interactions between people and computer systems. However, these models generate responses based on patterns and rules observed in fixed training data, which can potentially lead them to produce erroneous and even fictitious information. The models can also struggle with real-time knowledge updates. One technique known as retrieval augmented generation (RAG) can organically combine fresh external information  

Read more

Empowering NGOs with generative AI in the fight against human trafficking

Human trafficking and labor exploitation are ancient problems that have evolved with each major leap in technology, from the agricultural revolution to the information age. But what if the right combination of people, data, and technology could help to tackle these problems on an unprecedented scale? With the emergence of generative AI models, which can create rich text and media from natural language prompts and real-world understanding, we are seeing new opportunities to advance the work of organizations that are […]

Read more

Quiz: Split Your Dataset With scikit-learn’s train_test_split()

Interactive Quiz ⋅ 7 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of how to use train_test_split() from the sklearn library. By working through this quiz, you’ll revisit why you need to split your dataset in supervised machine learning, which subsets of the dataset you need for an unbiased evaluation of your model, how to use train_test_split() to split your data, and how to combine    

Read more

Customize VS Code Settings

Visual Studio Code, is an open-source code editor available on all platforms. It’s also a great platform for Python development. The default settings in VS Code present a somewhat cluttered environment. This Code Conversation with instructor Philipp Acsany is about learning how to customize the settings within the interface of VS Code. Having a clean digital workspace is an important part of your work life. Removing distractions and making code more readable can increase productivity and even help you spot […]

Read more

Python News Roundup: July 2024

Summer isn’t all holidays and lazy days at the beach. Over the last month, two important players in the data science ecosystem released new major versions. NumPy published version 2.0, which comes with several improvements but also some breaking changes. At the same time, Polars reached its version 1.0 milestone and is now considered production-ready. PyCon US was hosted in Pittsburgh, Pennsylvania in May. The conference is an important meeting spot for the community and sparked some new ideas and […]

Read more

Tips for Effective Feature Engineering in Machine Learning

Image by Author Feature engineering is an important step in the machine learning pipeline. It is the process of transforming data in its native format into meaningful features to help the machine learning model learn better from the data. If done right, feature engineering can significantly enhance the performance of machine learning algorithms. Beyond the basics of understanding your data and preprocessing, effective feature engineering involves creating interaction terms, generating indicator variables, and binning features into buckets. These techniques help […]

Read more

5 Common Mistakes in Machine Learning and How to Avoid Them

Image by Author Using machine learning to solve real-world problems is exciting. But most eager beginners jump straight to model building—overlooking the fundamentals—resulting in models that aren’t very helpful. From understanding the data to choosing the best machine learning model for the problem, there are some common mistakes that beginners often tend to make. But before we go over them, you should understand the problem—it is step 0 if you will—you are trying to solve. Ask yourself enough questions to […]

Read more

Quiz: Python’s Magic Methods: Leverage Their Power in Your Classes

Interactive Quiz ⋅ 19 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Python’s Magic Methods. By working through this quiz, you’ll revisit the concept of magic methods in Python, how they work, and how you can use them to customize the behavior of your classes. The quiz contains 19 questions and there is no time limit. You’ll get 1    

Read more

Working With JSON Data in Python

Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Working With JSON Data in Python Since its introduction, JSON has rapidly emerged as the predominant standard for the exchange of information. Whether you want to transfer data with an API or store information in a document database, it’s likely you’ll encounter JSON. Fortunately, Python provides robust tools to facilitate this process and help […]

Read more
1 2 3 4 5 885