Feeds

GSoC '24 Progress: Week 7 and 8

Planet KDE - Wed, 2024-07-24 08:00
Multiple Subtitle Track

I continued to refine the feature proposed in my previous blog. We can now add new layers directly on the timeline by simply dragging the existing subtitle out of the bottom border of the subtitle track. Adding, moving, and deleting subtitles work as before, now with layer support.

I also added an indicator to the header of the subtitle track. It looks like this:

Besides setting a style to a specific subtitle event, I also plan to add the feature of setting different default styles for different subtitle layers. This will allow us to easily apply a consistent style to groups of subtitles within each layer.

Improved Subtitle Manager

Layer management is now integrated into the subtitle manager, giving it a fresh new look.

The duplicate and delete operations now work for layers as well.

Automatic Conversion of .srt Subtitle

To better test and develop the style feature, I switched the subtitle storage format to .ass. With the help of my mentor, we can now automatically convert the .srt files from old projects to .ass files while keeping the original .srt file.

There are still some minor issues with style conversion, such as incorrect font sizes. However, I believe it’s time to shift my focus to the styling widget and address these bugs later. The next two weeks will be dedicated to style management, which is the most important part of the project, so stay tuned!

Categories: FLOSS Project Planets

Real Python: Quiz: Hugging Face Transformers

Planet Python - Wed, 2024-07-24 08:00

In this quiz, you’ll test your understanding of Hugging Face Transformers. This library is a popular choice for working with transformer models in natural language processing tasks, computer vision, and other machine learning applications.

