FLOSS Project Planets

Thomas Koch: Rebuild search with trust

Planet Debian - Sat, 2024-01-20 06:10
Posted on January 20, 2024 Tags: debian, free software, life, search, decentralization

Finally there is a thing people can agree on:

Apparently, Google Search is not good anymore. And I’m not the only one thinking about decentralization to fix it:

Honey I federated the search engine - finding stuff online post-big tech - a lightning talk at the recent chaos communication congress

The speaker however did not mention, that there have already been many attempts at building distributed search engines. So why do I think that such an attempt could finally succeed?

  • More people are searching for alternatives to Google.
  • Mainstream hard discs are incredibly big.
  • Mainstream internet connection is incredibly fast.
  • Google is bleeding talent.
  • Most of the building blocks are available as free software.
  • “Success” depends on your definition…

My definition of success is:

A mildly technical computer user (able to install software) has access to a search engine that provides them with superior search results compared to Google for at least a few predefined areas of interest.

The exact algorithm used by Google Search to rank websites is a secret even to most Googlers. However I assume that it relies heavily on big data.

A distributed search engine however can instead rely on user input. Every admin of one node seeds the node ranking with their personal selection of trusted sites. They connect their node with nodes of people they trust. This results in a web of (transitive) trust much like pgp.

Imagine you are searching for something in a world without computers: You ask the people around you and probably they forward your question to their peers.

I already had a look at YaCy. It is active, somewhat usable and has a friendly maintainer. Unfortunately I consider the codebase to not be worth the effort. Nevertheless, YaCy is a good example that a decentralized search software can be done even by a small team or just one person.

I myself started working on a software in Haskell and keep my notes here: Populus:DezInV. Since I’m learning Haskell along the way, there is nothing there to see yet. Additionally I took a yak shaving break to learn nix.

By the way: DuckDuckGo is not the alternative. And while I would encourage you to also try Yandex for a second opinion, I don’t consider this a solution.

Categories: FLOSS Project Planets

TechBeamers Python: How to Remove Whitespace from a String in Python

Planet Python - Sat, 2024-01-20 05:57

This tutorial explains multiple ways to remove whitespace from a string in Python. Often, as a programmer, we need to put in a mechanism to remove whitespace, especially trailing spaces. So, with the solutions given here, you would be able to remove most types of whitespaces from the string. Multiple Ways to Remove Whitespace from […]

The post How to Remove Whitespace from a String in Python appeared first on TechBeamers.

Categories: FLOSS Project Planets

Events in 2024

Planet KDE - Sat, 2024-01-20 05:00

Having ended 2023 with attending 37C3 the new years starts with planning and booking for conferences and events I want to attend in 2024.

My Events in 2024 FOSDEM

February 3-4 in Brussels, Belgium. I’ll be speaking about semantic data extration in KMail and Nextcloud Mail in the Modern Email devroom.

There’s also going to be a Railways and Open Transport devroom again which I’m particularly looking forward to, and of course the KDE stand.

OSM Hack Weekend

February 24-25 in Karlruhe, Germany (wiki).

Based on historical patterns another such weekend can probably be expected for autumn, and a similar pair of events might also happen in Berlin again. As time permits I’ll try to join those as well.

FOSSGIS Konferenz

March 20-23 in Hamburg, Germany. Together with Tobias Knerr I’ll be hosting a session about OSM indoor mapping.

KDE Akademy

September 07-12 in Würzburg, Germany. It would need a pandemic for me to miss that one.

38C3

And for concluding 2024 there’s then going to be the 38th Chaos Communication Congress (38C3), December 27-30, presumably in Hamburg, Germany again. Ticket supply permitting I’d love to go there and hope we’ll have a KDE presence there again.

What’s (still) missing

Some events aren’t on the list (yet), for various reasons:

  • Linux App Summit (LAS) 2024: No official date and location yet. Obviously something I’d attend again as well, however there’s indications it might not be in Europe this time, and intercontinental travel for a three day event is hard to justify for me.
  • State of the Map (SotM) 2024: OSM’s global yearly conference I so far have failed to attend in person. Overlaps with Akademy this year though, and also would require intercontinental travel.
  • KDE sprints: None scheduled yet, although there have been first discussion for another KDE PIM sprint at least. Time permitting I’ll of course try to attend anything I’m involved with.

Even with all of that it’s still likely incomplete, typically more things come up during the year or I discover new events to attend along the way. I also haven’t seen anything scheduled from Wikidata or the Open Transport community yet.

Events in KDE Itinerary

For planning travel to events it’s helpful to have the event time and location data in Itineray, without having to enter all that manually. Besides supporting some commonly encountered registration/ticketing systems (e.g. Indico, Pretix) it has also been possible to import events by opening, pasting or dropping URLs to a corresponding Mobilizon or other ActivityPub-compatible source, as well as the URL of the event website directly.

For the latter to work, the website needs schema.org semantic annotations describing the event, as e.g. found on the Akademy website. Since a week ago the FOSS event aggregation site // foss.events also has such annotations, so you can easily import any event from there now as well.

FOSDEM 2024 event data imported from foss.events in Itinerary.

Looking forward to an exciting year and meeting many of you at events :)

Categories: FLOSS Project Planets

TechBeamers Python: Install Python packages with pip and requirements.txt

Planet Python - Sat, 2024-01-20 02:26

Check this tutorial if you want to learn how to use pip to install Python packages using the requirements.txt. It is a simple configuration file where we can list the exact packages with their versions. It will ensure that our Python project uses the correct packages. No matter whether you build it on a new […]

The post Install Python packages with pip and requirements.txt appeared first on TechBeamers.

Categories: FLOSS Project Planets

This week in KDE: auto-save in Dolphin and better fractional scaling

Planet KDE - Sat, 2024-01-20 00:42

We’re in the home stretch now!

Plasma and Gear apps have branched, which means anything committed to master and not backported is going into the next release after the mega-release next month. For Plasma, the next one is 6.1, and for Gear apps, it’s 24.05. Quite a few new features and UI improvements are starting to accumulate there! Here are a few:

Dolphin now periodically auto-saves its open windows and tabs, so you don’t lose state if the app crashes or the system is restarted unexpectedly (Amol Godbole, Dolphin 24.05. Link)

In Dolphin, you can now configure whether backup and trash files are shown when hidden files are made visible (Méven Car, Dolphin 24.05. Link)

In Dolphin, you can now pop out a split view pane into its own new window (Loren Burkholder, Dolphin 24.05. Link)

Fixed an issue in Dolphin that could cause it to freeze when you use it to duplicate the same file multiple times (Eugene Popov, Dolphin 24.05. Link)

Okular now supports displaying popup menus in certain kinds of PDF documents that include them (Alexis Murzeau, Okular 24.05. Link)

Spectacle now lets you use more placeholders for screenshot and screen recording filenames (Noah Davis, Spectacle 24.05. Link 1 and link 2)

