FLOSS Project Planets

Matthew Wright: Indexing time series data in pandas

Planet Python - Sun, 2021-06-13 20:35

Indexing time series data in pandas is similar to other types, but there are a number of convenient functions unique to time series.

The post Indexing time series data in pandas appeared first on wrighters.io.

Categories: FLOSS Project Planets

First week of Google Summer of Code 2021

Planet KDE - Sun, 2021-06-13 19:02

A year ago I’d just finished my History degree and I had no idea how to code. This year, I’m taking part in Google Summer of Code! I’m super happy to get the chance to learn more about how KDE software works, and to finally contribute to a project I’ve been using for years.

Over the summer, I’ll be working with KDE developers to create productivity-focused components for Plasma Mobile that work with Akonadi, KDE’s personal information management framework. Akonadi is a super useful piece of kit: it allows developers to tap into a user’s synchronised e-mails, contacts, calendars, providing a seamless experience in productivity tools. I’ll be working on this project with my mentor Carl Schwan, who also helped me during my time doing Season of KDE, and Devin Lin.

The state of affairs

Plasma Mobile is quickly shaping up to be a viable alternative to the Android/iOS duopoly, but it’s not quite there yet. KDE developers are hard at work, nailing the basics. KDE’s Plasma provides an incredibly solid foundation, though unfortunately many of the powerful desktop applications that the KDE community are not suitable for use on mobile devices.

This is mainly due to the fact they are built with a GUI framework called KXMLGui, which allows developers to create intricate and capable user interfaces for applications ranging from video editors to word processors to web browsers. Unfortunately, it’s not just made to be convergent — i.e., adaptable to different display sizes and interaction types (touch vs mouse and keyboard).

KDE’s projects are underpinned by Qt, an immensely powerful toolkit for C++ that lets you create UIs. Thanks to efforts by the Qt team, QML (a UI markup language) and Qt Quick (QML’s standard library) provide a new way of designing UIs that are built to adapt well to different device form factors. The big brained developers at KDE then developed Kirigami, a Qt Quick framework that makes it easy for a developer to bang out a pretty and convergent application usable on the desktop and on your phone (yes, this includes Android and iOS!).

However, Kirigami is still young, and the amount of applications that use it is still growing. Currently, there are a lack of productivity applications that take advantage of Akonadi.

Psst. Thinking of building a Kirigami app? Read the tutorials I wrote on KDE Develop.


Fortunately, people at KDE have already got the ball rolling. My mentor Carl Schwan started work on Kalendar, a Kirigami application that lets you display the events present in your Akonadi-synchronised calendars. However, Kalendar remains a proof-of-concept… for now.

My work for GSoC will focus on turning Kalendar into a fully-usable application that will let you view, add, and edit events in all the ways that a normal calendar application would, on both your PC and your phone. This involves figuring out how event ingestion and modification works in Akonadi, how Akonadi stores and retrieves data, and a lot of UI usability testing. By the end of the summer, we should be a lot closer to having a powerful calendar you can use with your fingertips on Plasma Mobile.

First week’s work: EventEditor merge request

In this first week, some progress has been made!

Kalendar now has an event editor sheet. While still a work-in-progress, once done, it should let you add and edit events, and let you provide dates, descriptions, reminders, attendees, and more.

Here are a bunch of screenshots of the sheet. So far, the combo boxes for the date and time fields are using custom date and time picker widgets. An upstream date picker widget should be coming in a Kirigami Add-ons package soon, and it will replace the current iteration.

This sheet is very much still a work-in-progress, from both a design and functionality perspective. So far, you can add an event through the sheet, and it will be correctly ingested into Akonadi… if you select a valid calendar (the drop-down in the event editor doesn’t make it clear which calendars are editable, yet!). You can provide an event’s name, description, start/end dates and times. The attendee, reminder, and repeat options are currently non-functional, but you can bet I’m figuring those out.

Get in touch

Feel free to reach out to me if you have any feedback, or if you just want to chat – I’m @clau-cambra:kde.org on Matrix.

See you next week!

Categories: FLOSS Project Planets

Vincent Fourmond: Solution for QSoas quiz #2: averaging several Y values for the same X value

