Code

Must-read: 7 Fresh Articles on Python

Must-read: 7 Fresh Articles on Python

Free Python Course ➞ Mini-course for beginners and experienced coders. 4 cool projects in the portfolio, live communication with the speaker. Click and find out what you can learn in the course.

Learn more

Every week, we carefully select relevant materials from the English-speaking internet. This issue presents articles dedicated to the Python programming language. These materials will help you deepen your knowledge and skills in the field of Python development, and introduce you to the latest trends and new tools in this language ecosystem.

Apple's transition to new processors: what to expect for data science developers

Reading this article will help you understand whether it is worth buying a computer with an M1 processor for working in the field of data science. We will consider the main advantages and disadvantages of this platform, as well as its performance in the context of data analysis and machine learning. You will be able to evaluate how effective the M1 is for data science tasks and whether it is suitable for your professional needs.

You can read on the Anaconda blog.

Apple is ending its partnership with Intel and switching to using its own M1 processors for its computers. This move marks a significant change in the architecture of Apple devices, which promises to improve performance and energy efficiency. M1 processors are designed with macOS in mind, delivering optimized app performance and a better overall user experience. Switching to custom chips will also allow Apple to better control the manufacturing process and introduce new technologies faster.

The key benefits of the M1 are its high performance, power efficiency, and usability. Thanks to its architecture, the M1 ensures fast app launches and instant task completion. Power efficiency allows the device to operate longer without recharging, which is especially important for users on the go. In addition, the M1 supports a wide range of software, making it a versatile choice for both professionals and everyday users. These characteristics make the M1 an excellent solution for work, study, and entertainment.

  • Laptops will hold their charge better.
  • High single-threaded performance.

The upgrade to new processors brings significant benefits for everyday users. These modern solutions provide higher performance, allowing you to complete tasks faster. Furthermore, the new processors use power more efficiently, reducing electricity costs. Thanks to these improvements, users can expect faster and more cost-effective solutions for their everyday tasks. Data scientists face a different situation. Although the new processor has 8 cores, it can more accurately be described as "4 + 4": four cores for high performance and four cores for high efficiency. This division optimizes computing tasks, balancing power and energy savings. This allows data scientists to efficiently process large volumes of data while running complex machine learning and analytics algorithms.

This system is widely used in smartphones and tablets, where the "efficient" cores are designed to run background processes and low-priority tasks. In the Python programming language, a situation arises when the system perceives the presence of eight cores. This means that when eight threads are running simultaneously, half of them will be processed on less productive cores, which can negatively affect the overall performance of the application. Optimizing multithreaded tasks in Python requires taking into account the processor architecture to achieve maximum efficiency.

What else could be improved in M1 processors:

  • Maximum RAM is 16 GB. Memory is very important when working with large datasets, and 16 GB may not be enough.
  • Weak GPU and ANE support in the Python ecosystem for Data Science.

If you consider Data Science as entertainment or a hobby, then the new Apple laptop is an excellent choice. However, if Data Science is a priority for you, you should consider Mac models with Intel processors. These devices deliver higher performance and stability when working with intensive computations and large amounts of data.

This article provides a rich depth of detail about the M1 processor and its applications in data science. It covers aspects of working with Python packages, as well as using Linux and Windows operating systems. It discusses the software changes required to migrate to the M1 architecture, helping users optimize their workflows and take advantage of the new processor's capabilities.

Python at Google: An Interview with Dustin Ingram

Reading this material will allow you to learn about the career path of a prominent member of the Python community, as well as how Google uses the Python programming language in its projects. This will help you better understand how Python is used in large tech companies and the opportunities it opens up for developers.

You can read the materials on the Real Python platform.

The Real Python editorial team interviewed Dustin Ingram, an advocate developer at Google, the Python Software Foundation project lead, and a Google Cloud community leader. During the conversation, he shared his experiences starting his programming career, impressions of his first visit to PyCon, and discussed important aspects regarding the differences between PyPI and other similar platforms.

Dustin prefers to minimize the time spent in Google's closed environment in order to maintain contact with the developer community. At Google, Python is a unique ecosystem with its own tools and rules. One of its features is the use of a monorepository, which leads to rare use of PyPI (the Python package repository). This creates certain difficulties for developers who are accustomed to standard methods of working with packages in Python.

Dustin has long sought to diversify the Python Software Foundation's funding sources, but his ideas did not find support among his colleagues. In 2020, amid the COVID-19 pandemic, when PyCon, the event that generates 90% of the foundation's revenue, was canceled, his proposal became especially relevant. This led to Dustin taking over as PSF's leader, opening up new opportunities to raise funds and support the Python community.

Property-Based Testing

Reading this article will help you become familiar with a new and promising testing method. You will learn about its features, benefits, and applications in various fields. This type of testing can significantly improve the quality of processes and increase work efficiency. Don't miss the opportunity to expand your knowledge and stay up-to-date with modern testing trends.

Read news on the Python Software Foundation website to stay up-to-date with the latest updates and events in the world of Python. Here you will find relevant articles, event announcements, and important news related to the development of the Python programming language and its ecosystem. Stay connected with the Python community for new features and resources.