[ 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

Django Weblog: Django 5.1 release candidate 1 released

Planet Python - Wed, 2024-07-24 06:51

Django 5.1 release candidate 1 is the final opportunity for you to try out a kaleidoscope of improvements before Django 5.1 is released.

The release candidate stage marks the string freeze and the call for translators to submit translations. Provided no major bugs are discovered that can't be solved in the next two weeks, Django 5.1 will be released on or around August 7. Any delays will be communicated on the on the Django forum.

Please use this opportunity to help find and fix bugs (which should be reported to the issue tracker), you can grab a copy of the release candidate package from our downloads page or on PyPI.

The PGP key ID used for this release is Natalia Bidart: 2EE82A8D9470983E

Categories: FLOSS Project Planets

LN Webworks: 10 Best Low-code Platforms for Building Applications in 2024

Planet Drupal - Wed, 2024-07-24 02:42

The prime objective of any business is to work efficiently with high speed and agility in application development. This helps a company work effectively and allows them to explore an application's extensive features. Low-code works the same way, this platform is becoming more popular due to its greater speed and flexibility in application development. In this information piece, we are going to talk about the best low-code platforms that are making significant changes in the app development world.

Categories: FLOSS Project Planets

Gunnar Wolf: DebConf24 Continuous Key-Signing Party

Planet Debian - Tue, 2024-07-23 23:25
đŸŽ‰đŸ„łđŸ€ĄđŸŽ‚đŸ„ Yay, party! đŸŽ‰đŸ„łđŸ€ĄđŸŽ‚đŸ„ đŸŽ‰đŸ„łđŸ€ĄđŸŽ‚đŸ„ Yay, crypto! đŸŽ‰đŸ„łđŸ€ĄđŸŽ‚đŸ„

DebCamp has started, and in a couple of days, we will fully be in DebConf24 mode!

As most of you know, an important part that binds Debian together is our cryptographic identity assurance, and that is in good measure tightened by the Continuous Key-Signing Parties we hold at DebConfs and other Debian and Free Software gatherings.

As I have done during (most of) the past DebConfs, I have prepared a set of pseudo-social maps to help you find where you are in the OpenPGP mesh of our conference. Naturally, Web-of-Trust maps should be user-centered, so find your own at:

https://people.debian.org/~gwolf/dc24_ksp/

The list is now final and it will not receive any modifications (I asked for them some days ago); if your name still appears on the list and you don’t want to be linked to the DC24 KSP in the future, tell me and I’ll remove it from future versions of the list (but it is part of the final DC24 file, as its checksum is already final)

Speaking of which!

If you are to be a part of the keysigning, get the final DC24 file and, on a device you trust, check its SHA256 by running:

$ sha256sum dc24_fprs.txt 11daadc0e435cb32f734307b091905d4236cdf82e3b84f43cde80ef1816370a5 dc24_fprs.txt

Make sure the resulting number matches the one I’m presenting. If it doesn’t, ensure your copy of the file is not corrupted (i.e. download again). If it still doess not match, notify me immediately.

Does any of the above confuse you? Please come to (or at least, follow the stream for) my session on DebConf opening day, Continuous Key-Signing Party introduction, 10:30 Korean time; I will do my best to explain the details to you.

PS- I will soon provide a simple, short PDF that will probably be mass-printed at FrontDesk so that you can easily track your KSP progress.

Categories: FLOSS Project Planets

Dirk Eddelbuettel: RQuantLib 0.4.23 on CRAN: Updates

Planet Debian - Tue, 2024-07-23 22:48

A new minor release 0.4.23 of RQuantLib just arrived at CRAN earlier today, and will be uploaded to Debian in due course.

QuantLib is a rather comprehensice free/open-source library for quantitative finance. RQuantLib connects (some parts of) it to the R environment and language, and has been part of CRAN for more than twenty-two years (!!) as it was one of the first packages I uploaded.

This release of RQuantLib updates to QuantLib version 1.35 released this morning. It accommodates some removals following earlier deprecations, and also updates most of the code in the function for a more readable and compact form of creating shared pointers via make_shared() along with auto.

Changes in RQuantLib version 0.4.23 (2024-07-23)
  • Adjustments for QuantLib 1.35 and removal of deprecated code (in utility functions and dividend case of vanilla options)

  • Adjustments for new changes in QuantLib 1.35

  • Refactoring most C++ files making more use of both auto and make_shared to simplify and shorten expressions

Courtesy of my CRANberries, there is also a diffstat report for the this release. As always, more detailed information is on the RQuantLib page. Questions, comments etc should go to the rquantlib-devel mailing list. Issue tickets can be filed at the GitHub repo.

If you like this or other open-source work I do, you can now sponsor me at GitHub.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: FLOSS Project Planets

Dirk Eddelbuettel: qlcal 0.0.12 on CRAN: Calendar Updates

Planet Debian - Tue, 2024-07-23 20:45

The twelveth release of the qlcal package arrivied at CRAN today.

qlcal delivers the calendaring parts of QuantLib. It is provided (for the R package) as a set of included files, so the package is self-contained and does not depend on an external QuantLib library (which can be demanding to build). qlcal covers over sixty country / market calendars and can compute holiday lists, its complement (i.e. business day lists) and much more. Examples are in the README at the repository, the package page, and course at the CRAN package page.

This releases synchronizes qlcal with the QuantLib release 1.35 (made today) and contains more updates to 2024 calendars.

Changes in version 0.0.12 (2024-07-22)
  • Synchronized with QuantLib 1.35 released today

  • Calendar updates for Chile, India, United States, Brazil

Courtesy of my CRANberries, there is a diffstat report for this release. See the project page and package documentation for more details, and more examples. If you like this or other open-source work I do, you can sponsor me at GitHub.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: FLOSS Project Planets

scikit-learn: Interview with Adam Li, scikit-learn Team Member

Planet Python - Tue, 2024-07-23 20:00
Author: Reshama Shaikh , Adam Li

BIO: Adam is currently a Postdoctoral Research Scientist at Columbia University in the Causal Artificial Intelligence Lab, directed by Dr. Elias Bareinboim. He is an NSF-funded Computing Innovation Research Fellow. He did his PhD in biomedical engineering, specializing in computational neuroscience and machine learning at Johns Hopkins University working with Dr. Sridevi V. Sarma in the Neuromedical Control Systems group. He also jointly obtained a MS in Applied Mathematics and Statistics with a focus in statistical learning theory, optimization and matrix analysis. He was fortunate to be a NSF-GRFP fellow, Whitaker International Fellow, Chateaubriand Fellow and ARCS Chapter Scholar during his time at JHU. Adam officially joined the scikit-learn team as a maintainer in July 2024.

Link to scikit-learn contributions (issues, pull requests):

  1. Tell us about yourself.

    I currently live in New York City, where I work on theoretical and applied AI research through the lens of causal inference, statistical modeling, dynamical systems and signal processing. My current research is focused on telling a causal story, specifically in the case one has multiple distributions of data from the same causal system. For example, one may have access to brain recordings from monkeys and humans. Given these heterogeneous datasets, I am interested in answering: what causal relationships can we learn. This is known as the causal discovery problem, where given data, one attempts to learn what causes what. Another problem that I work on that is highly relevant to generative AI is the problem of causal representation learning. Here, I develop theory and train deep neural networks to understand causality among latent factors. Specifically, we demonstrate how to leverage multiple datasets and a causal neural network to generate data that is causally realistic. This can enable more robust data generation from general latent variable models.

  2. How did you first become involved in open source and scikit-learn?

    I first got involved in open source as a user. I was making the switch from Matlab to Python and started using packages like numpy and scipy pretty regularly. In my PhD research, I dealt with a lot of electrophysiological data (i.e. EEG brain recordings). I was writing hundreds of lines of code to load and preprocess data, and it was always changing based on different constraints. That was when I discovered MNE-BIDS, a Python package within the MNE framework for reading and writing brain recording data in a structured format. This changed my life because now my preprocessing and data loading code was a few lines of code that adhered to an open standard tested by thousands of researchers. I realized the value of open source, and began contributing in my spare time.

  3. We would love to learn of your open source journey.

    I first started contributing to open-source in the MNE organization. This package implements data structures for the processing and analysis of neural recording data (e.g. MEG, EEG, iEEG data). I contributed over 70 pull requests in the MNE-BIDS package, and subsequently was invited to be a maintainer for MNE-BIDS and MNE-Python. Later one, I participated in a Google Summer of Code to port the connectivity submodule within MNE-Python to a new package, known as MNE-Connectivity. I added new data structures, and algorithms for the sake of improving the feature developments for connectivity algorithms among neural recording data. Later on, I also worked with a team on porting a neural network architecture from Matlab to the MNE framework to automatically classify ICA derived components. This became known as MNE-ICALabel. These experiences gave me the experience necessary to work in a large asynchronous team environment that is common in OSS. It also taught me how to begin contributing to an OSS project. This led me to scikit-learn.

    I first got involved in scikit-learn as a user, who was heavily interested in the decision tree model in scikit-learn (random forest, randomized trees). Here, I was interested in contributing a new oblique decision tree model that was a generalization of the existing random forest model. However, the code was not easily added to scikit-learn, and currently the decision to include it is inconclusive. Throughout this process, I learned about the challenges and intricacies of maintaining such a large OSS project as scikit-learn. It is not trivial to simply add new features to a large OSS project because code comes with a maintenance cost, and should fit with the current internal design. At this point in time, there were very few maintainers that were able to maintain the tree submodule, and as such new features are included conservatively.

    I was eager to improve the project to enable more exciting features for the community, so I began contributing to scikit-learn starting with smaller issues such as documentation improvements, or minor bug fixes to get acquainted with the codebase. I also refactored various Cython code to begin upgrading the codebase, especially in the tree submodule. Throughout this process, I identified other projects the maintainers team were working on, and also contributed there. For example, I added metadata routing to a variety of different functions and estimators in scikit-learn. I also began reviewing PRs for the tree submodule and metadata routing where I had knowledge. I also added missing-value support for extremely randomized tree models (called ExtraTrees in scikit-learn). This allows users to pass in data that contains missing values (encoded as np.nan) to ExtraTrees. Around this time, I was invited to join the maintainer team of scikit-learn. More recently, I have taken on the project to add categorical data support to the decision tree models, which will make random forests and extremely randomized tree models more performant and capable to handle real world settings where there is commonly categorical data.

  4. To which OSS projects and communities do you contribute?

    I currently primarily contribute to scikit-learn, PyWhy (a community for causal inference in Python), and also develop my own OSS project: treeple. Treeple is an exciting package that implements different decision tree models beyond those offered in scikit-learn with an efficient Cython implementation stemming from the scikit-learn tree internals.

  5. What do you find alluring about OSS?

    OSS is so exciting because of the impact it has. Everyone from private projects to other OSS projects will use OSS. Any fixes to documentation, performance improvements, or new features will potentially impact the workflows of potentially millions of people. This is what makes contributing to OSS so exciting. Moreover, this impact ensures that best practices are usually carried out in these projects, and it’s a great playground to learn from the best, while giving back to the larger community.

  6. What pain points do you observe in community-led OSS?

    Right now, community lead OSS moves very slowly in most places. This is for a number of very good reasons: i) not releasing buggy features that may impact millions of people, and ii) backwards compatibility. One of the challenges of maintaining a high-quality OSS project is that you would like to satisfy your users, who may all utilize different components of the project from different versions. As such, many community led OSS projects take a conservative approach when implementing new features and new ideas. However, there may be many exciting better features that are already known by the community, but still lack an OSS implementation.

    I think this can be partially solved by increased funding for OSS, so OSS maintainers and developers are able to dedicate more time to maintaining and improving the projects. In addition, I think this can be improved if more developers in the community contribute to said OSS projects. I hope that I have convinced you though that contributing to OSS is impactful and highly educational.

  7. If we discuss how far OS has evolved in 10 years, what would you like to see happen?

    I think more interoperability and integrated workflows for projects will make projects that utilize OSS more streamlined and efficient. For example, right now there are different array libraries (e.g. numpy, cupy, xarray, pytorch, etc.), which all support some manner of a n-dimensional array, but with a slightly different API. This makes it very painful to transition across different libraries that use different arrays. In addition, there are multiple dataframe libraries, such as pandas and polars, and this problem of API consistency also arises there.

    Some work has been made on the Array-API front to allow different array libraries to serve as backends given a common API. This will enable GPU acceleration for free without a single code change, which is great! This will be exciting because users will eventually only have to write code in a single way, and can then leverage any array/dataframe library that has different advantages and disadvantages based on the user use case.

  8. What are your hobbies, outside of work and open source?

    I enjoy running, trying new restaurants and bars, cooking and reading. I’m currently training for a half-marathon, where my goal is to run under 8 minutes per mile. I’m also trying to perfect a salad with an asian-themed dressing. In a past life, I was a bboy (breakdancer) for ten years until I stopped in graduate school because I got busy (and old).

