Quiz: How Do You Choose Python Function Names?

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 choose Python function names. By working through this quiz, you’ll revisit the rules and conventions for naming Python functions and why they’re important for writing Pythonic code. Choosing the ideal Python function names makes your code more readable and easier to maintain. Code with well-chosen names can also be    

Read more

Abstracts: July 18, 2024

MITRA: So the post-training phase is very important for language models. You can really improve the model a lot by creating high-quality synthetic data. The problem is, however, though, high-quality synthetic data creation requires lots of human effort and expertise. The problem that we’re trying to tackle is, how do you reduce human effort? How can you create high-quality data with really low amount of human effort? When you have a language model and, let’s say, you want to apply […]

Read more

Python Protocols: Leveraging Structural Subtyping

In Python, a protocol specifies the methods and attributes that a class must implement to be considered of a given type. Protocols are important in Python’s type hint system, which allows for static type checking through external tools, such as mypy, Pyright, and Pyre. Before there were protocols, these tools could only check for nominal subtyping based on inheritance. There was no way to check for structural subtyping, which relies on the internal structure of classes. This limitation affected Python’s […]

Read more

Research Focus: Week of July 15, 2024

Welcome to Research Focus, a series of blog posts that highlights notable publications, events, code/datasets, new hires and other milestones from across the research community at Microsoft. NEW RESEARCH MG-TSD: Advancing time series analysis with multi-granularity guided diffusion model Diffusion probabilistic models have the capacity to generate high-fidelity samples for generative time series forecasting. However, they also present issues of instability due to their stochastic nature. In a recent article: MG-TSD: Advancing time series analysis with multi-granularity  

Read more

Tips for Effectively Training Your Machine Learning Models

Image by Editor | Midjourney In machine learning projects, achieving optimal model performance requires paying attention to various steps in the training process. But before focusing on the technical aspects of model training, it is important to define the problem, understand the context, and analyze the dataset in detail. Once you have a solid grasp of the problem and data, you can proceed to implement strategies that’ll help you build robust and efficient models. Here, we outline five actionable tips […]

Read more

Quiz: How to Write Beautiful Python Code With PEP 8

Interactive Quiz ⋅ 12 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of how to write beautiful Python code with PEP 8. By working through this quiz, you’ll revisit the key guidelines laid out in PEP 8 and how to set up your development environment to write PEP 8 compliant Python code. The quiz contains 12 questions and there is    

Read more

Quiz: How to Use Generators and yield in Python

Interactive Quiz ⋅ 10 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Python generators. Generators and the Python yield statement can help you when you’re working with large datasets that might overwhelm your machine’s memory. Another use case is when you have a complex function that needs to maintain an internal state every time it’s called. When you understand Python generators, then you’ll be    

Read more

Exercises Course: Introduction to Web Scraping With Python

Web scraping is the process of collecting and parsing raw data from the Web, and the Python community has come up with some pretty powerful web scraping tools. The Internet hosts the greatest source of information on the planet. Many disciplines, such as data science, business intelligence, and investigative reporting, can benefit enormously from collecting and analyzing data from websites. In this course, you’ll practice: Parsing website data using string methods and regular expressions Parsing website data using an HTML […]

Read more

Data-driven model improves accuracy in predicting EV battery degradation

Rising carbon emissions have significantly challenged sustainable development in recent years, prompting global efforts to implement carbon reduction policies and achieve long-term carbon neutrality. A crucial step in this transition involves the recycling and reuse of power batteries, which are assessed for their state-of-health (SoH) and then repaired or restructured for reuse in smaller-sized electric vehicles (EVs), energy storage systems, and smart streetlights. This process not only extends battery life but also maximizes their residual value. However, accurately assessing this […]

Read more

Quiz: How to Flatten a List of Lists in Python

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 flatten a list in Python. You’ll write code and answer questions to revisit the concept of converting a multidimensional list, such as a matrix, into a one-dimensional list. The quiz contains 7 questions and there is no time limit. You’ll get 1 point for each    

Read more
1 21 22 23 24 25 907