Planet Debian - Sun, 2021-06-13 17:14
This post describes two similar solutions to the Quiz #2, using the data files found there. The two solutions described here rely on split-on-values. The first solution is the one that came naturally to me, and is by far the most general and extensible, but the second one is shorter, and doesn't require external script files.
Solution #1 The key to both solution is to separate the original data into a series of datasets that only contain data at a fixed value of x (which corresponds here to a fixed pH), and then process each dataset one by one to extract the average and standard deviation. This first step is done thus: QSoas> load kcat-vs-ph.dat QSoas> split-on-values pH x /flags=data After these commands, the stacks contains a series of datasets bearing the data flag, that each contain a single column of data, as can be seen from the beginnings of a show-stack command: QSoas> k Normal stack: F C Rows Segs Name #0 (*) 1 43 1 'kcat-vs-ph_subset_22.dat' #1 (*) 1 44 1 'kcat-vs-ph_subset_21.dat' #2 (*) 1 43 1 'kcat-vs-ph_subset_20.dat' ... Each of these datasets have a meta-data named pH whose value is the original x value from kcat-vs-ph.dat. Now, the idea is to run a stats command on the resulting datasets, extracting the average value of x and its standard deviation, together with the value of the meta pH. The most natural and general way to do this is to use run-for-datasets, using the following script file (named process-one.cmds): stats /meta=pH /output=true /stats=x_average,x_stddev So the command looks like: QSoas> run-for-datasets process-one.cmds flagged:data This command produces an output file containing, for each flagged dataset, a line containing x_average, x_stddev, and pH. Then, it is just a matter of loading the output file and shuffling the columns in the right order to get the data in the form asked. Overall, this looks like this: l kcat-vs-ph.dat split-on-values pH x /flags=data output result.dat /overwrite=true run-for-datasets process-one.cmds flagged:data l result.dat apply-formula tmp=y2;y2=y;y=x;x=tmp dataset-options /yerrors=y2 The slight improvement over what is described above is the use of the output command to write the output to a dedicated file (here result.dat), instead of out.dat and ensuring it is overwritten, so that no data remains from previous runs.

Solution #2 The second solution is almost the same as the first one, with two improvements:
  • the stats command can work with datasets other than the current one, by supplying them to the /buffers= option, so that it is not necessary to use run-for-datasets;
  • the use of the output file can by replaced by the use of the accumulator.
This yields the following, smaller, solution: l kcat-vs-ph.dat split-on-values pH x /flags=data stats /meta=pH /accumulate=* /stats=x_average,x_stddev /buffers=flagged:data pop apply-formula tmp=y2;y2=y;y=x;x=tmp dataset-options /yerrors=y2

About QSoas QSoas is a powerful open source data analysis program that focuses on flexibility and powerful fitting capacities. It is released under the GNU General Public License. It is described in Fourmond, Anal. Chem., 2016, 88 (10), pp 5050–5052. Current version is 3.0. You can download its source code there (or clone from the GitHub repository) and compile it yourself, or buy precompiled versions for MacOS and Windows there.
Categories: FLOSS Project Planets

"Morphex's Blogologue": A python script to calculate placement of poles for a roof

Planet Python - Sun, 2021-06-13 13:33
I've been working on the cabin, lately clearing out a tree behind the cabin that was a threat to the roof.

Some blog posts about some of the work on the cabin here: http://blogologue.com/search?category=1591541232X85

Anyway, I need to setup some new poles for the porch / balcony, as there is a lot of rot in the parts below the roof, and those parts support the roof. So I can't just rip it out.

I wrote a script some time ago, and was going to use that today as I took finer measurements of the new beam that will carry the roof and how long an extended beam will have to be. As I was reading the script I couldn't make sense of it, so I re-wrote it, and posted a new one today:


The old one is also in the same repository as holesforpoles.py, but you'll have to dig through the version history for that one.

I think it shows that in construction work, you have to cut once, measure twice, calculate thrice and maybe re-write the code quadrice. I wrote a holesforpoles2.py program today as well, but that was also discarded, more as a tool in the thinking process I guess.
Categories: FLOSS Project Planets

KDE Framework 5.84 - Expandable Tooltips

Planet KDE - Sun, 2021-06-13 13:26

Starting with the KDE Frameworks 5.84 release, KXMLGUI based applications will feature expandable tooltips per default.

The matching merge request by Felix Ernst got merged today after 3 months ;=)

