Planet Python

Subscribe to Planet Python feed
Planet Python - http://planetpython.org/
Updated: 3 hours 23 min ago

Read the Docs: Read the Docs newsletter - January 2024

Tue, 2024-01-09 19:00
News and updates
  • We have shipped New improvements to redirects, making our redirects much more powerful and flexible.

  • We have shipped an updated approach to notifications. Currently there isn’t much UX difference, but as we move forward with this project we will be able to provide more context and control to users.

  • We continue to work on improving Addons, our new approach to documentation integrations. New documentation and bug fixing continues to happen.

  • We shipped version 2.0 of our Read the Docs Sphinx Theme, which adds support for new Sphinx releases and drops support for many old versions of Sphinx and Python.

You can always see the latest changes to our platforms in our Read the Docs Changelog.

Upcoming changes
  • Addons will be made more configurable in our new beta dashboard, starting a trend of moving away from the old dashboard for new features.

  • Our beta dashboard continues to be tested in public beta, and new functionality for Addons configuration will only be available in that new interface.

  • We continue to work on some business model changes enabled by the new redirects work, including allowing access to Forced Redirects for more users.

Want to follow along with our development progress? View our full roadmap 📍️

Possible issues
  • Users need to update their webhooks before January 31, 2024 if they are configured without a secret. All users who need to take action should have received email and site notifications about this.

  • We are discussing removing support for all VCS systems except Git, as our userbase is heavily biased towards Git users and it will simplify maintenance and development of features. We stopped developing features for Mercurial, Subversion, and Bazaar years ago, and we are considering removing support for them entirely. We will be reaching out to these users to get feedback on this change.

Questions? Comments? Ideas for the next newsletter? Contact us!

Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #611 (Jan. 9, 2024)

Tue, 2024-01-09 14:30

#611 – JANUARY 9, 2024
View in Browser »

How to Get the Current Time in Python

In this video course, you’ll be getting the current time in Python. You’ll get your hands on a datetime object that represents the current time. You’ll see how to format it according to international standards, and you’ll even check out how computers represent time.
REAL PYTHON course

Using a Markov Chain to Generate Readable Nonsense

Describes a simple Markov chain algorithm to generate reasonable-sounding but utterly nonsensical text, and presents some example outputs as well as a Python implementation in only 20 lines of code.
BEN HOYT

End-to-End Data Science Workflows: ML Workflows With Python

Learn Machine Learning workflow with Python & Posit Team in this insightful video. Starting with an example classification model, through design, development, deployment, & maintenance, learn from our experience with thousands of enterprise customers →
POSIT sponsor

Top Python Libraries of 2023

Tryolab’s 9th annual Top Python libraries list. Loads of LLM stuff this time around, not surprisingly.
DESCOINS & ALFARO

DjangoCon Europe 2024 CFP Now Open

DJANGO SOFTWARE FOUNDATION

Django Bugfix Releases Issued: 4.2.9 and 5.0.1

DJANGO SOFTWARE FOUNDATION

Python GUI Designer “PAGE” 8.0 Released

THEDESIGNATEDGEEK.XYZ • Shared by Greg Walters

Python Jobs Senior Python Architect and Tech Lead (America)

Six Feet Up

Python Tutorial Editor (Anywhere)

Real Python

More Python Jobs >>>

Articles & Tutorials Efficient Inequality Joins in Pandas

Joins in Pandas are equality based. However, there are other scenarios that require joins on inequality or a combination of equi and non-equi joins. Usually in Pandas this is executed via a Cartesian join which can be inefficient as well as memory intensive. This article shows an efficient way to handle inequality joins in Pandas.
SAMUEL ORANYELI • Shared by Samuel oranyeli

2023 Real Python Tutorial & Video Course Wrap-Up

Three members of the Real Python team are joining us this week: Kate Finegan, Tappan Moore, and Philipp Acsany. We wanted to share a year-end wrap-up with tutorials, step-by-step projects, code conversations, and video courses that showcase what our team created in 2023.
REAL PYTHON podcast

Advice for New Devs Who’ve Read Other Advice Essays

After reading some programming advice posts, this author decided a lot of them concentrated on the wrong things. Here is his own take. Associated HN discussion.
HILLEL WAYNE

Building a Bootstrap Styled Form in Vanilla Django

When playing with django-crispy-forms, David wondered what it would take to build a Bootstrap 5 form in Django without any third party libraries. This article outlines the work involved.
DAVID SMITH

Where Have You Installed Your Python Packages?

This article introduces virtual environments and what it means to run pip install. It includes information about the sys module and variables it uses to look for your packages.
KE PI

How to Use Python in Excel Natively

How to use Python in Excel natively using libraries like Pandas, NumPy, Matplotlib, Seaborn and more for analysis and spectacular charts. Includes a cheat sheet.
MYNDA TREACY

My Proof-of-Concept Record Type

As part of a conversation as to whether Python should include a struct-like syntax, Brett has created a project. This post outlines the proof-of-concept.
BRETT CANNON

Python Rgonomics

If you’re coming to Python from R, this article outlines some libraries that have an R-like feel, helping you make the transition to Pythonic workflows.
EMILY RIEDERER