Categories: FLOSS Project Planets

Better identifying conda packages with ClearlyDefined

Open Source Initiative - Tue, 2024-07-23 19:17

ClearlyDefined, an Open Source project that helps organizations with supply chain compliance,  now provides a new harvester implementation for conda, a popular package manager with a large collection of pre-built packages for various domains, including data science, machine learning, scientific computing and more.

Conda provides package, dependency and environment management for any language and is very popular with Python and R. It allows users to manage and control the dependencies and versions of packages specific to each project, ensuring reproducibility and avoiding conflicts between different software requirements.

ClearlyDefined crawls both the main conda package and the source code for licensing metadata. The main conda package is hosted on the conda channels themselves and contains all necessary licensing information, compilers, environment configuration scripts and dependencies that are needed to make the package work. The source code from which the conda package is created oftentimes is hosted in an external website such as GitHub.

The conda crawler uses the following coordinates:

  • type (required): conda or condasource
  • provider (required): channel on which the package will be crawled, such as conda-forge, anaconda-main or anaconda-r
  • namespace (optional): architecture and OS of the package to be crawled, i.e. win64, linux-aarch64 or any if no architecture is specified.
  • package name (required): name of the package
  • revision (optional): package version and optional build version

For example, the popular numpy package is represented as shown below.