What are expandable tooltips at all?

Good question ;=)

In short: for stuff like menu & toolbar actions, it provides an easy way to access the “What’s This?” help.

Unlike before, where you need to manually trigger that via the “Shift-F1” shortcut and click around to try out which GUI elements provide at all this additional help, you will now first get a small tooltip with the normal tooltip content (if any) and a hint that with “Shift” you are able to get more help displayed.

For more details read the merge request.

A video is better than words ;=)

Felix provided a short video in the merge request to demonstrate the basic usage (based on the first implementation, some minor details got fine-tuned later).

Your browser does not support the video tag :P Why is that great?

With this feature the “What’s This?” help is a lot easier to discover. It actually makes now more sense then ever to provide it for more complex actions in your applications, people will really be able to find it.

And even nicer, as this is now done in KXMLGUI, all applications using this KDE Framework will automatically provide the new feature, like e.g. Kate ;=)


A matching thread for this can be found here on r/KDE.

Categories: FLOSS Project Planets

Sergiu Nagailic (Nikro) Blog: Drupal Redirects in Gatsby.JS

Planet Drupal - Sun, 2021-06-13 09:38

If you’re running Drupal + Gatsby.JS website, you’ll inevitably change the URLs of some of these articles (i.e. by changing the title) → and this will change the slug (URL) →and this will cause 404s (i.e. break all Social Media posts, etc). There’s a way to fix it.

The Reason

This depends on the case, in my case (and many other examples I’ve seen) - the slugs are generated by using Drupal's path aliases. And Drupal’s paths depend (usually) on the node’s title.

This has unforeseen consequences, once you change the title, the path is changed too and on the next build, Gatsby will stop recognizing the old paths, resulting in 404s. This happened to me - when I wanted to rename the initial article as “Part 1” (because I’ve written a “Part 2” later), all my social-media posts were broken and Goo...

Read the Full Article
Categories: FLOSS Project Planets

Yet Another Week In Tok

Planet KDE - Sat, 2021-06-12 14:15

Bon venon! Herzlich willkommen! o kama pona! Tok now has an improved welcoming sequence with improved visuals and user experience.

If you want to see this for yourself, you can now log out using the new log out menu option.


Once you're back in Tok, why not try out the new resizable chat list?

Or the toggleable sidebar?

Photo and Video Sidebar

Tok now lets you view photos and videos that have been sent in a chat in the sidebar.


You might realise with the help of the sidebar that there's something inappropriate in your chat.

Now, Tok will allow you to properly delete others' messages if you have the correct permissions.

You can also now choose to only delete messages for yourself in groups/chats where this is applicable.


There's a good chance you may want to scold someone for sending an inappropriate photo in your chat. Tok now provides autocompletion for mentions, making it faster to type out someone's username.


Tok now supports displaying GIFs in chat.


Tok has seen a lot of optimisations. Memory usage should now hover around or below the 100MB range idle, depending on how many photos, videos, GIFs, etc. are on your screen.


A lot of Tok's crashes have been fixed, especially ones pertaining to images.

Removed unneeded drums.

Obtaining Tok

Tok can be built from source from https://invent.kde.org/network/tok.

The support/development room is at https://t.me/kdetok.


Interested in contributing? Come on by the dev chat and say hello.

Tags: #libre

Categories: FLOSS Project Planets

Norbert Preining: Future of Cinnamon in Debian

Planet Debian - Sat, 2021-06-12 09:19

OK, this is not an easy post. I have been maintaining Cinnamon in Debian for quite some time, since around the times version 4 came out. The soon (hahaha) to be released Bullseye will carry the last release of the 4-track, but version 5 is already waiting, After Bullseye, the future of Cinnamon in Debian currently looks bleak.

Since my switch to KDE/Plasma, I haven’t used Cinnamon in months. Only occasionally I tested new releases, but never gave them a real-world test. Having left Gnome3 for it’s complete lack of usability for pro-users, I escaped to Cinnamon and found a good home there for quite some time – using modern technology but keeping user interface changes conservative. For long time I haven’t even contemplated using KDE, having been burned during the bad days of KDE3/4 when bloat-as-bloat-can-be was the best description.