10 Things Software Developers Should Learn About Learning

Developers want and need to perpetually learn. Needing to learn and knowing how are two different things though, and this article highlights key ideas to teach yourself how to learn better.
BROWN, HERMANS, & MARGULIEUX

Don’t Use Python’s @property

A quick opinion piece on the over-use of the @property decorator and how it can lead to misunderstandings in your code.
JAMES BENNETT

10 Noteworthy AI Research Papers of 2023

This article is a compilation of 10 noteworthy AI research papers of 2023.
SEBASTIAN RASCHKA

Projects & Code django-ninja-crud: CRUD Endpoints & Tests With Ninja

GITHUB.COM/HBAKRI

pathway: Framework for Real-Time Data Processing

GITHUB.COM/PATHWAYCOM

cyclopts: Intuitive CLIs Based on Python Type Hints

GITHUB.COM/BRIANPUGH

netchecks: Tool to Validate Assumptions About the Network

GITHUB.COM/HARDBYTE

arrest: Validate REST API Calls Using Pydantic and HTTPX

GITHUB.COM/S-BOSE

Events Building Python Communities Around Python for Kids

January 10 to January 11, 2024
NOKIDBEHIND.ORG

Weekly Real Python Office Hours Q&A (Virtual)

January 10, 2024
REALPYTHON.COM

Python Atlanta

January 12, 2024
MEETUP.COM

PyDelhi User Group Meetup

January 13, 2024
MEETUP.COM

DFW Pythoneers 2nd Saturday Teaching Meeting

January 13, 2024
MEETUP.COM

Inland Empire Python Users Group Monthly Meeting

January 17, 2024
MEETUP.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #611.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

PyCharm: How to Connect Django With MongoDB

Tue, 2024-01-09 09:06
One of the most popular web frameworks, Django, has adopted the “batteries included” philosophy. This means that you can build a production-ready application using only the vanilla Django with no extensions or other frameworks. Even the database SQLite is available out of the box. SQLite is great for learning and developing small applications, but has […]
Categories: FLOSS Project Planets

Real Python: Python Basics Exercises: Functions and Loops

Tue, 2024-01-09 09:00

As you learned in Python Basics: Functions and Loops, functions serve as the fundamental building blocks in almost every Python program. They’re where the real action happens!

You now know that functions are crucial for breaking down code into smaller, manageable chunks. They enable you to define actions that your program can execute repeatedly throughout your code. Instead of duplicating the same code whenever your program needs to accomplish a particular task, you can simply call the function.

However, there are instances when you need to repeat certain code multiple times in a row. This is where loops become invaluable.

In this Python Basics Exercises video course, you’ll practice:

  • Creating user-defined functions
  • Implementing for loops
  • Getting user input
  • Rounding numbers

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. You can also check out the other Python Basics courses.

Note that you’ll be using IDLE to interact with Python throughout this course.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Python Bytes: #366 Put It In The Backlog