With the increased importance of data science, machine learning and scientific computing, this support for conda packages in ClearlyDefined is extremely important. It will allow organizations to better manage the licenses of their conda packages for compliance. This work was led by Basit Ayantunde from CodeThink with the stewardship from Qing Tomlison from SAP. We would like to thank them and all those involved in the development and testing of this implementation.

Categories: FLOSS Research

Beta for Amarok 3.1 available

Planet KDE - Tue, 2024-07-23 17:30

Dear fans of music & open source music players,
in preparation of the upcoming Amarok 3.1 release, a beta release (3.0.81) has been prepared.

As is observable from the ChangeLog, in addition to various bugfixes, there will be some, but not that many, new features included in the upcoming version. However, there has been a lot of Qt6 compatibility preparation work done under the hood, so version number 3.1 reflects the amount of changed code better than 3.0.2 would. 3.1.0 is likely to be released in early August, and all help catching any regressions during this period is highly appreciated. (n.b. one won't be able to compile a Qt6 Amarok with 3.1 yet, but perhaps with the eventual 3.2)

The source tarball is available on download.kde.org and it has been signed with Tuomas Nurmi's GPG key. There doesn't appear to be many binary packages of the beta available, at least at the moment, but the various nightly git builds provided by various splendid packagers are also based on corresponding source code, so using them and reporting findings is also a valid way to participate in the beta test effort.

Happy listening!

Categories: FLOSS Project Planets

Kirigami Addons 1.4

Planet KDE - Tue, 2024-07-23 17:20

Kirigami Addons 1.4 is out! This release introduce a new module to manage actions similar to that we can find in the QtWidgets world with KXmlGui. This was not written from scratch but upstream the existing infrastructure from Merkuro (ex-Kalendar) and Marknote. These two applications have already been ported to this new module and more like Tokodon or KDE Keychain will follow soon.

This includes a shortcut editor to assign and modify the shortcuts of an application and a command bar to quickly search and trigger actions

Shortcut editor

Command bar

Similar to KXmlGui, the actions are defined in C++, which allows to make use KStandardActions and get consistent shortcuts accross all your applications.

class MyApplication : public AbstractKirigamiApplication { Q_OBJECT QML_ELEMENT public: explicit MyApplication(QObject *parent = nullptr); void setupActions() override; Q_SIGNALS: void addNotebook(); }; MyApplication::MyApplication(QObject *parent) : AbstractKirigamiApplication(parent) { setupActions(); } void MyApplication::setupActions() { AbstractKirigamiApplication::setupActions(); auto actionName = QLatin1String("add_notebook"); if (KAuthorized::authorizeAction(actionName)) { auto action = mainCollection()->addAction(actionName, this, &MyApplication::addNotebook); action->setText(i18nc("@action:inmenu", "New Notebook")); action->setIcon(QIcon::fromTheme(QStringLiteral("list-add-symbolic"))); mainCollection()->addAction(action->objectName(), action); mainCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_N)); } }

These new actions can then be used from QML thanks to the new Kirigami.Action::fromQAction property.

import org.kde.kirigamiaddons.statefulapp as StatefulApp import org.kde.kirigamiaddons.settings as Settings StatefulApp.StatefulWindow { id: root windowName: 'Main' application: MyApplication { configurationView: Settings.ConfigurationView { ... } } Kirigami.Action { fromQAction: MyApplication.action('add_notebook') } Connections { target: MyApplication function onAddNotebook(): void { ... } } }

