Python tutorials

Memory location matters for performance

If you’re writing high-performance code, what matters is how many CPU instructions you run. Right? That’s what I learned long ago in school, anyway, when I took algorithms and data structures classes. The basic assumption was that reading or writing to memory took a small, constant amount of time, and so you could focus on how many operations were being done. This was so fundamental to how we were taught that we didn’t even have to write real code: pseudo-code […]

Read more

Build and Submit HTML Forms With Django – Part 4

In this four-part tutorial series, you’re building a social network with Django that you can showcase in your portfolio. This project is strengthening your understanding of relationships between Django models and showing you how to use forms so that users can interact with your app and with each other. You’re also making your site look good by using the Bulma CSS framework. In the previous part of this series, you added functionality so that users can create dweets on the […]

Read more

Working With Pipenv

Managing multiple Python projects with their own third-party packages can get complicated. It is best practice to use a virtual environment to sandbox the requirements for each of your projects. Enter pipenv, the official recommended package management tool for Python. It handles both installation and virtual environments to help you manage your Python dependencies. In this course, you’ll learn about: How to use pip to install a package Where Python puts packages by default How to use pipenv to create […]

Read more

Build and Handle POST Requests in Django – Part 3

In this four-part tutorial series, you’re building a social network with Django that you can showcase in your portfolio. This project is strengthening and demonstrating your understanding of relationships between Django models and showing you how to use forms so that users can interact with your app and with each other. You’re also making your site look good by using the CSS framework Bulma. In the previous part of this tutorial series, you built templates and views for displaying a […]

Read more

Build a Django Front End With Bulma – Part 2

In this four-part tutorial series, you’re building a social network with Django that you can showcase in your portfolio. This project will strengthen your understanding of relationships between Django models and show you how to use forms so that users can interact with your app and with each other. You’ll also make your Django front end look good by using the Bulma CSS framework. In the first part, you extended the Django User model to add profile information that allows […]

Read more

CentOS 8 is dead: choosing a replacement Docker image

For many years, CentOS provided a free, binary-compatible version of RedHat Enterprise Linux (RHEL). But as of January 2022, CentOS 8 has reached its end-of-life, even as RHEL 8 will still be supported for many years. So if you’ve been using centos:8 as your base Docker image, what should you use now? Motivation: a stable, long-term-support base image RHEL 8 was released in May 2019, will continue to get full support until May 2024, and security updates until May 2029. […]

Read more

Deploy Your Python Script on the Web With Flask

You wrote a Python script that you’re proud of, and now you want to show it off to the world. But how? Most people won’t know what to do with your .py file. Converting your script into a Python web application is a great solution to make your code usable for a broad audience. In this course, you’ll learn how to go from a local Python script to a fully deployed Flask web application that you can share with the […]

Read more

Build a Social Network With Django – Part 1

In this four-part tutorial series, you’ll build a social network with Django that you can showcase in your portfolio. This project will strengthen your understanding of relationships between Django models and show you how to use forms so that users can interact with your app and with each other. You’ll also learn how to make your site look good by using the Bulma CSS framework. After finishing the first part of this series, you’ll move on to the second part, […]

Read more

The NLP Cypher | 12.26.21

Merry Christmas 🎄 for those celebrating. And Happy New Year! Even OpenAI is feeling the holiday spirit: they open sourced their photorealistic GLIDE model several days ago. Includes three notebooks: The text2im notebook shows how to use GLIDE (filtered) with classifier-free guidance to produce images conditioned on text prompts. The inpaint notebook shows how to use GLIDE (filtered) to fill in a masked region of an image, conditioned on a text prompt. The clip_guided notebook shows how to use GLIDE […]

Read more

Python Zip Imports: Distribute Modules and Packages Quickly

Python allows you to import code from ZIP files directly through Zip imports. This interesting built-in feature enables you to zip Python code for distribution purposes. Zip imports also help if you often work with Python code that comes in ZIP files. In either case, learning to create importable ZIP files and to import code from them will be a valuable skill. Even if your day-to-day workflow doesn’t involve ZIP files containing Python code, you’ll still learn some fun and […]

Read more
1 98 99 100 101 102 181