Tue, 2024-01-09 03:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><a href="https://tonybaloney.github.io/posts/python-gets-a-jit.html"><strong>Python 3.13 gets a JIT</strong></a></li> <li><a href="https://fosstodon.org/@basnijholt/111605262871991435">UniDep - Unified Conda and Pip Dependency Management</a></li> <li><a href="https://hynek.me/articles/pull-requests-branch/"><strong>Don’t Start Pull Requests from Your Main Branch</strong></a></li> <li><a href="https://github.com/pomponchik/instld"><strong>instld: The simplest package management</strong></a></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=PRaTs3PnJvI' style='font-weight: bold;'>Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://courses.pythontest.com/p/the-complete-pytest-course"><strong>The Complete pytest Course</strong></a></li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.</p> <p><strong>Brian #1:</strong> <a href="https://tonybaloney.github.io/posts/python-gets-a-jit.html"><strong>Python 3.13 gets a JIT</strong></a></p> <ul> <li>Anthony Shaw</li> <li>Great article that walks through JIT concepts with a small example as if you were writing a parser in Python instead of C.</li> <li>Covers <ul> <li>What is a JIT?</li> <li>What is a copy-and-patch JIT? and Why?</li> <li>How does the Python JIT work?</li> <li>Is it faster?</li> <li>This is a building block to future improvements</li> </ul></li> </ul> <p><strong>Michael #2:</strong> <a href="https://fosstodon.org/@basnijholt/111605262871991435">UniDep - Unified Conda and Pip Dependency Management</a></p> <ul> <li>🔄 Single requirements.yaml for both #Conda &amp; #Pip.</li> <li>⚙️ Works with pyproject.toml &amp; setup.py.</li> <li>🏢 Perfect for monorepos.</li> <li>🔒 Create consistent conda-lock files for multiple projects.</li> <li>🌍 Platform-specific support.</li> <li>🚀 <code>unidep install</code> for easy setup.</li> <li><a href="https://github.com/basnijholt/unidep">Full source page</a>.</li> </ul> <p><strong>Brian #3:</strong> <a href="https://hynek.me/articles/pull-requests-branch/"><strong>Don’t Start Pull Requests from Your Main Branch</strong></a></p> <ul> <li>Hynek Schlawack</li> <li>When contributing to other users’ repositories, always start a new branch in your fork.</li> <li>Reasons to not use main <ul> <li>Forces you to only have one change in progress</li> <li>Merges will generate conflicts and you can’t pull from that branch anymore. Need to kill the fork and start over</li> <li>If the target repo has branch protection on, then maintainers can’t push to your branch.</li> </ul></li> <li>Hynek also provides a way to fix things if you’ve already started your changes on a main branch fork.</li> </ul> <p><strong>Michael #4:</strong> <a href="https://github.com/pomponchik/instld"><strong>instld: The simplest package management</strong></a></p> <ul> <li>Thanks to this package, it is very easy to manage the lifecycle of packages.</li> <li>⚡ Run your code without installing libraries.</li> <li>⚡ You can use 2 different versions of the same library in the same program.</li> <li>⚡ You can use incompatible libraries in the same project, as well as libraries with incompatible/conflicting dependencies.</li> <li>⚡ It's easy to share written scripts. The script file becomes self-sufficient - the user does not need to install the necessary libraries.</li> <li>⚡ The library does not leave behind "garbage". After the end of the program, no additional files remain in the system.</li> </ul> <p><strong>Extras</strong> </p> <p>Brian: </p> <ul> <li><a href="https://courses.pythontest.com/p/complete-pytest-course">The Complete pytest Course</a> is now actually complete <ul> <li>Although updates will happen when and if necessary as pytest/Python changes.</li> <li>To celebrate, <strong><em>use code 2024 in January for 10% off</em></strong> any pricing option.</li> </ul></li> <li>More episodes of <a href="https://pythonpeople.fm">Python People</a> and <a href="https://podcast.pythontest.com">Python Test</a> on the way now <ul> <li>That course took up a lot of my time in late 2023</li> <li>Just released an <a href="https://pythonpeople.fm/episodes/will-vincent-django-writing-technical-books">episode with Will Vincent</a> and Python Test will have a new episode this week and for the foreseeable future.</li> <li>Let me know if you want to be on Python People or Python Test</li> </ul></li> </ul> <p>Michael:</p> <ul> <li><em>Hatch follow up: Great coverage of Hatch v1.8.0! One small correction: only the binaries for Hatch are signed with the certificate from the PSF.</em> - <strong>Ofek</strong></li> <li><a href="https://status.python.org/incidents/0mld3fml68nd">PyPI new user registration temporarily suspended</a></li> <li>Pagefind and <a href="https://fosstodon.org/@mkennedy/111637520985150159">how I’m using it</a></li> <li><a href="https://www.youtube.com/watch?v=KeegA_uzzSo">Talk Python Live: Data Doodles event</a> coming early Feb</li> <li>New essay: <a href="https://mkennedy.codes/posts/ai-features-a-waste-of-time/">AI Features a Waste of Time?</a></li> </ul> <p><strong>Joke:</strong> <a href="https://workchronicles.com/put-it-in-the-backlog/">Put it in the backlog</a></p>
Categories: FLOSS Project Planets

Python⇒Speed: NumPy 2 is coming: preventing breakage, updating your code

Mon, 2024-01-08 19:00

If you’re writing scientific or data science code with Python, there’s a good chance you’re using NumPy, directly or indirectly. Pandas, Scikit-Image, SciPy, Scikit-Learn, AstroPy… these and many other packages depend on NumPy.

NumPy 2 is a new major release, with a release candidate coming out February 1st 2024, and a final release a month or two later. Importantly, it’s backwards incompatible; not in a major way, but enough that some work might be required to upgrade. And that means you need to make sure your application doesn’t break when NumPy 2 comes out.

In this article we’ll cover:

  • The different ways the new release might break your application.
  • A quick reminder about the importance of pinning packages.
  • How to ensure your application doesn’t install NumPy 2 until you’re ready.
  • How to easily upgrade your code to support NumPy 2.
Read more...
Categories: FLOSS Project Planets

Seth Michael Larson: Security Developer-in-Residence Weekly Report #24

Mon, 2024-01-08 19:00
Security Developer-in-Residence Weekly Report #24 AboutBlogNewsletterLinks Security Developer-in-Residence Weekly Report #24

Published 2024-01-09 by Seth Larson
Reading time: minutes

This critical role would not be possible without funding from the OpenSSF Alpha-Omega project. Massive thank-you to Alpha-Omega for investing in the security of the Python ecosystem!

Welcome to the first weekly report of 2024!

Software Bill-of-Materials for CPython

Continuing from 2023 there will be a focus on Software Bill-of-Materials (SBOMs) for CPython and incremental improvements to the CPython release process as more is automated.

I made a suggestion to release managers to backport SBOM tooling in the CPython repository to all supported release streams in an effort to treat SBOMs more like an additional artifact instead of a new feature of CPython. This would mean SBOMs would be available for previous CPython releases and we won't have to wait until the 3.13.0 stable release in October to make them available for consumption.

Trusted Publisher provenance on PyPI