The Networks system tray popup can now tell you a network’s channel in addition to its frequency (Kai Uwe Broulik, link)

KDE 6 Mega-Release

(Includes all software to be released on the February 28th mega-release: Plasma 6, Frameworks 6, and apps from Gear 24.02)

General infoOpen issues: 237

UI improvements

Plasma’s global Edit Mode toolbar now has an “Add Panel” button that lets you add panels. With this located there, the desktop context menu has now lost its “Add Widgets” and “Add Panels” menu items since the functionality is fully available in the global Edit Mode. This makes the menu smaller and less overwhelming by default. Of course, if you want those menu items back, you can just re-add them. (Akseli Lahtinen and me: Nate Graham, link 1, link 2, and link 3):

In the portal-based “Choose a screen/window to record” dialog, items are now chosen with a single-click, unless the dialog is in multi-select mode, in which case a double-click will choose one (because a single-click only selects it). Also, in multi-select mode, the items have little checkboxes in the corner so you know that you can select more than one (Yifan Zhu and me: Nate Graham, link 1, and link 2):

This dialog could still use more UI polish, which is being scoped out Bug fixes

Important note: I don’t mention fixes for bugs that were never released to users; it’s just too much for me (it would probably be too much for you to read as well), and most people never encountered them in the first place. Because we’re in the middle of a big Plasma dev cycle, there are a lot of these bugs! So big thanks to everyone who’s made it a priority to fix them!

Powerdevil no longer fails to start at login when using the ddcutil-2.0.0 library and certain DDC-compatible monitors (David Edmundson, link). Note that we also have reports of new issues for people using ddcutil-2.1.0, but those are different and need separate investigation, which is ongoing.

Did some more work to ensure that visual glitches in QtQuick apps are minimized when using a fractional scale factor. There’s still more work to do for text and window outlines/shadows, but you should no longer see weird tearing-related glitches in buttons and icons (Arjen Hiemstra and Marco Martin, link)

Made KWin more robust when restoring settings for multi-screen arrangements when any of the screens are missing their EDIDs (Stefan Hoffmeister, link)

When using a weather provider that gives forecasts longer than 7 days (like EnvCan), the right edge of the Weather widget’s forecast never gets cut off when viewed in the System Tray (Ismael Asensio, link)

Your Plasma panels will no longer flicker oddly when certain full-screen games do something rather odd by repeatedly switching their windows between full-screen and maximized states (Xaver Hugl, link)

The “Window Type” window rule–which did not work on Wayland–has been replaced with a new “Window Layer” rule which works better for the purposes people typically use it for (Vlad Zahorodnii, link)

Other bug information of note:

Performance & Technical

Improved the speed of various config file lookups used very commonly throughout KDE software by 13-16% (Friedrich Kossebau, link)

Fixes for KF5

We’ve also got a few nice fixes for KF5 software this week!

Fixed an issue when moving or copying large number of files that could cause some of them to get skipped (and potentially lost) after skipping duplicated folders (Eugene Popov, Frameworks 5.115. Link)

Fixed an issue that caused folders inside network shares/mounts to be non-expandable in Details view (Alessandro Astone, Frameworks 5.115. Link)

…And Everything Else

This blog only covers the tip of the iceberg! If you’re hungry for more, check out https://planet.kde.org, where you can find more news from other KDE contributors.

How You Can Help

Thanks to you, our Plasma 6 fundraiser has been a crazy success! I originally thought the goal of 500 new KDE e.V. supporting members was over-optimistic, but you’ve all proven me happily wrong. We’re now up to an incredible 665 members and unlocked both stretch goals! It’s pretty humbling. Thank you everyone for the confidence you’ve shown in us; we’ll try not to screw it up! For those who haven’t donated ot become members yet, spreading the wealth via this fundraiser is a great way to share the love.

If you’re a developer, work on Qt6/KF6/Plasma 6 issues! Which issues? These issues. Plasma 6 is very usable for daily driving now, but still in need of some final bug-fixing and polishing to get it into a solid state by February.

Otherwise, visit https://community.kde.org/Get_Involved to discover other ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!

Categories: FLOSS Project Planets

François Marier: Proper Multicast DNS Handling with NetworkManager and systemd-resolved

Planet Debian - Fri, 2024-01-19 20:10

Using NetworkManager and systemd-resolved together in Debian bookworm does not work out of the box. The first sign of trouble was these constant messages in my logs:

avahi-daemon[pid]: Host name conflict, retrying with hostname-2

Then I realized that CUPS printer discovery didn't work: my network printer could not be found. Since this discovery now relies on Multicast DNS, it would make sense that both problems are related to an incompatibility between NetworkManager and Avahi.

What didn't work

The first attempt I made at fixing this was to look for known bugs in Avahi. Neither of the work-arounds I found worked:

What worked

The real problem turned out to be the fact that NetworkManager turns on full mDNS support in systemd-resolved which conflicts with the mDNS support in avahi-daemon.

You can see this in the output of resolvectl status:

Global Protocols: -LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: stub Link 2 (enp6s0) Current Scopes: DNS mDNS/IPv4 mDNS/IPv6 Protocols: +DefaultRoute -LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 192.168.1.1 DNS Servers: 192.168.1.1 DNS Domain: lan

which includes +mDNS for the main network adapter.

I initially thought that I could just uninstall avahi-daemon and rely on the systemd-resolved mDNS stack, but it's not actually compatible with CUPS.

The solution was to tell NetworkManager to set mDNS to resolve-only mode in systemd-resolved by adding the following to /etc/NetworkManager/conf.d/mdns.conf:

[connection] connection.mdns=1

leaving /etc/avahi/avahi-daemon.conf to the default Debian configuration.

Verifying the configuration

After rebooting, resolvectl status now shows the following:

Global Protocols: -LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: stub Link 2 (enp6s0) Current Scopes: DNS mDNS/IPv4 mDNS/IPv6 Protocols: +DefaultRoute -LLMNR mDNS=resolve -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 192.168.1.1 DNS Servers: 192.168.1.1 DNS Domain: lan

Avahi finally sees my printer (called hp in the output below):

$ avahi-browse -at | grep Printer + enp6s0 IPv6 hp @ myprintserver Secure Internet Printer local + enp6s0 IPv4 hp @ myprintserver Secure Internet Printer local + enp6s0 IPv6 hp @ myprintserver Internet Printer local + enp6s0 IPv4 hp @ myprintserver Internet Printer local + enp6s0 IPv6 hp @ myprintserver UNIX Printer local + enp6s0 IPv4 hp @ myprintserver UNIX Printer local

and so does CUPS:

$ sudo lpinfo --include-schemes dnssd -v network dnssd://myprintserver%20%40%20hp._ipp._tcp.local/cups?uuid=d46942a2-b730-11ee-b05c-a75251a34287 Firewall rules

Since printer discovery in CUPS relies on mDNS, another thing to double-check is that the correct ports are open on the firewall.