There is a new template available in KAppTemplate, which allows you to kickstart your new Kirigami application with the basic skeleton with this new module and other “Kirigami Addons” modules.

Other Changes

The FormCard design was tweaked a bit more when using a dark theme, thanks to James and Joshua for their feedback.

Speaking of FormCard, with the development of KeyChain, I ended up adding a new component to the FormCard collection: FormTextAreaDelegate. This component is the equivalent of FormTextFieldDelegate but with a TextArea instead. FormComboBoxDelegate and FormTextFieldDelegate also received a bunch of new properties and functions to proxy the underlying QtQuick.Controls component.

Evgeniy Harchenko tweaked a bit the headers of the TableView component.

Finally, a new contributor Andreas Gattringer fixed a crash in the video maximizing component which was affecting NeoChat.

Packager Section

You can find the package on download.kde.org and it has been signed with my GPG key.

Categories: FLOSS Project Planets

Four Kitchens: Why time is of the essence for a Drupal 11 migration

Planet Drupal - Tue, 2024-07-23 17:19

Shanice Ortiz

Director of Projects

Alongside her project management duties, Shanice is passionate about expanding Four Kitchens’ DEI efforts and fostering a culture of advocates and allies.

January 1, 1970

Platform upgrade.

For any IT manager, especially those at large organizations, these two words are enough to cause stress. Even if you just completed a move to Drupal 10, the release of Drupal 11 is around the corner with the latest version available in late July 2024.

What does that mean for your organization? Primarily, your greatest takeaway is that you shouldn’t feel the anxiety of another looming deadline. You still have two years to complete the upgrade. Plus, engineering plans are just starting to come together about how to tackle the upgrade multiple different ways. Time is still on your side.

However, just because a move to Drupal 11 isn’t cause for immediate alarm doesn’t mean you shouldn’t start planning an upgrade. You and your organization will see considerable benefits by addressing this change sooner rather than later.

What the move to Drupal 11 means for your website

In terms of adding new tools or website features, moving to Drupal 11 doesn’t mean much for your organization. Drupal rolls out upgrades differently than conventional software platforms. Version 11 will seem a lot like Drupal 10.3 in terms of new functionality.

Instead, Drupal will be deprecating features to eliminate ‌unnecessary or outdated code from the core platform. For example, in moving from Drupal 9.5 to 10, the CKEditor 4 module was removed to make room for CKEditor 5. For Drupal 11, the Book module will be deprecated.

If your organization doesn’t use this feature, its subtraction amounts to a positive by eliminating unneeded weight to the platform. If you do, then Book will still function in a more nimble way as a contrib module.

Ultimately, your organization won’t see any new features from Drupal 11 until the release of the next version, Drupal 11.1. Does that mean you should wait until then to start planning a website upgrade? You guessed it — absolutely not.

Why get ahead of Drupal 11?

The biggest benefit of planning your upgrade to Drupal 11 early is to avoid the scramble of a last-minute migration. This creates headaches for your team, and you also run into crowded schedules if you rely on a development partner. You don’t just run the risk of incurring unnecessary charges for trying to plan an upgrade at the last minute. You also risk limited availability as development agencies support other clients who also waited until the last minute.

Plus, planning to migrate to Drupal 11 now enables you to sidestep the complications of upgrading after 11.1 is released. Version 11.1 will include new features, and migrating across two versions will be more difficult, especially if you manage multiple websites.

Making the Drupal 11 move now gives you a leaner version of the platform while leaving you better positioned for 11.1. In all, your journey to Drupal 11.1 will be significantly faster and easier if you’ve already completed the migration to Drupal 11.

What stakeholders need to know about Drupal 11

As you plan an upgrade to Drupal 11, you need to keep your stakeholders informed about what to expect. Rather than getting bogged down with deprecations or other elements, you should frame the upgrade as a maintenance release.

In other words, the migration is primarily a way to improve your organization’s position going forward. Along with creating an easier path toward accessing the new features coming for 11.1, this update also will improve the performance and scalability of the platform for your websites.

How to plan a Drupal 11 migration

Drupal 11 will be released in late July. Consequently, your organization has a long runway toward completing an upgrade. In fact, you have two years until version 10 reaches its end of life in mid- to late 2026.

While that sounds like an eternity from now, your organization has more options at its disposal for planning an upgrade the sooner you begin. With enough lead time, you could include much of the work of preparing for Drupal 11 as part of a Continuous Care program with Four Kitchens.

Depending on your subscription tier, you can allocate your hours differently to support the upgrade. Alternatively, you can plan to allocate additional hours to your tier to complete the upgrade. Or, you can upgrade to Drupal 11 as part of a standalone project separate from your Continuous Care engagement.