Last week William Woodruff published a pre-PEP discussion for using Trusted Publisher configurations to bootstrap publish provenance on PyPI. I was involved in reviewing the initial draft, so I'm excited to see the discussion! Some things to highlight that came from the discussion:

  • Don't want to start this work concretely until there are more than one Trusted Publisher provider for PyPI. Currently, PyPI only supports GitHub.
  • Getting the user interface right on PyPI to not overemphasize what publish provenance implies for consumers or make projects without publish provenance feel "insecure". Having "verified" URLs to the source repository seems like a good place to start?
  • Publish provenance isn't build provenance, build provenance requires more than what Trusted Publishers is able to provide on its own.
  • Donald's comment on making things better for a common platform (in this case, GitHub and future Trusted Publisher providers) without requiring everyone to switch to that platform.
  • Not everyone uses automated deployment workflows, we'll need to design a build integrity mechanism that supports these use-cases. I commented my thoughts on such a system using third-party observations on build reproducibility from a claimed source.
  • There are many reasons why folks aren't using Trusted Publishers, even when on GitHub.

Looking forward to helping however I can with this project once it is proposed as a PEP!

Build reproducibility of macOS artifacts

Previously I worked on build reproducibility for CPython source artifacts which are both tarballs. I want to provide build reproducibility to all artifacts that CPython provides including the Windows and macOS binary installers.

Turns out that macOS's Package files (.pkg) use the eXtensible ARchive (XAR) format internally. This format isn't supported by diffoscope, the tool I've been using for verifying. I put together a quick bit of functionality in order to diff .pkg files which appears to work nicely and have submitted it upstream to the diffoscope project.

Next steps for reproducibility would be to apply diffoscope inside an automated macOS build process to shake out any sources of non-determinism and address them.

Software identifiers

Listened to the Open Source Security Podcast (which I recommend) where Josh Bressers and Kurt Seifried discussed software identifiers as they relate to vulnerabilities and Software Bill-of-Materials and more specifically CISA's RFI on software identifiers and OpenSSF's response.

CPE system could work if it was open for others to collaborate. Currently, mostly a closed system. I've also found casually that CPEs tend to work much better for returning CVE matches today compared to Package URLs even though OSV works with Package URLs natively. I suspect tooling will improve in this area as time goes on.

Package URLs (PURLs) are distributed, namespaced, and intrinsic (easily discoverable). Downside is that two completely different Package URLs may reference the same software but different methods of retrieval (which may be relevant!) Sometimes ties software identity to its source code platform which can change (see CPython moving to GitHub).

Package URLs being namespaced also means that they can carve out namespaces that are governed by different standards, for example the pkg:pypi/... namespace is governed by PEPs for names and versions where pkg:npm/ is governed by different standards. I think this ability will be critical for software identifiers to model different ecosystems, ecosystems won't converge to one set of standards so identifying software needs to be able to model them properly.

Other items
  • Attended the OpenSSF Alpha-Omega monthly public meeting. Had some great discussions about "Secure by Design".
  • Spent a good chunk of time planning high-level what the first new major projects for 2024 would be, there will be more to share as we approach the start of those projects.
  • Triaging multiple reports to the Python Security Response Team.

That's all for this week! 👋 If you're interested in more you can read last week's report.

Thanks for reading! ♡ Did you find this article helpful and want more content like it? Get notified of new posts by subscribing to the RSS feed or the email newsletter.

This work is licensed under CC BY-SA 4.0

Categories: FLOSS Project Planets

Django Weblog: DSF Board 2024 Elections – New board members 👋

Mon, 2024-01-08 16:03

Following our 2024 DSF Board Election Results , here are quick introductions from our two new board members, Sarah Abderemane and Thibaud Colas, elected for a two-year term for 2024-2025.

Collage: Sarah on the left, smiling, in the Versailles Hall of Mirrors. Thibaud on the right, in a field, looking in the distance with a boy on his shoulders. Sarah Abderemane

Sarah Abderemane, also known as sabderemane, is a software developer in France. She currently works at Kraken Tech, part of the Octopus Energy group, contributing to solutions to climate change. She works mainly on the backend, but also likes to work on the frontend in her spare time.

She organizes the Django Paris meetup and is an active member of the Django community: she is one of the organizers of the Djangonaut Space program, a member of the Django Accessibility team and maintainer of djangoproject.com.

Outside of open source and work, she is passionate about dance, likes customizing things like mechanical keyboards, and loves to travel to discover new cultures.

Social media and blog:

Thibaud Colas

Thibaud Colas (pronounced /tee-bo/) is a developer based in the UK, working for Torchbox on the Wagtail open source CMS as part of the core team. For Wagtail, Thibaud also contributes to efforts around accessibility, developer relations, as well as participation to programs like Outreachy and Google Summer of Code.

For Django, Thibaud has been involved with organizing and volunteering at events like Django Girls and DjangoCon Europe. More recently, he helped start the accessibility team, and has joined the Djangonaut Space program as a navigator.

Outside of work, Thibaud spends most of his time with two little tornadoes that are 5 and 2 years old. He also enjoys watching sumo and baking macarons. To learn more about Thibaud, check out his personal website thib.me , @thibaud_colas on Twitter/X, @thibaudcolas@fosstodon.org on Mastodon.