This is what I have in /etc/network/iptables.up.rules:

# Allow mDNS for local service discovery -A INPUT -d 100.64.0.0/10 -p udp --dport 5353 -j ACCEPT -A INPUT -d 192.168.1.0/24 -p udp --dport 5353 -j ACCEPT

and in etc/network/ip6tables.up.rules:

# Allow mDNS for local service discovery -A INPUT -d ff02::/16 -p udp --dport 5353 -j ACCEPT
Categories: FLOSS Project Planets

Making Two New High Contrast Themes for KMines

Planet KDE - Fri, 2024-01-19 19:00
Why KMines? #

Minesweeper is a tragically underrated puzzle game. While I recall examining the mysterious array of gray squares as a child, it wasn't until adulthood that I took the time to learn the rules of the game. Despite my late start, however, I still count minesweeper as a classic. These days, good minesweeper clones are hard to come by. I settled on GNOME's Mines for a while, but as the look of GTK applications on my QT-based KDE Plasma Desktop sets my teeth on edge, I ditched it for KMines in short order. While I enjoyed the game, I found the themes shipped with KMines a bit dated, so I thought I'd make my own.

The Clean Blue Dark KMines theme The Drama #

I didn't quite know what I was getting into when I started working on my themes. I had expected there'd be a simple way to add themes through the KMines settings menu, or by dropping an SVG somewhere in your file-system. If only it were so simple. Adding a theme to KMines requires setting up a full-on KDE development environment, re-compiling KMines from source each time you want to test it, and then, of course, submitting a merge request to the git repository. Thanks to the help of some very patient souls in various KDE Matrix channels, I was able to work through all of this, but I found the process so tricky that I submited a second merge request, this time to the repository for develop.kde.org, for a page documenting the process. Now I realise that some developers out there are going to read through this and wonder if I was dropped on my head as an infant, but in my defense, when it comes to software development, I'm a humble designer and Jamstack web developer. This is all very new to me, and I was expecting a much more streamlined process for what I saw as simple visual tweaks.

The Clean Blue Light KMines theme Why High Contrast #

When submitting my initial design, a KDE contributor who had been helping me via Matrix pointed out that they found the theme difficult to parse visually as the contrast was quite low. I hadn't considered contrast ratios here, my thinking being that I didn't need to; I was just making one theme among many, after all, and users could choose any theme that worked best for them. After some consideration, however, it dawned on me that my theme would likely be the only modern-looking theme in the release, so it would be ideal if it were as accessible as possible. With this in mind, thanks to the feedback of one helpful individual, instead of one pretty but low contrast theme, I decided to make two modern high contrast themes, one light and one dark, targeting the WCAG AAA standard for contrast.

Coming in Plasma 6! #

With thanks to those KDE contributors who helped make it happen, the merge request containing these two themes scraped by the skin of its teeth past the closing door of a feature-freeze and will be available with Plasma 6 this February!

Categories: FLOSS Project Planets

Drupalize.Me: Part 1: HttpKernel in Drupal (Spotlight on Symfony in Drupal)

Planet Drupal - Fri, 2024-01-19 17:47
Part 1: HttpKernel in Drupal (Spotlight on Symfony in Drupal)

For over a decade, Drupal has been using Symfony Components. In 2015, with the release of Drupal 8, these components became a part of Drupal's core software. It's possible to build complex Drupal sites without worrying about what these components do. But learning about the system we're using will make us better developers of Drupal sites and other PHP applications.

In this first part of a 3-part series, we'll explore how Symfony helps Drupal with its HttpKernel component. We'll look at the component itself and how Drupal uses it to coordinate the request/response cycle.

Blake Hall Fri, 01/19/2024 - 16:47
Categories: FLOSS Project Planets

Test and Code: 213: Repeating Tests

Planet Python - Fri, 2024-01-19 17:09

If a test fails in a test suite, I'm going to want to re-run the test. I may even want to re-run a test, or a subset of the suite, a bunch of times.  
There are a few pytest plugins that help with this:

We talk about each of these in this episode.


Sponsored by PyCharm Pro

The Complete pytest Course

  • For the fastest way to learn pytest, go to courses.pythontest.com
  • Whether your new to testing or pytest, or just want to maximize your efficiency and effectiveness when testing.
<p>If a test fails in a test suite, I'm going to want to re-run the test. I may even want to re-run a test, or a subset of the suite, a bunch of times.  <br>There are a few pytest plugins that help with this:</p><ul><li><a href="https://github.com/pytest-dev/pytest-repeat">pytest-repeat</a></li><li><a href="https://github.com/pytest-dev/pytest-rerunfailures">pytest-rerunfailures</a></li><li><a href="https://github.com/dropbox/pytest-flakefinder">pytest-flakefinder</a></li><li><a href="https://github.com/pytest-dev/pytest-instafail">pytest-instafail</a></li></ul><p>We talk about each of these in this episode.</p> <br><p><strong>Sponsored by PyCharm Pro</strong></p><ul><li>Use code PYTEST for 20% off PyCharm Professional at <a href="https://www.jetbrains.com/pycharm/">jetbrains.com/pycharm</a></li><li>First 10 to sign up this month get a free month of AI Assistant</li><li>See how easy it is to run pytest from PyCharm at <a href="https://pythontest.com/pycharm/">pythontest.com/pycharm</a></li></ul><p><strong>The Complete pytest Course</strong></p><ul><li>For the fastest way to learn pytest, go to <a href="https://courses.pythontest.com/p/complete-pytest-course">courses.pythontest.com</a></li><li>Whether your new to testing or pytest, or just want to maximize your efficiency and effectiveness when testing.</li></ul>
Categories: FLOSS Project Planets

Marcos Dione: Sending AWS CloudWatch alarms through SNS to MSTeams

Planet Python - Fri, 2024-01-19 15:36

I'm new to AWS os please take the following statements with a grain of salt. Also, I'm tired, but I want to get this of my chest before the weekend begins (although, technically, it has already begun), so it might not be so coherent.

AWS provides some minimum monitoring of your resources with a tool called CloudWatch. Think of prometheus + grafana, but more limited. Still, is good enough to the point it makes sense to setup some Alerts on it. Many of AWS's resources are not processes running on a computer you have access to, so you can't always install some exporters and do the monitoring yourself.

If you're like me, CloudWatch Alerts must be sent to the outside world so you can receive them and react. One way to do this1 is to channel them through SNS. SNS supports many protocols, most of them internal to AWS, but also HTTP/S. SNS is a pub-sub system, and requires a little bit of protocol before it works.

On the other end we2 have MSTeams3. MSTeams has many ways of communicating. One is Chat, which is a crappy chat67, and another is some kind of mix between a blog and twitter, confusingly called Teams. The idea in a Team is that you can post... Posts? Articles? And from them you can have an unthreaded converstion. Only Teams have webhooks; Chats do not, so you can't point SNS there.