What revelation it was that KDE/Plasma was more lightweight, faster, responsive, integrated, customizable, all in all simple great. Since my switch to KDE/Plasma I think not for a second I have missed anything from the Gnome3 or Cinnamon world.

And that means, I will most probably NOT packaging Cinnamon 5, nor do any real packaging work of Cinnamon for Debian in the future. Of course, I will try to keep maintenance of the current set of packages for Bullseye, but for the next release, I think it is time that someone new steps in. Cinnamon packaging taught me a lot on how to deal with multiple related packages, which is of great use in the KDE packaging world.

If someone steps forward, I will surely be around for support and help, but as long as nobody takes the banner, it will mean the end of Cinnamon in Debian.

Please contact me if you are interested!

Categories: FLOSS Project Planets

Kentaro Hayashi: fabre.debian.net has moved to Debian.net Team Infrastructure

Planet Debian - Sat, 2021-06-12 08:00

Today, fabre.debian.net has moved to Debian.net Team Infrastructure

So far, fabre.debian.net was sponsored by FOSSHOST which provides us a VPS instance since Jan, 2021. It was located at OSU Open Source Lab. It worked pretty well, Thanks FOSSHOST sponsorship since ever!

Now, fabre.debian.net uses the VPS instance which is provided by Debian.net Team Infrastructure. (still non-DSA managed) It is hosted at HETZNER Cloud.

About fabre.debian.net

fabre.debian.net is a experimental service to demonstrate how to improve user experience with finding and fixing Debian unstable related bugs for making "unstable life" comfortable.

Thank Debian.net Team for sponsoring,

Categories: FLOSS Project Planets

AI Pool: What to do when you have small dataset

Planet Python - Sat, 2021-06-12 07:53
I'm trying to train a classifier with a neural network, but I've got too small datasets. Each class has about ~1k examples. What is the best approach?...
Categories: FLOSS Project Planets

AI Pool: Why network overfits too early?

Planet Python - Sat, 2021-06-12 07:52
I want to train a neural network model, which basically does binary classification. I can't understand why my network overfits too early. I thought my network is too big and it memorizes the dataset, but when I make it smaller, it does not learn at all. How avoid this situation? Dropout didn't work, augmentation techniques helped a bit, obviously, regularizations didn't change anything. Can you guys explain the reasons, and how I can avoid it?...
Categories: FLOSS Project Planets

AI Pool: Multiple cuda versions installed in machine

Planet Python - Sat, 2021-06-12 07:52
I'm using TensorFlow and I have some old projects which are written with TensorFlow 1.4 and older. Some of them don't work with a new version of Cuda . Can I have multiple Cuda with different versions at the same time?...
Categories: FLOSS Project Planets

AI Pool: Cuda Version

Planet Python - Sat, 2021-06-12 07:48
How to know the version of Cuda installed on your pc? I'm using Keras with TensorFlow back-end, but I need to detect the version of Cuda in my code. It does not matter the solution is with Keras or TensorFlow....
Categories: FLOSS Project Planets

AI Pool: Dynamic learning rate in training

Planet Python - Sat, 2021-06-12 07:47
I'm using Keras 2.1.* and want to change the learning rate during training. I know about the scheduled callback, but I don't use the fit function and I don't have callbacks. I use train_on_batch. Is it possible in Keras?...
Categories: FLOSS Project Planets

Doug Hellmann: sphinxcontrib-datatemplates 0.8.1

Planet Python - Sat, 2021-06-12 05:34

This release adds a load() function to the template context for loading additional data sources from within a template.

Categories: FLOSS Project Planets

Lucas Cimon: fpdf2.4.0 and converting GIFs to PDFs

Planet Python - Sat, 2021-06-12 04:45

fpdf2 is a minimalist PDF creation library for Python that I am maintaining.

With the release yesterday of its v2.4.0, I'm going to present some of its notable new features since the latest minor version.

https://github.com/pyfpdf/fpdf2/ Doc: https://pyfpdf.github.io/fpdf2/

JPEG images …


Categories: FLOSS Project Planets

Junichi Uekawa: Wrote a quick hack to open chroot in emacs tramp.

Planet Debian - Sat, 2021-06-12 04:32
Wrote a quick hack to open chroot in emacs tramp. I wrote a mode for cros_sdk and it was relatively simple. I figured that chroot must be easier. I could write one in about 30 minutes. I need to mount proc and home inside the chroot to make it useful, but here goes. chroot-tramp.el