Both Sarah and Thibaud are active on the Django Forum, come say hi in their introduction thread!

Categories: FLOSS Project Planets

Anarcat: Last year on this blog

Mon, 2024-01-08 15:58

So this blog is now celebrating its 21st birthday (or 20 if you count from zero, or 18 if you want to be pedantic), and I figured I would do this yearly thing of reviewing how that went.

Number of posts

2022 was the official 20th anniversary in any case, and that was one of my best years on record, with 46 posts, surpassed only by the noisy 2005 (62) and matching 2006 (46). 2023, in comparison, was underwhelming: a feeble 11 posts! What happened!

Well, I was busy with other things, mostly away from keyboard, that I will not bore you with here...

The other thing that happened is that the one-liner I used to collect stats was broken (it counted folders and other unrelated files) and wildly overestimated 2022! Turns out I didn't write that much then:

anarc.at$ ls blog | grep '^[0-9][0-9][0-9][0-9].*.md' | se d s/-.*// | sort | uniq -c | sort -n -k2 57 2005 43 2006 20 2007 20 2008 7 2009 13 2010 16 2011 11 2012 13 2013 5 2014 13 2015 18 2016 29 2017 27 2018 17 2019 18 2020 14 2021 28 2022 10 2023 1 2024

But even that is inaccurate because, in ikiwiki, I can tag any page as being featured on the blog. So we actually need to process the HTML itself because we don't have much better on hand without going through ikiwiki's internals:

anarcat@angela:anarc.at$ curl -sSL https://anarc.at/blog/ | grep 'href="\./' | grep -o 20[0-9][0-9] | sort | uniq -c 56 2005 42 2006 19 2007 18 2008 6 2009 12 2010 15 2011 10 2012 11 2013 3 2014 15 2015 32 2016 50 2017 37 2018 19 2019 19 2020 15 2021 28 2022 13 2023

Which puts the top 10 years at:

$ curl -sSL https://anarc.at/blog/ | grep 'href="\./' | grep -o 20[0-9][0-9] | sort | uniq -c | sort -nr | head -10 56 2005 50 2017 42 2006 37 2018 32 2016 28 2022 19 2020 19 2019 19 2007 18 2008

Anyway. 2023 is certainly not a glorious year in that regard, in any case.

Visitors

In terms of visits, however, we had quite a few hits. According to Goatcounter, I had 122 300 visits in 2023! 2022, in comparison, had 89 363, so that's quite a rise.

What you read

I seem to have hit the Hacker News front page at least twice. I say "seem" because it's actually pretty hard to tell what the HN frontpage actually is on any given day. I had 22k visits on 2023-03-13, in any case, and you can't see me on the front that day. We do see a post of mine on 2023-09-02, all the way down there, which seem to have generated another 10k visits.

In any case, here were the most popular stories for you fine visitors:

  • Framework 12th gen laptop review: 24k visits, which is surprising for a 13k words article "without images", as some critics have complained. 15k referred by Hacker News. Good reference and time-consuming benchmarks, slowly bit-rotting.

    That is, by far, my most popular article ever. A popular article in 2021 or 2022 was around 6k to 9k, so that's a big one. I suspect it will keep getting traffic for a long while.

  • Calibre replacement considerations: 15k visits, most of which without a referrer. Was actually an old article, but I suspect HN brought it back to light. I keep updating that wiki page regularly when I find new things, but I'm still using Calibre to import ebooks.

  • Hacking my Kobo Clara HD: is not new but always gathering more and more hits, it had 1800 hits in the first year, 4600 hits last year and now brought 6400 visitors to the blog! Not directly related, but this iFixit battery replacement guide I wrote also seem to be quite popular

Everything else was published before 2023. Replacing Smokeping with Prometheus is still around and Looking at Wayland terminal emulators makes an entry in the top five.

Where you've been

People send less and less private information when they browse the web. The number of visitors without referrers was 41% in 2021, it rose to 44% in 2023. Most of the remaining traffic comes from Google, but Hacker News is now a significant chunk, almost as big as Google.

In 2021, Google represented 23% of my traffic, in 2022, it was down to 15% so 18% is actually a rise from last year, even if it seems much smaller than what I usually think of.

Ratio Referrer Visits 18% Google 22 098 13% Hacker News 16 003 2% duckduckgo.com 2 640 1% community.frame.work 1 090 1% missing.csail.mit.edu 918

Note that Facebook and Twitter do not appear at all in my referrers.

Where you are

Unsurprisingly, most visits still come from the US:

Ratio Country Visits 26% United States 32 010 14% France 17 046 10% Germany 11 650 6% Canada 7 425 5% United Kingdom 6 473 3% Netherlands 3 436

Those ratios are nearly identical to last year, but quite different from 2021, where Germany and France were more or less reversed.

Back in 2021, I mentioned there was a long tail of countries with at least one visit, with 160 countries listed. I expanded that and there's now 182 countries in that list, almost all of the 193 member states in the UN.

What you were

