Python tutorials

Why you can’t switch to Python 3.10 just yet

Python 3.10 is now available–but should you switch to it immediately? And if not now, when? The short answer is, no, you probably don’t want to switch immediately; quite possibly you can’t switch immediately. To understand why, we need to consider Python packaging, the software development process, and take a look at the history of past releases. We can then make a guess about when Python 3.10 will actually be usable. The problems with a new major Python release I’m […]

Read more

Python’s sum(): The Pythonic Way to Sum Values

Python’s built-in function sum() is an efficient and Pythonic way to sum a list of numeric values. Adding several numbers together is a common intermediate step in many computations, so sum() is a pretty handy tool for a Python programmer. As an additional and interesting use case, you can concatenate lists and tuples using sum(), which can be convenient when you need to flatten a list of lists. In this tutorial, you’ll learn how to: Sum numeric values by hand […]

Read more

The NLP Cypher | 10.03.21

RAFT is a few-shot classification benchmark that tests language models: – across multiple domains (lit reviews, medical data, tweets, customer interaction, etc.) – on economically valuable classification tasks (someone inherently cares about the task) – with evaluation that mirrors deployment (50 labeled examples per task, info retrieval allowed, hidden test set)  

Read more

Cool New Features in Python 3.10

Python 3.10 is out! Volunteers have been working on the new version since May 2020 to bring you a better, faster, and more secure Python. As of October 4, 2021, the first official version is available. Each new version of Python brings a host of changes. You can read about all of them in the documentation. Here, you’ll get to learn about the coolest new features. In this course, you’ll learn about: Debugging with more helpful and precise error messages […]

Read more

Python 3.10: Cool New Features for You to Try

Python 3.10 is out! Volunteers have been working on the new version since May 2020 to bring you a better, faster, and more secure Python. As of October 4, 2021, the first official version is available. Each new version of Python brings a host of changes. You can read about all of them in the documentation. Here, you’ll get to learn about the coolest new features. In this tutorial, you’ll learn about: Debugging with more helpful and precise error messages […]

Read more

Building Docker images on GitLab CI: Docker-in-Docker and Podman

If you’re using GitLab CI to build your software, you might also want to use it to build Docker images of your application. This can be a little tricky, because by default GitLab CI runs jobs inside Docker containers. The standard technique for getting around this problem is using Docker-in-Docker, but you can also use a simpler technique by using Podman, the reimplemented version of Docker. Let’s see why and how. Option #1: Docker-in-Docker When you run the docker command-line […]

Read more

Hosting a Django Project on Heroku

As a novice web developer, you’ve built your portfolio app and shared your code on GitHub. Perhaps, you’re hoping to attract technical recruiters to land your first programming job. Many coding bootcamp graduates are likely doing the same thing. To differentiate yourself from the crowd and boost your chances of getting noticed, you can start hosting your Django project online. For a hobby Django project, you’ll want a hosting service that’s free of charge, quick to set up, user-friendly, and […]

Read more

Rock, Paper, Scissors With Python: A Command Line Game

Game programming is a great way to learn how to program. You use many tools that you’ll see in the real world, plus you get to play a game to test your results! An ideal game to start your Python game programming journey is rock paper scissors. In this course, you’ll learn how to: Code your own rock paper scissors game Take in user input with input() Play several games in a row using a while loop Clean up your […]

Read more

Reverse Strings in Python: reversed(), Slicing, and More

When you’re using Python strings often in your code, you may face the need to work with them in reverse order. Python includes a few handy tools and techniques that can help you out in these situations. With them, you’ll be able to build reversed copies of existing strings quickly and efficiently. Knowing about these tools and techniques for reversing strings in Python will help you improve your proficiency as a Python developer. In this tutorial, you’ll learn how to: […]

Read more

Scanning your Conda environment for security vulnerabilities

You don’t want to deploy an application that has security vulnerabilities. That means your own code, but also third-party dependencies: it doesn’t matter how secure your code is if it’s exposing a TLS socket with a version of OpenSSL that has a remote code execution vulnerability. For pip-based Python applications, you’d usually run vulnerability scanners on Python dependencies like Django, and on system packages like OpenSSL. With Conda, however, the situation is a little different: Conda combines both types of […]

Read more
1 103 104 105 106 107 181