The point, ultimately, is to underscore that you have options. At Four Kitchens, we’re already working on our upgrade plan to guide our clients through a seamless transition to Drupal 11. By considering the right approach for your organization sooner rather than later, you can ensure you still have options for navigating this upgrade in a timely, efficient way.

If you’re ready to start planning, we should talk.

The post Why time is of the essence for a Drupal 11 migration appeared first on Four Kitchens.

Categories: FLOSS Project Planets

Bounteous.com: The Future of Experimentation: Acquia Convert

Planet Drupal - Tue, 2024-07-23 17:04
As of July 1, Acquia Personalization is no longer available for new customers. The platform is being replaced by Acquia Convert, powered by VWO.
Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #639 (July 23, 2024)

Planet Python - Tue, 2024-07-23 15:30

#639 – JULY 23, 2024
View in Browser »

Asyncio gather() Handle Exceptions

The asyncio.gather() function takes an optional argument return_exceptions which changes the behavior of the co-routine when an error occurs. This article shows you how to use it.
JASON BROWNLEE

Python Protocols: Leveraging Structural Subtyping

In this tutorial, you’ll learn about Python’s protocols and how they can help you get the most out of using Python’s type hint system and static type checkers.
REAL PYTHON

Prod Alerts? You Should be Autoscaling

Let Judoscale solve your scaling issues. We support Django, Flask, and FastAPI, and we also autoscale your Celery and RQ task queues. Traffic spike? Scaled up. Quiet night? Scaled down. Work queue backlog? No problem →
JUDOSCALE sponsor

Trying Out Free-Threaded Python on macOS

Free-threaded mode is available as a compile option in the beta of Python 3.13. Simon decided to try it out on his Mac.
SIMON WILLISON

Quiz: Python’s Built-in Functions: A Complete Exploration

Take this quiz to test your knowledge about the available built-in functions in Python. By taking this quiz, you’ll deepen your understanding of how to use these functions and the common programming problems they cover, from mathematical computations to Python-specific features.
REAL PYTHON

Python 3.13.0 Beta 4 Released

CPYTHON DEV BLOG

Articles & Tutorials Exercises Course: Introduction to Web Scraping With Python

In this course, you’ll practice the main steps of the web scraping process. You’ll write a script that uses Python’s requests library to scrape and parse data from a website. You’ll also interact with HTML forms using tools like Beautiful Soup and Mechanical Soup to extract specific information.
REAL PYTHON course

When Generators Get Cleaned Up

When playing with generators in asynchronous code, Sam ran into some things he didn’t quite expect with how and when resources get cleaned up. This article shows you what you can and can’t control, and in some cases whether you should.
SAM EISENHANDLER

Posit Connect - Help Your Data Science Team Share and Collaborate

Tired of emailing files around & trying to use general-purpose collaboration tools? Posit Connect makes it easy to share, collaborate, & get feedback on your data science work including Jupyter notebooks, Streamlit, & other analytics applications.
POSIT sponsor

Different Ways I Start Writing New Code

In this article, the author talks about the different approaches they use to create new code depending on the mood, the feature or bug at hand, and their confidence level. Five different approaches are covered.
JUHA-MATTI SANTALA

A Python Epoch Timestamp Timezone Trap

Date and times are problematic and there are all sorts of problems you can get into when you use them in Python. This post talks about one challenge when using epoch timestamp numbers.
JOËL PERRAS

How to Convert a Python Script Into a Web App

This post shows you how to take a Python script and turn it into a web application using FastAPI. It includes information about how to choose endpoints and how to do authentication.
AHMED LEMINE

Instrumenting Python GIL With eBPF

eBPF is a tool available on Linux to dig into the profile of your code. In this article, Nikolay uses it to inspect when the GIL gets invoked in CPython.
NIKOLAY SIVOK

Approximate Counting in Django and Postgres

Pagination in Django uses the rather slow SELECT COUNT(*) SQL call. This article looks at how to speed up counting with Django and PostgreSQL.
NIK TOMAZIC

Assignment vs. Mutation in Python

In Python, “change” can mean two different things. Assignment changes which object a variable points to. Mutation, changes the object itself.
TREY HUNNER

Flask vs Django in 2024

This post compares Flask and Django, from what they specialize in to what it takes to do a personal web site in each.
WILL VINCENT

Making an Iterator Out of a Function

You can use the Python built-in function iter with two arguments to create an iterator from a function.
RODRIGO GIRÃO SERRÃO

Developing GraphQL APIs in Django With Strawberry

This tutorial details how to integrate GraphQL with Django using Strawberry.
TESTDRIVEN.IO ‱ Shared by Michael Herman

Projects & Code cbfa: Class-Based Views for FastAPI

GITHUB.COM/POMPONCHIK ‱ Shared by Evgeniy Blinov (pomponchik)

Satyrn: macOS App for Jupyter Nobtebooks

SATYRN.APP