Chrome's dominance continues to expand, even on readers of this blog, gaining two percentage points from Firefox compared to 2021.

Ratio Browser Visits 49% Firefox 60 126 36% Chrome 44 052 14% Safari 17 463 1% Others N/A

It seems like, unfortunately, my Lynx and Haiku users have not visited in the past year. It seems like trying to read those metrics is like figuring out tea leaves...

In terms of operating systems:

Ratio OS Visits 28% Linux 34 010 23% macOS 28 728 21% Windows 26 303 17% Android 20 614 10% iOS 11 741

Again, Linux and Mac are over-represented, and Android and iOS are under-represented.

What is next

I hope to write more next year. I've been thinking about a few posts I could write for work, about how things work behind the scenes at Tor, that could be informative for many people. We run a rather old setup, but things hold up pretty well for what we throw at it, and it's worth sharing that with the world...

So anyway, thanks for coming, faithful reader, and see you in the coming 2024 year...

Categories: FLOSS Project Planets

Real Python: Learn From 2023's Most Popular Python Tutorials and Courses

Mon, 2024-01-08 09:00

Python is always getting better, and 2023 brought a number of exciting developments. As part of the Faster CPython project, Python 3.12 is speedier than previous versions. The new release brings improved error messages and more powerful f-strings. You can also enjoy support for the Linux perf profiler, static typing improvements, and changes to subinterpreters.

The Python Software Foundation (PSF) focused on enhancing security in 2023, with the help of inaugural Security Developer-in-Residence Seth Michael Larson. As part of this comprehensive effort, PyPI completed its first security audit. Plus, the year brought new major versions of pandas, Django, and Pydantic. Another exciting development was Mojo, a superset of Python that’s specifically designed for use in machine-learning contexts.

Here at Real Python, we’ve published over a hundred written tutorials and video courses this year, plus weekly podcast episodes. Keep reading to revisit an old favorite or embark on a new learning journey. You can also check out the wrap-up podcast episode.

Join Now: Click here to join the Real Python Newsletter and you'll never miss another Python tutorial, course update, or post.

Practice Your Skills

Practice makes perfect, especially when it comes to programming. This year, the Real Python team expanded the Python Basics learning path with exercises designed to strengthen your Python skills and help you apply your knowledge in real-world scenarios.

In these courses, you can test your knowledge by completing review exercises and challenges before comparing your work to the instructors’ solutions:

By actively engaging with these exercises, you’ll solidify your understanding of Python concepts and build confidence in your programming abilities. Another way to test your knowledge is by taking quizzes, and we added several in 2023. For help along the way, be sure to join Real Python’s community chat and weekly office hours.

Customize Your Coding Environment

Your coding environment plays a crucial role in your productivity as a programmer, so it’s definitely worthwhile to explore your options and make yourself at home. That means picking the perfect editor or IDE for your use case and then tweaking how it works for you.

In these tutorials, you’ll learn how to customize your coding environment to suit your needs:

By exploring these resources, you’ll discover tools and techniques that can enhance your coding experience, making you more efficient and comfortable as you write Python code.

Read the full article at https://realpython.com/popular-python-tutorials-2023/ »

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Montreal Python User Group: Montréal-Python 2024 Elections

Mon, 2024-01-08 00:00

Dear Pythonistas, after many years of commitment, the current Python Montreal board of directors team has decided to pass the torch. We are now opening the doors to new, passionate members of the Python community to continue to make our organization shine.

Election calendar:

  • Application period officially open
  • Announcement of applications: January 22, 2024 on our social networks
  • Opening of the online voting period from January 22 to 31, 2024
  • Physical event to learn more about the candidates and interact with them: January 29, 2024 at MP-103
  • Announcement of the new CA: February 1, 2024

If you share our passion for Python and would like to actively contribute to its development in Montréal, we invite you to fill out this application form.

Categories: FLOSS Project Planets

Python People: Will Vincent - Django, Writing Technical Books

Sun, 2024-01-07 20:21

Will Vincent is a former board member of the Django Software Foundation. He's written 3 books on Django, writes a django newsletter, is a podcast co-host for Django Chat.


★ Support this podcast while learning ★

The Complete pytest Course, is the best way to learn pytest quickly.

  • Python testing with pytest from beginner through advanced.
  • Covers applying pytest to projects, including continuous integration and reporting.
  • Even covers combining features to great effect and effectiveness.
★ Support this podcast on Patreon ★ <p>Will Vincent is a former board member of the Django Software Foundation. He's written 3 books on Django, writes a django newsletter, is a podcast co-host for Django Chat.</p> <br><p><strong>★ Support this podcast while learning ★</strong></p><p><a href="https://courses.pythontest.com/p/complete-pytest-course">The Complete pytest Course</a>, is the best way to learn pytest quickly.</p><ul><li>Python testing with pytest from beginner through advanced.</li><li>Covers applying pytest to projects, including continuous integration and reporting.</li><li>Even covers combining features to great effect and effectiveness.</li></ul> <strong> <a href="https://www.patreon.com/PythonPeople" rel="payment" title="★ Support this podcast on Patreon ★">★ Support this podcast on Patreon ★</a> </strong>
Categories: FLOSS Project Planets