Categories: FLOSS Project Planets

Talk Python to Me: #320: Python in the Electrical Energy Sector

Planet Python - Sat, 2021-06-12 04:00
In this episode, we cover how Python is being used to understand the electrical markets and grid in Australia. Our guest, Jack Simpson, has used Python to uncover a bunch of interesting developments as the country has adopted more and more solar energy. We round out the episode looking at some best practices for high-performance, large-data processing in Pandas and beyond. <br/> <br/> In addition to that, we also spend some time on how Jack used Python and Open CV (computer vision) to automate the study of massive bee colonies and behaviors. Spoiler alert: That involved gluing Wing Ding fonts to the backs of bees!<br/> <br/> <strong>Links from the show</strong><br/> <br/> <div><b>Jack Simpson</b>: <a href="https://jacksimpson.co" target="_blank" rel="noopener">jacksimpson.co</a><br/> <b>Bees, lasers, and machine learning</b>: <a href="https://jacksimpson.co/bees-lasers-and-machine-learning/" target="_blank" rel="noopener">jacksimpson.co</a><br/> <b>South Australian Gas Generator Interventions</b>: <a href="https://jacksimpson.co/south-australian-gas-generator-interventions/" target="_blank" rel="noopener">jacksimpson.co</a><br/> <b>PySAM System Advisor Model</b>: <a href="https://sam.nrel.gov/software-development-kit-sdk/pysam.html" target="_blank" rel="noopener">sam.nrel.gov</a><br/> <b>Visualizing the impact of Melbourne’s COVID-19 lockdown on Solar Panel Installations</b>: <a href="https://jacksimpson.co/visualising-the-impact-of-melbournes-covid-19-lockdown-on-solar-panel-installations/" target="_blank" rel="noopener">jacksimpson.co</a><br/> <br/> <b>Stack Overflow Python graph</b>: <a href="https://insights.stackoverflow.com/trends?tags=java%2Cpython%2Cc%23%2Cvb.net%2Cjavascript%2Cruby%2Cswift" target="_blank" rel="noopener">insights.stackoverflow.com</a><br/></div><br/> <strong>Sponsors</strong><br/> <br/> <a href='https://talkpython.fm/square'>Square</a><br> <a href='https://talkpython.fm/linode'>Linode</a><br> <a href='https://talkpython.fm/assemblyai'>AssemblyAI</a><br> <a href='https://talkpython.fm/training'>Talk Python Training</a>
Categories: FLOSS Project Planets

KDE Akademy 2021

Planet KDE - Sat, 2021-06-12 03:45

In just six days, on Friday next week, KDE Akademy will start, bringing us eight days packed with presentations, workshops, meetings, BoFs and hanging out with friends.


I have two talks in the main program. The first one will be about the indoor map display component we built for KDE Itinerary, showing how this works as well as looking at what we can build on top of it.

The second talk is about the work on KDE’s Android release pipeline which I have written about here recently, looking at how this integrates with Craft and Binary Factory, as well as how this plays into KDE’s All About The Apps goal.


The bulk of Akademy aren’t talks but a large number of BoFs, workshops and meetings. I’m particularly looking forward to the following topics:

  • KF6: During the last KF6 Sprint we decided to review and revisit the KF6 timeline and branching strategy at Akademy.

  • Application releases and the deployment pipeline: That’s a sub-aspect of the All About The Apps goal, and ties in with my recent work on that for Android releases.

  • Energy efficient software: This includes analyzing, optimizing and continuously monitoring the energy consumption of applications, as well as things like the “Blauer Engel” eco certification.

And judging from past Akademys there will be a whole lot more interesting stuff that I don’t even have on the radar yet :)

Other Topics

Besides the scheduled sessions there’s of course also the hallway track. I’m hoping to gather some feedback for the ongoing work on API for looking up and localizing countries, country subdivisions and timezones there.

Usually I would also use that opportunity to chase people for travel document samples for KDE Itinerary’s data extractor, but that will unfortunately have to wait another year again.

See you at Akademy!

The best part of Akademy however is meeting old and new friends, even if just virtual. I’ll be around the entire time and hope to see many of you there!

If you haven’t done so, it’s not too late to sign up.

Categories: FLOSS Project Planets