Datasketch: Probabilistic Data Structures

PYPI.ORG

pyNES: Python Programming for Nintendo 8 Bits

GITHUB.COM/GUTOMAIA

staged-script: Divide Automation Scripts Into Stages

GITHUB.COM/SANDIALABS ‱ Shared by Jason M. Gates

Events Weekly Real Python Office Hours Q&A (Virtual)

July 24, 2024
REALPYTHON.COM

SPb Python Drinkup

July 25, 2024
MEETUP.COM

PyOhio 2024

July 27 to July 28, 2024
PYOHIO.ORG

PyDelhi User Group Meetup

July 27, 2024
MEETUP.COM

Lightning Talks

July 27, 2024
MEETUP.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #639.
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

GNU Guix: The European Union must keep funding free software

GNU Planet! - Tue, 2024-07-23 11:46

Guix is the fruit of a combination of volunteer work by an amazing number of people, work paid for by employers, but also work sponsored by public institutions. The European Commission’s Next Generation Internet (NGI) calls have been instrumental in that regard. News that NGI funding could vanish came to us as a warning signal.

Since 2020, NGI has supported many free software projects, allowing for significant strides on important topics that would otherwise be hard to fund. As an example, here are some of the NGI grants that directly benefited Guix and related projects:

Over the years, NGI has more than demonstrated that public financial support for free software development makes a difference. We strongly believe that this support must continue, that it must strengthen the development of innovative software where user autonomy and freedom is a central aspect.

For these reasons, the Guix project joins a growing number of projects and organizations in signing the following open letter to the European Commission.

The open letter below was initially published by petites singularités. English translation provided by OW2.

Open Letter to the European Commission

Since 2020, Next Generation Internet (NGI) programmes, part of European Commission's Horizon programme, fund free software in Europe using a cascade funding mechanism (see for example NLnet's calls). This year, according to the Horizon Europe working draft detailing funding programmes for 2025, we notice that Next Generation Internet is not mentioned any more as part of Cluster 4.

NGI programmes have shown their strength and importance to supporting the European software infrastructure, as a generic funding instrument to fund digital commons and ensure their long-term sustainability. We find this transformation incomprehensible, moreover when NGI has proven efficient and economical to support free software as a whole, from the smallest to the most established initiatives. This ecosystem diversity backs the strength of European technological innovation, and maintaining the NGI initiative to provide structural support to software projects at the heart of worldwide innovation is key to enforce the sovereignty of a European infrastructure. Contrary to common perception, technical innovations often originate from European rather than North American programming communities, and are mostly initiated by small-scaled organisations.

Previous Cluster 4 allocated 27 million euros to:

  • "Human centric Internet aligned with values and principles commonly shared in Europe" ;
  • "A flourishing internet, based on common building blocks created within NGI, that enables better control of our digital life" ;
  • "A structured ecosystem of talented contributors driving the creation of new internet commons and the evolution of existing internet commons".

In the name of these challenges, more than 500 projects received NGI funding in the first 5 years, backed by 18 organisations managing these European funding consortia.

NGI contributes to a vast ecosystem, as most of its budget is allocated to fund third parties by the means of open calls, to structure commons that cover the whole Internet scope - from hardware to application, operating systems, digital identities or data traffic supervision. This third-party funding is not renewed in the current program, leaving many projects short on resources for research and innovation in Europe.

Moreover, NGI allows exchanges and collaborations across all the Euro zone countries as well as "widening countries"Âč, currently both a success and an ongoing progress, likewise the Erasmus programme before us. NGI also contributes to opening and supporting longer relationships than strict project funding does. It encourages implementing projects funded as pilots, backing collaboration, identification and reuse of common elements across projects, interoperability in identification systems and beyond, and setting up development models that mix diverse scales and types of European funding schemes.

While the USA, China or Russia deploy huge public and private resources to develop software and infrastructure that massively capture private consumer data, the EU can't afford this renunciation. Free and open source software, as supported by NGI since 2020, is by design the opposite of potential vectors for foreign interference. It lets us keep our data local and favors a community-wide economy and know-how, while allowing an international collaboration.

This is all the more essential in the current geopolitical context: the challenge of technological sovereignty is central, and free software allows to address it while acting for peace and sovereignty in the digital world as a whole.

In this perspective, we urge you to claim for preserving the NGI programme as part of the 2025 funding programme.

Âč As defined by Horizon Europe, widening Member States are Bulgaria, Croatia, Cyprus, Czechia, Estonia, Greece, Hungary, Latvia, Lituania, Malta, Poland, Portugal, Romania, Slovakia, and Slovenia. Widening associated countries (under condition of an association agreement) include Albania, Armenia, Bosnia, Feroe Islands, Georgia, Kosovo, Moldavia, Montenegro, Morocco, North Macedonia, Serbia, Tunisia, Turkeye, and Ukraine. Widening overseas regions are Guadeloupe, French Guyana, Martinique, Reunion Island, Mayotte, Saint-Martin, The Azores, Madeira, the Canary Islands.