Data School: What are conda, Anaconda, and Miniconda? 🐍

Sun, 2024-01-07 11:57

If you&aposve ever taken one of my data science courses, you&aposve probably noticed that I frequently recommend the Anaconda distribution of Python.

You might be left wondering:

  • What is the Anaconda distribution, and why do people recommend it?
  • How is it related to conda?
  • How is it related to Miniconda?
  • As a Data Scientist, which of these do I need to be familiar with?

I&aposll answer those questions below! &#x1F447;

What is Anaconda?

Anaconda is a Python distribution aimed at Data Scientists that includes 250+ packages (with easy access to 7,500+ additional packages). Its value proposition is that you can download it (for free) and "everything just works." It&aposs available for Mac, Windows, and Linux.

A new Anaconda distribution is released a few times a year. Within each distribution, the versions of the included packages have all been tested to work together.

If you visit the installation page for many data science packages (such as pandas), they recommend Anaconda because it makes installation easy!

What is conda?

conda is an open source package and environment manager that comes with Anaconda.

As a package manager, you can use conda to install, update, and remove packages and their "dependencies" (the packages they depend upon):

  • If Anaconda doesn&apost include a package that you need, you use conda to download and install it.
  • If Anaconda doesn&apost have the version of a package you need, you use conda to update it.

As an environment manager, you can use conda to manage virtual environments:

  • If you&aposre not familiar with virtual environments, they allow you to maintain isolated environments with different packages and versions of those packages.
  • conda is an alternative to virtualenv, pipenv, and other related tools.

conda has a few huge advantages over other tools:

  • It&aposs a single tool to learn, rather than using multiple tools to manage packages, environments, and Python versions.
  • Package installation is predictably easy because you&aposre installing pre-compiled binaries.
  • Unlike pip, you never need to build from source code, which can be especially difficult for some data science packages.
  • You can use conda with languages other than Python.
What is Miniconda?

Miniconda is a Python distribution that only includes Python, conda, their dependencies, and a few other useful packages.

Miniconda is a great choice if you prefer to only install the packages you need, and you&aposre sufficiently familiar with conda. (Here&aposs how to choose between Anaconda and Miniconda.)

Summary:
  • Anaconda and Miniconda are both Python distributions.
  • Anaconda includes hundreds of packages, whereas Miniconda includes just a few.
  • conda is an open source tool that comes with both Anaconda and Miniconda, and it functions as both a package manager and an environment manager.

Personally, I make extensive use of conda for creating environments and installing packages. And since I&aposm comfortable with conda, I much prefer Miniconda over Anaconda.

Do you have questions about conda, Anaconda, or Miniconda? Let me know in the comments section below! &#x1F447;

Categories: FLOSS Project Planets

CodersLegacy: Switching between Multiple Screens in Tkinter (dynamically)

Sat, 2024-01-06 05:22

The following article demonstrates a useful trick in Tkinter to create multiple “screens” (e.g. a login screen, register screen, main page screen) within a single window! Instead of creating a new window for each screen, we will use a single tkinter window, which swaps dynamically between multiple “screens” (represented by frames).

This is more efficient and faster than creating a new window every time.

Complete Code:

The core idea is simple, we have multiple classes, each of which represents a window. These classes inherit from the Frame class, essentially making them frames as well. To “swap” between screens, we destroy the existing frame (including all of its children objects) and then create the new frame to take its place.

A YouTube video explaining this code step-by-step is included at the bottom of this article.