If you have read other articles about integrating CloudWatch Alerts or SNS to MSTeams, they will always tell you that you not only need SNS, but also a Lambda program. Since we already handle gazillion servers, not all of them in AWS, and one in particular we pay quite cheap for dedicated HW, and also we're trying to slim our AWS bill (who doesn't), I decided to see if I can build my own bridge between SNS and Teams.

I already said that SNS has a litte protocol. The idea is that when you create an HTTP/S Subscription in SNS, it will POST a first message to the URL you define. This message will have a JSON payload. We're interested in two fields:

{ "Type": "SubscriptionConfirmation", "SubscribeURL": "..." }

What you have to do is get this URL and call it. That way SNS will know the endpoint exists and will associate an ARN to the Subscription. Otherwise, the Subscription will stay unconfirmed and no messages will be sent to it. Interestingly, you can't neither edit nor remove Subscriptions (at least not with the web interface), and I read that unconfirmed Subscriptions will disappear after 3 days or so 4.

SNS messages are also a JSON payload POST'ed to the URL. They look like this:

{ "Type" : "Notification", "MessageId" : "<uuid1>", "TopicArn" : "<arn>", "Subject" : "...", "Message" : "...", "Timestamp" : "2024-01-19T14:29:54.147Z", "SignatureVersion" : "1", "Signature" : "cTQUWntlQW5evk/bZ5lkhSdWj2+4oa/4eApdgkcdebegX3Dvwpq786Zi6lZbxGsjof2C+XMt4rV9xM1DBlsVq6tsBQvkfzGBzOvwerZZ7j4Sfy/GTJvtS4L2x/OVUCLleY3ULSCRYX2H1TTTanK44tOU5f8W+8AUz1DKRT+qL+T2fWqmUrPYSK452j/rPZcZaVwZnNaYkroPmJmI4gxjr/37Q6gA8sK+WyC0U91/MDKHpuAmCAXrhgrJIpEX/1t2mNlnlbJpcsR9h05tHJNkQEkPwFY0HFTnyGvTM2DP6Ep7C2z83/OHeVJ6pa7Sn3txVWR5AQC1PF8UbT7zdGJL9Q==", "SigningCertURL" : "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-01d088a6f77103d0fe307c0069e40ed6.pem", "UnsubscribeURL" : "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=<arn>:<uuid2>" }

Now, CloudWatch Alerts sent via SNS are sent in the Message field. As Message's value is a string and the Alert is encoded as JSON, yes, you guessed it, it's double encoded:

{ "Message" : "{\"AlarmName\":\"foo\",...}" }

Sigh. After unwrapping it, it looks like this:

{ "AlarmName": "...", "AlarmDescription": "...", "AWSAccountId": "...", "AlarmConfigurationUpdatedTimestamp": "2024-01-18T14:32:17.244+0000", "NewStateValue": "ALARM", "NewStateReason": "Threshold Crossed: 1 out of the last 1 datapoints [10.337853107344637 (18/01/24 14:28:00)] was greater than the threshold (10.0) (minimum 1 datapoint for OK -> ALARM transition).", "StateChangeTime": "2024-01-18T14:34:54.103+0000", "Region": "EU (Ireland)", "AlarmArn": "<alarm_arn>", "OldStateValue": "INSUFFICIENT_DATA", "OKActions": [], "AlarmActions": [ "<sns_arn>" ], "InsufficientDataActions": [], "Trigger": { "MetricName": "CPUUtilization", "Namespace": "AWS/EC2", "StatisticType": "Statistic", "Statistic": "AVERAGE", "Unit": null, "Dimensions": [ { "value": "<aws_id>", "name": "InstanceId" } ], "Period": 60, "EvaluationPeriods": 1, "DatapointsToAlarm": 1, "ComparisonOperator": "GreaterThanThreshold", "Threshold": 10.0, "TreatMissingData": "missing", "EvaluateLowSampleCountPercentile": "" } }

The name and description are arbitrary texts you wrote when setting the Alarm and the Subscription. Notice that the region is not the codename as in eu-west-1 but a supposedly more human readable text. The rest is mostly info about the Alarm itself. Also notice the Dimensions field. I don't know what other data comes here (probably the arbitrary fields and values you can setup in the Alarm), all I can say is that that format (list of dicts with only two fields, one called name and the other value) is possibly the most annoying implementation of a simple dict. I hope they have a reason for that, besides over engineering.

Finally, notice that the only info we get here about the source of the alarm is the InstanceId. As those are random strings, to me they don't mean anything. Maybe I can setup the Alarm so it also includes the instance'a name5, and even maybe the URL pointing to the metric's graph.

Finally, Teams' webhook also expects a JSON payload. I didn't delve much in what you can give to it, I just used the title, text and themeColor fields. At least text can be written in MarkDown. You get such a webhook going to the Team, click in the ⋮ ("vertical ellipsis") icon, "Connectors", add a webhook and obtain the URL from there. @type and @context I copied from an SNS-to-Lambda-to-Teams post.

So to build a bridge between CloudWatch Alerts through SNS to MSTeams's Team we just need a quite straightforward script. I decided to write it in Flask, but I'm pretty sure writing it in plain http.server and urllib.request to avoid dependencies is not much more work; I just didn't want to do it. Maybe I should have tried FastAPI instead; I simply forgot about it.

Without further ado, here's the script. I'm running Python 3.8, so I don't have case/match yet.

#! /usr/bin/env python3 ​ from flask import Flask, request import json import requests ​ app = Flask(__name__) ​ @app.route('/', methods=[ 'POST' ]) def root(): print(f"{request.data=}") ​ request_data = json.loads(request.data) ​ # python3.8, not case/match yet message_type = request_data['Type'] ​ if message_type == 'SubscriptionConfirmation': response = requests.get(request_data['SubscribeURL']) print(response.text) ​ return f"hello {request_data['TopicArn']}!" ​ message = { '@type': 'MessageCard', '@context': 'http://schema.org/extensions', 'themeColor': '4200c5', } ​ if message_type == 'Notification': try: alarm = json.loads(request_data['Message']) except json.JSONDecodeError: message['title'] = request_data['Subject'] message['text'] = request_data['Message'] else: instance_id = alarm['Trigger']['Dimensions'][0]['value'] state = alarm['NewStateValue'] ​ if state == 'ALARM': color = 'FF0000' else: color = '00FF00' ​ message['title'] = f"{instance_id}: {alarm['Trigger']['MetricName']} {state}" message['text'] = f"""{alarm['AlarmName']} ​ {alarm['Trigger']['MetricName']} {alarm['Trigger']['ComparisonOperator']} {alarm['Trigger']['Threshold']} for {int(alarm['Trigger']['Period']) // 60} minutes. ​ {alarm['AlarmDescription']} ​ {alarm['NewStateReason']} ​ for {instance_id} passed to {state} at {alarm['StateChangeTime']}.""" message['themeColor'] = color ​ response = requests.post('https://<company>.webhook.office.com/webhookb2/<uuid1>@<uuid2>/IncomingWebhook/<id>/<uuid3>', json=message) print(response.text) ​ return f"OK"
  1. Again, I'm new to AWS. This is how it's setup at $NEW_JOB, but there might be better ways. If there are, I'm happy to hear them. 

  2. 'we' as in me and my colleagues. 

  3. Don't get me started... 

  4. I know all this because right now I have like 5-8 unconfirmed Subscriptions because I had to figure all this out, mostly because I couldn't find sample data or, preferably, a tool that already does this. They're 5-8 because you can't create a second Subscription to the same URL, so I changed the port for every failed attempt to confirm the Subscription. 

  5. We don't have pets, but don't quite have cattle either. We have cows we name, and we get a little bit sad when we sell them, but we're happy when they invite us to the barbecue. 

  6. OK, I already started... 

  7. I added this footnote (I mean, the previous one... but this one too) while reviewing the post before publishing. Putting the correct number means editing the whole post, changing each number twice, which is error prone. In theory nikola and/or MarkDown support auto-numbered footnotes, but I never managed to make it work. I used to have the same issue with the previous static blog/stite compiler, ikiwiki, so this is not the first time I have out-of-order footnotes. In any case, I feel like they're a quirk that I find cute and somehow defining. 