This article is a summary of Zach Hatfield-Dods's talk, presented at PyCon 2021. In his presentation, he detailed property-based testing techniques that improve software quality. Property-based testing is an approach in which program specifications are formalized and tests are automatically generated based on these specifications. This helps identify errors that might be missed during traditional testing. Zach Hatfield-Dods discussed the basic principles and advantages of this method and presented examples of its application in real-world projects. Property-based testing helps improve code reliability and reduce the time spent on manual testing, making it an essential tool for developers.

This type of testing has many advantages. First, it allows for the early detection of errors, significantly reducing the cost of fixing them. Second, testing ensures high product quality, increasing user satisfaction. It also helps improve software performance and reliability. In addition, this approach helps teams collaborate more effectively because everyone involved has the opportunity to make adjustments and improvements in a timely manner. As a result, this type of testing becomes an integral part of successful software development.

  • Allows you to create input data that you would never have thought of on your own.
  • Can detect an incorrect result, even if the correct one is not defined.
  • Helps you find errors in the concept, not just in the code.

This article presents deep reflections on testing, including examples based on various properties, as well as an analysis of current trends in testing. Key aspects and methodologies are considered that will help you better understand the testing process and its importance in the modern environment.

Message from the new head of CPython

Reading materials about Python allows you to deeper understand the development process and the evolution of CPython. This knowledge will help you understand key changes, new features, and the direction the language is heading. Understanding these aspects is important for optimizing your code and becoming more efficient with Python.

Read more on Lukasz Langa's blog.

CPython has a new leader, Lukasz Langa. He has five approved PEPs under his belt, as well as experience in management and mentoring. In his role as developer advocate, he addresses all Python users through his blog. Lukasz shares his thoughts on his new position, his plans for the future, and his goals for the team. His approach is focused on developing the community and improving the Python ecosystem, which will contribute to the growth and innovation of the language.

Lukasz believes that his role is not to act as a "dictator" who controls the development of the language, but to support the team, guide them, and create the conditions for successful completion of tasks. The main goals he sets for himself include facilitating development, facilitating the work process, and providing the necessary resources.

  • Do PR and manage the backlog.
  • Keep track of resources: finances, volunteers.
  • Prioritize CPython tasks.
  • Work on priority tasks.

Static Type Simulation in Python

Reading this material is necessary for mastering a new useful Python function that will significantly simplify the programming process. Learning this feature will help improve your skills and make the code more efficient and readable.

You can read on the Towards Data Science blog. This resource offers a wide range of articles and materials on data analysis, machine learning, and artificial intelligence. The blog regularly publishes new research, tutorials, and practical tips, making it a useful resource for both data science professionals and beginners.

Python has dynamic typing, which brings many benefits but also draws criticism. Dynamic typing can lead to unpredictable behavior and complicate debugging. However, starting with version 3.5, Python provides the ability to use type annotations, which simulate static typing. This improves code readability and makes it easier to maintain by allowing developers to explicitly specify expected data types. Thus, type annotations become a useful tool for improving the quality of Python code while maintaining its flexibility.

The author shares methods for simulating static types, emphasizing common pitfalls and recommended tools. Finally, five examples of type annotations that contribute to improved code quality are presented. These recommendations will help developers improve the readability and reliability of their projects.

What is Celery and how to use it

Reading about Celery allows you to unlock its full potential and master new techniques for working with this popular task management system. This knowledge will help you effectively use Celery to process background tasks and improve the performance of your applications. Learn about best practices, optimizations, and capabilities to get the most out of Celery's functionality in your projects.

Read articles and materials on the djangostars website. Here you will find up-to-date information, useful tips, and the latest trends in Django development. We offer high-quality resources for developers who want to deepen their knowledge and improve their skills. Dive into the world of Django and find answers to all your questions.

Celery is a powerful tool that helps Python developers optimize application performance by managing task queues. Although Celery is often associated with sending email, its capabilities are much broader. In this article, we'll cover the basics of working with Celery, which will be useful for both beginners and more experienced users. You'll learn how to configure Celery, create and process tasks, and integrate it with other components of your application to improve efficiency and reduce server load.

  • Run multiple small tasks in parallel with the main one.
  • Create task queues.
  • Configure execution time.
  • Work with data blocks in long-running tasks.

With Celery, you can significantly improve your time management and increase productivity by automating routine tasks using your computer. This tool allows you to organize background tasks and manage processes, freeing up time for more important things. Using Celery helps you streamline your workflows and focus on core tasks, which in turn leads to increased efficiency and better results.

Four Underrated Libraries for Python

Reading new materials can significantly simplify your work by using modern libraries. By mastering new tools, you can increase your productivity and improve the quality of your tasks. New libraries offer solutions that streamline processes and make your work more efficient. Keep your skills current by studying the latest trends and tools in your field.

Read more on the blog "Towards Data Science".

Finding a new and interesting library in Python can be a challenging task, especially considering that there are over ten thousand libraries in the language ecosystem. As a result, developers often use only a few of the most popular solutions. This article introduces four outstanding libraries worth considering to enhance your project.

The original article provides examples of working with these libraries, as well as explains their features and non-obvious use cases. You will learn how to effectively apply these libraries to various projects and increase your productivity.

If you are interested in the Python programming language but find this article difficult to understand, we recommend starting with the "Python Developer Profession" course on the Skillbox platform. This course will help you master the basics and deepen your knowledge, making learning Python more accessible and understandable.