Categories: FLOSS Project Planets

Mike Driscoll: ANN: ObjectListView3 for wxPython

Planet Python - Tue, 2024-07-23 11:44

ObjectListView is a third-party wxPython widget that wraps the wx.ListCtrl. I have used it for over 10 years in quite a few different GUI applications because it works much nicer than wx.ListCtrl does. Unfortunately, ObjectListView was never integrated into wxPython core like some other amazing third-party packages were, and so it has become broken over the past couple of years such that you can’t use it with the latest version of Python / wxPython.

So, I decided to fork the project, as its defects were simple enough that I could resolve them quickly. The new version of ObjectListView is now called ObjectListView3.

You can get the new version of ObjectListview here:

Note that this version of ObjectListView works with Python 3.11+ and wxPython 4.2+. It may work with earlier versions as well.

Installation

If you’d like to install ObjectListView3, you can use Python’s pip to do so like this:

python -m pip install ObjectListView3

Now let’s see how an example of using ObjectListView!

Sample Usage

The following is an application that starts out by listing two books in an ObjectListView3 widget. When you press the “Update OLV” button, it will add three more books to the ObjectListView3 widget.

This demonstrates how to create the ObjectListview3 widget and update it after the application is running:

import wx from ObjectListView3 import ObjectListView, ColumnDefn class Book(object): """ Model of the Book object Contains the following attributes: 'ISBN', 'Author', 'Manufacturer', 'Title' """ def __init__(self, title, author, isbn, mfg): self.isbn = isbn self.author = author self.mfg = mfg self.title = title class MainPanel(wx.Panel): def __init__(self, parent): super().__init__(parent=parent, id=wx.ID_ANY) self.products = [ Book("wxPython in Action", "Robin Dunn", "1932394621", "Manning"), Book("Hello World", "Warren and Carter Sande", "1933988495", "Manning"), ] self.dataOlv = ObjectListView( self, wx.ID_ANY, style=wx.LC_REPORT | wx.SUNKEN_BORDER ) self.setBooks() # Allow the cell values to be edited when double-clicked self.dataOlv.cellEditMode = ObjectListView.CELLEDIT_SINGLECLICK # create an update button updateBtn = wx.Button(self, wx.ID_ANY, "Update OLV") updateBtn.Bind(wx.EVT_BUTTON, self.updateControl) # Create some sizers mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer.Add(self.dataOlv, 1, wx.ALL | wx.EXPAND, 5) mainSizer.Add(updateBtn, 0, wx.ALL | wx.CENTER, 5) self.SetSizer(mainSizer) def updateControl(self, event): """ Update the ObjectListView """ product_dict = [ { "title": "Core Python Programming", "author": "Wesley Chun", "isbn": "0132269937", "mfg": "Prentice Hall", }, { "title": "Python Programming for the Absolute Beginner", "author": "Michael Dawson", "isbn": "1598631128", "mfg": "Course Technology", }, { "title": "Learning Python", "author": "Mark Lutz", "isbn": "0596513984", "mfg": "O'Reilly", }, ] data = self.products + product_dict self.dataOlv.SetObjects(data) def setBooks(self, data=None): self.dataOlv.SetColumns( [ ColumnDefn("Title", "left", 220, "title"), ColumnDefn("Author", "left", 200, "author"), ColumnDefn("ISBN", "right", 100, "isbn"), ColumnDefn("Mfg", "left", 180, "mfg"), ] ) self.dataOlv.SetObjects(self.products) class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__( self, parent=None, id=wx.ID_ANY, title="ObjectListView Demo", size=(800, 600), ) panel = MainPanel(self) class OLVDemoApp(wx.App): def __init__(self, redirect=False, filename=None): super().__init__(redirect, filename) def OnInit(self): # create frame here frame = MainFrame() frame.Show() return True def main(): """ Run the demo """ app = OLVDemoApp() app.MainLoop() if __name__ == "__main__": main()

When you initially run this code, you will see the following application:

When you press the “Update OLV” button, the application will update to look like the following:

Wrapping Up

The ObjectListView3 widget makes working with tabular data easy in wxPython. You also get nice editing, sorting and more from this widget via different mixins or styles. Give ObjectListView3 a try when you create your next wxPython GUI application.

The post ANN: ObjectListView3 for wxPython appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

The Drop Times: Inside Look at DrupalCamp Colorado 2024: What to Expect from the Event

Planet Drupal - Tue, 2024-07-23 11:17
Get exclusive insights from the organizers about DrupalCamp Colorado 2024. Learn about keynote speakers, session highlights, venue details, networking opportunities, and the vital role of sponsors and volunteers.
Categories: FLOSS Project Planets

Pages