Categories: FLOSS Project Planets

Django Weblog: DSF calls for applicants for a Django Fellow

Planet Python - Fri, 2024-01-19 14:18

After five years as part of the Django Fellowship program, Mariusz Felisiak has let us know that he will be stepping down as a Django Fellow in March 2024 to explore other things. Mariusz has made an extraordinary impact as a Django Fellow and has been a critical part of the Django community.

The Django Software Foundation and the wider Django community are grateful for his service and assistance.

The Fellowship program was started in 2014 as a way to dedicate high-quality and consistent resources to the maintenance of Django. As Django has matured, the DSF has been able to fundraise and earmark funds for this vital role. As a result, the DSF currently supports two Fellows - Mariusz Felisiak and Natalia Bidart. With the departure of Mariusz, the Django Software Foundation is announcing a call for Django Fellow applications. The new Fellow will work alongside Natalia.

The position of Fellow is focused on maintenance and community support - the work that benefits most from constant, guaranteed attention rather than volunteer-only efforts. In particular, the duties include:

  • Answering contributor questions on Forum and the django-developers mailing list
  • Helping new Django contributors land patches and learn our philosophy
  • Monitoring the security@djangoproject.com email alias and ensuring security issues are acknowledged and responded to promptly
  • Fixing release blockers and helping to ensure timely releases
  • Fixing severe bugs and helping to backport fixes to these and security issues
  • Reviewing and merging pull requests
  • Triaging tickets on Trac

Being a Django contributor isn't a prerequisite for this position — we can help get you up to speed. We'll consider applications from anyone with a proven history of working with either the Django community or another similar open-source community. Geographical location isn't important either - we have several methods of remote communication and coordination that we can use depending on the timezone difference to the supervising members of Django.

If you're interested in applying for the position, please email us at fellowship-committee@djangoproject.com describing why you would be a good fit along with details of your relevant experience and community involvement. Also, please include your preferred hourly rate and when you'd like to start working. Lastly, please include at least one recommendation.

Applicants will be evaluated based on the following criteria:

  • Details of Django and/or other open-source contributions
  • Details of community support in general
  • Understanding of the position
  • Clarity, formality, and precision of communications
  • Strength of recommendation(s)

Applications will be open until 1200 AoE, February 16, 2024, with the expectation that the successful candidate will be notified no later than March 1, 2024.

Categories: FLOSS Project Planets

GNU Guix: Guix at FOSDEM 2024

GNU Planet! - Fri, 2024-01-19 08:59

It's not long to FOSDEM 2024, where Guixers will come together to learn and hack. As usual there's some great talks and opportunities to meet other users and contributors.

FOSDEM is Europe's biggest Free Software conference. It's aimed at developers and anyone who's interested in the Free Software movement. While it's an in-person conference there are live video streams and lots of ways to participate remotely.

The schedule is varied with development rooms covering many interests. Here are some of the talks that are of particular interest to Guixers:

Saturday, 3rd FebuarySunday, 4th February

The Declarative and Minimalistic Computing track takes place Sunday morning. Important topics are:

  • Minimalism Matters: sustainable computing through smaller, resource efficient systems
  • Declarative Programming: reliable and reproducible systems by minimising side-effects

Guix-related talks are:

  • "Scheme in the Browser with Guile Hoot and WebAssembly" by Robin Templeton (11:00 CET). A talk covering bringing Scheme to WebAssembly through the Guile Hoot toolchain. Addressing the current state of Guile Hoot with examples, and how recent Wasm proposals might improve the situation in the future.
  • "RISC-V Bootstrapping in Guix and Live-Bootstrap" by Ekaitz Zarraga (11:20 CET). An update on the RISC-V bootstrapping effort in Guix and Live-bootstrap. Covering what's been done, what's left to do and some of the lessons learned.
  • "Self-hosting and autonomy using guix-forge" by Arun Isaac (11:40 CET). This talk demonstrates the value of Guix's declarative configuration to simplify deploying and maintaining complex services. Showing guix-forge, a project that makes it easy to self-host an efficient software forge.
  • "Spritely, Guile, Guix: a unified vision for user security" by Christine Lemmer-Webber (12:00 CET). Spritely's goal is to create networked communities that puts people in control of their own identity and security. This talk will present a unified vision of how Spritely, Guile, and Guix can work together to bring user freedom and security to everyone!

This year the track commemorates Joe Armstrong, who was the principal inventor of Erlang. His focus on concurrency, distribution and fault-tolerence are key topics in declarative and minimalistic computing. This article is a great introduction to his legacy. Along with "The Mess We're In", a classic where he discusses why software is getting worse with time, and what can be done about it.

On Sunday afternoon, the Distributions devroom has another Guix talk:

  • "Supporting architecture psABIs with GNU Guix" by Efraim Flashner (14:30 CET). Guix maintainer Efraim will be giving a talk about improving Guix's performance. Demonstrating how to use psABI targets that keep older hardware compatible while providing optimized libraries for newer hardware.
Guix Days (Thursday and Friday)

Guix Days will be taking place on the Thursday and Friday before FOSDEM. This is an "unconference-style" event, where the community gets together to focus on Guix's development. All the details are on the Libreplanet Guix Wiki.

Participating

Come and join in the fun, whether you're a new Guix user or seasoned hacker! If you're not in Brussels you can still take part:

About GNU Guix

GNU Guix is a transactional package manager and an advanced distribution of the GNU system that respects user freedom. Guix can be used on top of any system running the Hurd or the Linux kernel, or it can be used as a standalone operating system distribution for i686, x86_64, ARMv7, AArch64, and POWER9 machines.