import tkinter as tk def center_window(width, height): x = (root.winfo_screenwidth() // 2) - (width // 2) y = (root.winfo_screenheight() // 2) - (height // 2) root.geometry(f'{width}x{height}+{x}+{y}') class WelcomeWindow(tk.Frame): def __init__(self, master): super().__init__() self.master = master self.master.title("Welcome") center_window(200, 150) login_button = tk.Button(self, text="Login", width=10, command = self.on_login) login_button.pack(padx=20, pady=(20, 10)) register_button = tk.Button(self, text="Register", width=10, command = self.on_register) register_button.pack(pady=10) self.pack() def on_login(self): for widget in self.winfo_children(): widget.destroy() self.destroy() LoginWindow(self.master) def on_register(self): for widget in self.winfo_children(): widget.destroy() self.destroy() RegisterWindow(self.master) class LoginWindow(tk.Frame): def __init__(self, master): super().__init__() self.master = master self.master.title("Login") self.master.resizable(False, False) center_window(250, 150) tk.Label(self, text="Username:").grid(row=0, column=0) self.username_entry = tk.Entry(self) self.username_entry.grid(row=0, column=1, padx=10, pady=10) tk.Label(self, text="Password:").grid(row=1, column=0) self.password_entry = tk.Entry(self, show="*") self.password_entry.grid(row=1, column=1, padx=10, pady=10) submit_button = tk.Button(self, text="Submit", width=8,command = self.on_successful_login) submit_button.grid(row=2, column=1, sticky="e", padx=10, pady=(10, 0)) submit_button = tk.Button(self, text="Back", width=8, command = self.on_back) submit_button.grid(row=2, column=0, sticky="w", padx=10, pady=(10, 0)) self.pack() def on_back(self): for widget in self.winfo_children(): widget.destroy() self.destroy() WelcomeWindow(self.master) def on_successful_login(self): for widget in self.winfo_children(): widget.destroy() self.destroy() MainWindow(self.master) class RegisterWindow(tk.Frame): def __init__(self, master): super().__init__() self.master = master self.master.title("Register") self.master.resizable(False, False) center_window(300, 250) tk.Label(self, text="First Name:").grid(row=0, column=0, sticky="w") self.first_name_entry = tk.Entry(self, width=26) self.first_name_entry.grid(row=0, column=1, padx=10, pady=10, sticky="e") tk.Label(self, text="Last Name:").grid(row=1, column=0, sticky="w") self.last_name_entry = tk.Entry(self, width=26) self.last_name_entry.grid(row=1, column=1, padx=10, pady=10, sticky="e") tk.Label(self, text="Password:").grid(row=2, column=0, sticky="w") self.password_entry = tk.Entry(self, show="*", width=26) self.password_entry.grid(row=2, column=1, padx=10, pady=10, sticky="e") tk.Label(self, text="Email:").grid(row=3, column=0, sticky="w") self.email_entry = tk.Entry(self, width=26) self.email_entry.grid(row=3, column=1, padx=10, pady=10, sticky="e") submit_button = tk.Button(self, text="Submit", width=8) submit_button.grid(row=7, column=1, padx=10, pady=10, sticky="e") submit_button = tk.Button(self, text="Back", width=8, command = self.on_back) submit_button.grid(row=7, column=0, sticky="w", padx=10, pady=(10, 10)) self.pack() def on_back(self): for widget in self.winfo_children(): widget.destroy() self.destroy() WelcomeWindow(self.master) class MainWindow(tk.Frame): def __init__(self, master): super().__init__() self.master = master center_window(500, 500) self.pack() root = tk.Tk() root.eval('tk::PlaceWindow . center') WelcomeWindow(root) root.mainloop()

This marks the end of the Switching between multiple Screens in Tkinter Tutorial. Any suggestions or contributions for CodersLegacy are more than welcome. Questions regarding the tutorial content can be asked in the comments section below.

The post Switching between Multiple Screens in Tkinter (dynamically) appeared first on CodersLegacy.

Categories: FLOSS Project Planets

Matt Layman: Fun With Scrapy Link Validation on CI

Fri, 2024-01-05 19:00
Here’s my scenario: I have a static site generator that is building HTML pages for a community project that I’m working on. How can I make sure, automatically, that all the links to other internal pages within the site continue to work? In this article, I’ll show you how I managed to do that using Scrapy, a web scraping tool, and GitHub Actions, the project’s Continuous Integration system. To solve this problem, I decided to use a web scraper.
Categories: FLOSS Project Planets

TechBeamers Python: Comparing Two Lists in Python

Fri, 2024-01-05 07:21

Comparing two lists is a common task in programming, and it becomes crucial when you need to find differences, and intersections, or validate data consistency. In this tutorial, we will explore various methods to compare two lists in Python. We’ll cover simple equality checks, membership testing, element-wise comparisons, and advanced techniques using built-in functions and […]

The post Comparing Two Lists in Python appeared first on TechBeamers.

Categories: FLOSS Project Planets

Real Python: The Real Python Podcast – Episode #186: Exploring Python in Excel

Fri, 2024-01-05 07:00

Are you interested in using your Python skills within Excel? Would you like to share a data science project or visualization as a single Office file? This week on the show, we speak with Principal Architect John Lam and Sr. Cloud Developer Advocate Sarah Kaiser from Microsoft about Python in Excel.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

PyCharm: New Low-Impact Monitoring API in Python 3.12

Fri, 2024-01-05 06:12
People love PyCharm’s debugger, and we work hard to make it both fast and easy to use. But what if it could be even faster and easier to use? Python 3.12 adds the new low-impact monitoring API described in PEP 669, enabling debuggers, profilers, and similar tools to run code at almost full speed. As […]
Categories: FLOSS Project Planets

TechBeamers Python: How to Make a Unique List in Python

Fri, 2024-01-05 02:32

In the world of Python, handling data is a big deal. We often work with lists, and sometimes, we need to make sure they only have unique items. In this detailed guide, we’ll explore different ways to make a unique list in Python. From using sets to more advanced stuff like functools.reduce(), we’re going to […]

The post How to Make a Unique List in Python appeared first on TechBeamers.

Categories: FLOSS Project Planets

TechBeamers Python: 25 Sampling Interview Questions and Answers to Remember

Fri, 2024-01-05 02:07

Find out 25 commonly asked sampling interview questions distributed across different categories. These questions cover a range of topics related to sampling and can be used to assess the interviewee’s understanding of fundamental concepts, methods, and applications in various fields. 25 Sampling Interview Questions and Answers We have prepared this quick guide of sampling interview […]

The post 25 Sampling Interview Questions and Answers to Remember appeared first on TechBeamers.

Categories: FLOSS Project Planets

Pages