In addition to standard package management features, Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection. When used as a standalone GNU/Linux distribution, Guix offers a declarative, stateless approach to operating system configuration management. Guix is highly customizable and hackable through Guile programming interfaces and extensions to the Scheme language.

Categories: FLOSS Project Planets

Russell Coker: 2.5Gbit Ethernet

Planet Debian - Fri, 2024-01-19 07:46

I just decided to upgrade the core of my home network from 1Gbit to 2.5Gbit. I didn’t really need to do this, it was only about 5 years ago that I upgrade from 100Mbit to 1Gbit. but it’s cheap and seemed interesting.

I decided to do it because a 2.5Gbit switch was listed as cheap on Ozbargain Computing [1], that was $40.94 delivered. If you are in Australia and like computers then Ozbargain is a site worth polling, every day there’s interesting things at low prices. The seller of the switch is KeeplinkStore [2] who distinguished themselves by phoning me from China to inform me that I had ordered a switch with a UK plug for delivery to Australia and suggesting that I cancel the order and make a new order with an Australian plug. It wouldn’t have been a big deal if I had received a UK plug as I’ve got a collection of adaptors but it was still nice of them to make it convenient for me. The switch basically does what it’s expected to do and has no fan so it’s quiet.

I got a single port 2.5Gbit PCIe card for $18.77 and a dual port card for $34.07. Those cards are a little expensive when compared to 1Gbit cards but very cheap when compared to the computers they are installed in. These cards use the Realtek RTL8125 chipset and work well.

I got a USB-3 2.5Gbit device for $17.43. I deliberately didn’t get USB-C because I still use laptops without USB-C and most of the laptops with USB-C only have a single USB-C port which is used for power. I don’t plan to stop using my 100Mbit USB ethernet device because most of the time I don’t need a lot of speed. But sometimes I do things like testing auto-install on laptops and then having something faster than Gigabit is good. This card worked at 1Gbit speed on a 1Gbit network when used with a system running Debian/Bookworm with kernel 6.1 and worked at 2.5Gbit speed when connected to my LicheePi RISC-V system running Linux 5.10, but it would only do 100Mbit on my laptop running Debian/Unstable with kernel 6.6 (Debian Bug #1061095) [3]. It’s a little disappointing but not many people have such hardware so it probably doesn’t get a lot of testing. For the moment I plan to just use a 1Gbit USB Ethernet device most of the time and if I really need the speed I’ll just use an older kernel.

I did some tests with wget and curl to see if I could get decent speeds. When using wget 1.21.3 on Debian/Bookworm I got transfer speeds of 103MB/s and 18.8s of system CPU time out of 23.6s of elapsed time. Curl on Debian/Bookworm did 203MB/s and took 10.7s of system CPU time out of 11.8s elapsed time. The difference is that curl was using 100KB read buffers and a mix of 12K and 4K write buffers while wget was using 8KB read buffers and 4KB write buffers. On Debian/Unstable wget 1.21.4 uses 64K read buffers and a mix of 4K and 60K write buffers and gets a speed of 208MB/s. As an experiment I changed the read buffer size for wget to 256K and that got the speed up to around 220MB/s but it was difficult to measure as the occasional packet loss slowed things down. The pattern of writing 4K and then writing the rest continued, it seemed related to fwrite() buffering. For anyone else who wants to experiment with the code, the wget code is simpler (due to less features) and the package builds a lot faster (due to fewer tests) so that’s the one to work on.

The client machine for these tests has a E5-2696 v3 CPU, this doesn’t compare well to some of the recent AMD CPUs on single-core performance but is still a decently powerful system. Getting good performance at Gigabit speeds on an ARM or RISC-V system is probably going to be a lot harder than getting good performance at 2.5Gbit speeds on this system.

In conclusion 2.5Gbit basically works apart from a problem with new kernels and a problem with the old version of wget. I expect that when Debian/Trixie is released (probably mid 2025) things will work well. For good transfer rates use wget version 1.21.4 or newer or use curl.

As an aside I use a 1500byte MTU because I have some 100baseT systems on my LAN and the settings regarding TCP acceleration etc are all the defaults.

Related posts:

  1. Ethernet bonding Bonding is one of the terms used to describe multiple...
  2. Ethernet Interface Naming As far as I recall the standard for naming Linux...
  3. Ethernet Bonding and a Xen Bridge After getting Ethernet Bonding working (see my previous post) I...
Categories: FLOSS Project Planets

Web Review, Week 2024-03

Planet KDE - Fri, 2024-01-19 07:25

Let’s go for my web review for the week 2024-03.

Cat and Girl - 4000 of My Closest Friends

Tags: tech, copyright, law, art, ethics

How does it feel to just want to put something creative out there without being exploited? Very touching comic on the topic.

https://catandgirl.com/4000-of-my-closest-friends/


AI: the not-so-good parts - Xe Iaso

Tags: tech, ai, ethics

As an industry we definitely should think more often about the consequences of our actions. The incentives are indeed pushing us to go faster without much critical thinking.

https://xeiaso.net/talks/2024/prepare-unforeseen-consequences/


OpenAI Quietly Deletes Ban on Using ChatGPT for “Military and Warfare”

Tags: tech, gpt, war, ethics, business

Unsurprising move, they claim it’s for the betterment of mankind but in practice it’s mostly about capturing as much market share as possible.

https://theintercept.com/2024/01/12/open-ai-military-ban-chatgpt/


AI poisoning could turn open models into destructive “sleeper agents,” says Anthropic

Tags: tech, ai, machine-learning, gpt, security, supply-chain

The tone pointing at “open models” is wrong but the research is interesting. It still proves models can be poisoned (open or not) so traceability and secured supply-chains will become very important when using large language models.

https://arstechnica.com/information-technology/2024/01/ai-poisoning-could-turn-open-models-into-destructive-sleeper-agents-says-anthropic/


Will the new judicial ruling in the Vizio lawsuit strengthen the GPL?

Tags: tech, foss, law

Very interesting ruling, this opens the door to more parties being able to sue to enforce the GPL not just the authors.

https://blog.tidelift.com/will-the-new-judicial-ruling-in-the-vizio-lawsuit-strengthen-the-gpl


Unity’s Open-Source Double Standard: the ban of VLC - mfkl

Tags: tech, vlc, 3d, foss, business

This is a stupid move on Unity’s part… they’re built on LGPL but ban others in their store to have LGPL dependencies. Shame on them. Good move from Videolabs though, wish them lots of success.

https://mfkl.github.io/2024/01/10/unity-double-oss-standards.html


Pluralistic: The Cult of Mac

Tags: tech, apple, interoperability, security

Apple keep indeed attracting a bunch of cultists… and this allows them to keep abusing their other customers.

https://pluralistic.net/2024/01/12/youre-holding-it-wrong/#if-dishwashers-were-iphones


Each Facebook User is Monitored by Thousands of Companies – The Markup

Tags: tech, facebook, attention-economy, surveillance

Some more insights on the extent of the companies snitching to Facebook.

https://themarkup.org/privacy/2024/01/17/each-facebook-user-is-monitored-by-thousands-of-companies-study-indicates


Meta/Threads Interoperating in the Fediverse Data Dialogue Meeting yesterday

Tags: tech, fediverse, facebook

Interesting notes, there seems to be good faith on the Meta side for now… but this leaves more questions than answers still.

https://reb00ted.org/tech/20231208-meta-threads-data-dialogue/


Where is all of the fediverse?

Tags: tech, fediverse, self-hosting, infrastructure

Interesting stats, not that easy to gather. This gives a good overview of where the fediverse instances are hosted though.

https://blog.benjojo.co.uk/post/who-hosts-the-fediverse-instances


Making my website faster - Cliffle

Tags: tech, web, fonts, css, optimization

Nice set of tricks to optimize load and render time of webpages.

https://cliffle.com/blog/making-website-faster/


LeftoverLocals: Listening to LLM responses through leaked GPU local memory | Trail of Bits Blog

Tags: tech, gpu, machine-learning, security

Interesting vulnerability, not all vendors are impacted though. GPU memory leaks can have unforeseen impacts.

https://blog.trailofbits.com/2024/01/16/leftoverlocals-listening-to-llm-responses-through-leaked-gpu-local-memory/


Speedbump: TCP proxy for simulating variable, yet predictable network latency

Tags: tech, networking, tools

Looks like an interesting tool to simulate difficult network conditions.

https://github.com/kffl/speedbump


Willow Specifications

Tags: tech, protocols, data, networking, p2p

Looks like an interesting protocol for resilient peer to peer data stores. Let’s see how it spreads.

https://willowprotocol.org/


Beware of misleading GPU vs CPU benchmarks

Tags: tech, cpu, gpu, computation, economics

A good reminder that even though GPU tend to be faster, the added complexity and price might not be worth it in the end.

https://pythonspeed.com/articles/gpu-vs-cpu/


Using pre-commit hooks makes software development life easier

Tags: tech, git, craftsmanship, tools

Can definitely recommend. The pre-commit project also make managing those a breeze.

https://itnext.io/using-pre-commit-hooks-makes-software-development-life-easier-ef962827aa96


Using “will” and “should” in technical writing | James’ Coffee Blog

Tags: tech, documentation, writing

Pick your words wisely. If it does happen every time use “will”.

https://jamesg.blog/2024/01/17/will-should/


Everyday storytelling for engineers. The CAO Method.

Tags: tech, engineering, communication

Nice suggestion for talking about your work in various type of situations. Definitely worth trying to frame it like this.

https://tonyfreed.substack.com/p/everyday-storytelling-for-engineers


Does Working from Home Boost Productivity Growth? | San Francisco Fed

Tags: tech, remote-working, economics

Interesting report. Apparently so far a more widespread use of remote work doesn’t seem to boost of hinder productivity growth at large scale.

https://www.frbsf.org/economic-research/publications/economic-letter/2024/january/does-working-from-home-boost-productivity-growth/


The warrior culture of ancient Sparta did some weird things to their society.

Tags: history, politics

Or why nationalism and war mongering are unwelcome dead ends. I never understood this fascination for Sparta by some people… if you look at what it was without some misplaced romanticism, it definitely looked like an horrible and paranoid environment to live in.

https://slate.com/news-and-politics/2024/01/sparta-300-warriors-history-slavery.html


Bye for now!

Categories: FLOSS Project Planets

Real Python: The Real Python Podcast – Episode #188: Measuring Bias, Toxicity, and Truthfulness in LLMs With Python

Planet Python - Fri, 2024-01-19 07:00

How can you measure the quality of a large language model? What tools can measure bias, toxicity, and truthfulness levels in a model using Python? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to discuss techniques and tools for evaluating LLMs With Python.

[ 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

Daniel Roy Greenfeld: TIL: Writing decorators for classes

Planet Python - Fri, 2024-01-19 07:00

To my surprise writing decorators for classes is easier than for functions. Here's how to do it in annotated fashion with an unnecessary decorator that doesn't accept any additional arguments.

# Write a callable that accepts a cls as an argument def tools(cls): # Write functions that accept "self: object" as an argument. def simplistic_attribute_count(self: object) -> int: """Returns the number of attributes.""" return len(self.__dict__) def docs(self: object) -> str: """Returns the docstring for the class.""" return self.__doc__ # Attach the functions as methods cls.simplistic_attribute_count = simplistic_attribute_count cls.docs = docs # Return the modified class return cls

Let's test it out:

@tools class A: """Docstring for testing the tools decorator""" a = A() a.one = 1 assert a.simplistic_attribute_count() == 1 assert a.docs() == 'Docstring for testing the tools decorator'

Next up, how to do this while passing in arguments!

Categories: FLOSS Project Planets

LN Webworks: Document for first Drupal contribution

Planet Drupal - Fri, 2024-01-19 05:53
Drupal contribution: All You Need to Know

Drupal contribution refers to the collective effort of individuals and organizations who contribute their time, skills, and expertise to the development, improvement, and maintenance of the Drupal content management system (CMS). 

Drupal is an open-source platform, and its development relies heavily on contributions from a diverse community of developers, designers, themers, testers, documentation writers, and more.  

Why Contribute to Drupal

The Drupal Core project provides the base functionality of Drupal, you can contribute to improving its design, code, documentation, etc

Categories: FLOSS Project Planets

PyCharm: PyCharm 2024.1 EAP Is Open!

Planet Python - Fri, 2024-01-19 04:27

This blog post marks the start of the year’s first Early Access Program. The PyCharm 2024.1 EAP 1 build is now accessible for download, providing an early glimpse into the exciting updates on the horizon.

Download PyCharm 2024.1 EAP

If you’re new to the EAP process, we encourage you to read our introductory blog post. It offers valuable insights into the program and explains why your participation is integral.

Join us in the coming weeks to explore the new features in PyCharm, test them out, and provide feedback on the new additions. Your engagement is what helps us shape the evolution of PyCharm.

User experience  Option to scale down the entire IDE

PyCharm 2023.1 introduced the ability to zoom in and out of the entire IDE, adjusting the size of all UI elements simultaneously. However, the initial scaling range was limited to between 100 and 200%. In PyCharm 2024.1 EAP 1, we have incorporated a new option allowing users to scale down the IDE to 90%, 80%, or 70%, offering an extended range of customization options. 

Django Structure tool window

This first build also brings multiple improvements to the recently introduced Django Structure tool window. Among other enhancements, there is now an action to register model admin classes.

That’s it for the first week! For the full list of changes in this EAP build, please read the release notes.

Stay tuned for more updates that will be covered in the blog every week until the major release date. We highly value your input, so be sure to provide your feedback on the new features. You can drop a comment in the comments section under this blog post or reach out to our team on X (formerly Twitter). If you come across any bugs while using this build, please report them via our issue tracker

Categories: FLOSS Project Planets

Talk Python to Me: #445: Inside Azure Data Centers with Mark Russinovich

Planet Python - Fri, 2024-01-19 03:00
When you run your code in the cloud, how much do you know about where it runs? I mean, the hardware it runs on and the data center it runs in? There are just a couple of hyper-scale cloud providers in the world. This episode is a very unique chance to get a deep look inside one of them: Microsoft Azure. Azure is comprised of over 200 physical data centers, each with 100,000s of servers. A look into how code runs on them is fascinating. Our guide for this journey will be Mark Russinovich. Mark is the CTO of Microsoft Azure and a Technical Fellow, Microsoft's senior-most technical position. He's also a bit of a programming hero of mine. Even if you don't host your code in the cloud, I think you'll enjoy this conversation. Let's dive in.<br/> <br/> <strong>Episode sponsors</strong><br/> <br/> <a href='https://talkpython.fm/posit'>Posit</a><br> <a href='https://talkpython.fm/pdm2024-v1'>Pybites PDM</a><br> <a href='https://talkpython.fm/training'>Talk Python Courses</a><br/> <br/> <strong>Links from the show</strong><br/> <br/> <div><b>Mark Russinovich</b>: <a href="https://twitter.com/markrussinovich?lang=en" target="_blank" rel="noopener">@markrussinovich</a><br/> <b>Mark Russinovich on LinkedIn</b>: <a href="https://www.linkedin.com/in/markrussinovich/" target="_blank" rel="noopener">linkedin.com</a><br/> <br/> <b>SysInternals</b>: <a href="https://learn.microsoft.com/en-us/sysinternals/" target="_blank" rel="noopener">learn.microsoft.com</a><br/> <b>Zero Day: A Jeff Aiken Novel</b>: <a href="https://www.amazon.com/Zero-Day-Jeff-Aiken-Novel/dp/1250007305/ref=pd_bxgy_img_d_sccl_1/137-8705053-7401005?pd_rd_w=ZlR5u&content-id=amzn1.sym.7746dde5-5539-43d2-b75f-28935d70f100&pf_rd_p=7746dde5-5539-43d2-b75f-28935d70f100&pf_rd_r=TX24D8NYH7N6PB3TWS0Y&pd_rd_wg=Uqqcc&pd_rd_r=df72b7fc-1541-4ff8-bf7f-0780800b5610&pd_rd_i=1250007305&psc=1" target="_blank" rel="noopener">amazon.com</a><br/> <b>Inside Azure Datacenters</b>: <a href="https://www.youtube.com/watch?v=sgIBC3yWa-M" target="_blank" rel="noopener">youtube.com</a><br/> <b>What runs chatgpt?</b>: <a href="https://www.youtube.com/watch?v=Rk3nTUfRZmo" target="_blank" rel="noopener">youtube.com</a><br/> <b>Azure Cobalt ARM chip</b>: <a href="https://www.servethehome.com/microsoft-azure-cobalt-100-128-core-arm-neoverse-n2-cpu-launched/" target="_blank" rel="noopener">servethehome.com</a><br/> <b>Closing talk by Mark at Ignite 2023</b>: <a href="https://youtu.be/c4SUhWBybXo?si=_tFb9XCn7xh7hs2O&t=124" target="_blank" rel="noopener">youtube.com</a><br/> <b>Episode transcripts</b>: <a href="https://talkpython.fm/episodes/transcript/445/inside-azure-data-centers-with-mark-russinovich" target="_blank" rel="noopener">talkpython.fm</a><br/> <br/> <b>--- Stay in touch with us ---</b><br/> <b>Subscribe to us on YouTube</b>: <a href="https://talkpython.fm/youtube" target="_blank" rel="noopener">youtube.com</a><br/> <b>Follow Talk Python on Mastodon</b>: <a href="https://fosstodon.org/web/@talkpython" target="_blank" rel="noopener"><i class="fa-brands fa-mastodon"></i>talkpython</a><br/> <b>Follow Michael on Mastodon</b>: <a href="https://fosstodon.org/web/@mkennedy" target="_blank" rel="noopener"><i class="fa-brands fa-mastodon"></i>mkennedy</a><br/></div>
Categories: FLOSS Project Planets

Wingware: Wing Python IDE Version 10 - January 19, 2024

Planet Python - Thu, 2024-01-18 20:00

Wing 10 adds AI assisted code suggestion and refactoring, support for Python 3.12 including faster debugging with the new PEP 669 low-impact monitoring API, Poetry for package management, Ruff for code warnings and reformatting, & more.

See the change log for details.

Download Wing 10 Now: Wing Pro | Wing Personal | Wing 101 | Compare Products


What's New in Wing 10

AI Assisted Development

Wing Pro 10 takes advantage of recent advances in the capabilities of generative AI to provide powerful AI assisted development, including both AI code suggestion and AI driven code refactoring. You can ask Wing to implement missing code at the current input position, or use AI to refactor or enhance existing code by describing the changes that you want to make.

Examples of refactoring requests you can make include:

"Add a docstring to this method" "Create unit tests for class Person" "Add a phone number field to the Person class" "Clean up this code" "Convert this into a Python generator" "Create an RPC server that exposes all the public methods in class CustomServer" "Change this method to wait asynchronously for data and return the result with a callback" "Rewrite this threaded code to instead run asynchronously"

Yes, really!

Your role changes to one of directing an intelligent assistant capable of completing a wide range of programming tasks in relatively short periods of time. Instead of typing out code by hand every step of the way, you are essentially directing someone else to work through the details of manageable steps in the software development process.

Read More

Support for Python 3.12

Wing 10 adds support for Python 3.12, including (1) faster debugging with PEP 669 low impact monitoring API, (2) PEP 695 parameterized classes, functions and methods, (3) PEP 695 type statements, and (4) PEP 701 style f-strings. Wing 9 added support for Python 3.11.

Poetry Package Management

Wing Pro 10 adds support for Poetry package management in the New Project dialog and the Packages tool in the Tools menu. Poetry is an easy-to-use cross-platform dependency and package manager for Python, similar to pipenv.

Ruff Code Warnings & Reformatting

Wing Pro 10 adds support for Ruff as an external code checker in the Code Warnings tool, accessed from the Tools menu. Ruff can also be used as a code reformatter in the Source > Reformatting menu group. Ruff is an incredibly fast Python code checker that can replace or supplement flake8, pylint, pep8, and mypy.


Try Wing 10 Now!

Wing 10 is a ground-breaking new release in Wingware's Python IDE product line. Find out how Wing 10 can turbocharge your Python development by trying it today.

Downloads: Wing Pro | Wing Personal | Wing 101 | Compare Products

See Upgrading for details on upgrading from Wing 9 and earlier, and Migrating from Older Versions for a list of compatibility notes.

Categories: FLOSS Project Planets

Pages