Feeds

Janusworx: I Can’t Do This Yet … Updated

Planet Python - Sat, 2021-04-17 05:03

Updated version of the post. I seem to have somehow, mangled the old one.
I’ll just blame it on the gremlins in the cloud.

Read more… (4 min remaining to read)

Categories: FLOSS Project Planets

Sok : The beginning after the end

Planet KDE - Sat, 2021-04-17 03:25

Season of KDE 2021 officially concluded on 9th of April 2021 but this is just the beginning of the long road that I have to go with kockatoo. In this post I will write a short summary and a description of what went down during the Sok time period

Background

The KDE promo team used to spend quite sometime posting to various social media platforms and more often than not the post content was same across all the platforms . This felt like a waste of time atleast to me . Hence I had been meaning to work on consolidating all these platforms into one application to handle all that and save the promo team atleast some time.

State of the Art

Currently there are not a lot of apps that are built for this specific purpose itself . There are a bunch of social media managing platforms , Below are some of the problems with them

  • They are 100 percent proprietary
  • They don't have all the platforms promo cares about , for example diaspora , mastodon , reddit etc
  • They are also not even free as in gratis
What is Kockatoo

Kockatoo is an application that lets you post to multiple social media platforms all at once. The following platforms are supported currently  -:

  • Twitter
  • Mastodon
  • Reddit

I do plan to add more platforms as we go on.

The architecture / How it all comes together ?

Kockatoo works on a client server architecture. For the people not so much into tech that means , There are two parts to the application

One of them is the server which runs 24/7 and then there is a client which sends the request to the server . The request consists of the things like -:

  • Time to schedule
  • What to post
  • Where to post  etc .

The server then processes this request and gives some feedback to the client to ensure that their post has been scheduled correctly. Now the client can be shutdown or destroyed even and the post will still happen since it has been scheduled on the server side.

The tech stack / The toolbox
  • The tech stack used is fastapi with python  for the server side
  • Currently a python based cli client is underway
Packaging status / How can I get it on my machine ?
  • Currently The server side and client side aren't available as native packages for any distro
  • I do intend to package both the server and the client for arch Linux since that is the only type of distro packaging I am personally familiar with
  • The server side does have a dockerfile which you can use to build a docker image
  • If you are familiar with windows packaging , I am  looking for a volunteer since I don't have a way to package or test it locally atleast
Things for the future
  • Support more platforms
  • Make a GUI client
  • Document the API properly
  • Do more exception handling

If you are planning to test it or have tested this and would like to get in touch , please do so at mail[at]manav.co.in or insaanimanav:matrix.org on matrix

Categories: FLOSS Project Planets

This week in KDE: Offline updates are now optional

Planet KDE - Sat, 2021-04-17 00:31

I have good news for those of you who are upset by KDE Neon moving to offline updates by default: we’ve made a GUI setting to turn it off (there was already a CLI setting). I get that the nerdy tech crowd is not super thrilled by this new more Windows 10-style update mode. But though you might find it annoying, it really does improve your system’s stability. I can point to literally hundreds of bug reports about problems caused entirely by not rebooting the computer after installing updates. However, in KDE we want you to be in control, so starting in Plasma 5.22, you’ll be able to enable or disable offline updates to suit your preference. This work was done by Aleix Pol Gonzalez:

And yeah, all these update-related options live in System Settings, not in Discover itself Other New Features

The Global Menu widget now includes a Search field that you can use to quickly locate menu items! (Jan Blackquill, Plasma 5.22)

Discover has gained the ability to update distros using rpm-ostree, such as Fedora Silverblue and Fedora Kinoite (Mariam Fahmy, Plasma 5.22)

In the Plasma Wayland session, screen-casting will now enter “Do Not Disturb” mode by default (though this can be overridden, if desired) (Kai Uwe Broulik, Plasma 5.22)

You can now set screens’ overscan values in the Plasma Wayland session (Xaver Hugl, Plasma 5.22)

Bugfixes & Performance Improvements

Hugely improved Gwenview’s speed, responsiveness, and memory usage when loading and navigating large grid views, particularly for files located on network locations (Arjen Hiemstra, Gwenview 20.08)

Entering your password in the Networks applet no longer causes the networks list to re-arrange itself while you’re typing and sometimes send your password to the wrong network! This has been a problem for quite a while, and we tried various targeted fixes that never fully worked; this time we went for the nuclear option that should finally solve it once and for all! (Jan Grulich, Plasma 5.21.5)

The new Plasma System Monitor app no longer crashes when you select a new display style for any of the sensors (Arjen Hiemstra, Plasma 5.21.5)

Sending files to Bluetooth devices from Dolphin now works again (Egor Ignatov, Plasma 5.21.5)

Discover once again displays firmware updates for eligible devices (Aleix Pol Gonzalez, Plasma 5.21.5)

It is now possible to specify a usergroup for OpenConnect VPNs (Aaron Barany, Plasma 5.21.5)

Long names in System Settings’ Users page no longer overflow (Jan Blackquill, Plasma 5.21.5)

Fixed one of the ways that KWin can crash when using a multi-GPU system (Xaver Hugl, Plasma 5.22)

In the Plasma Wayland session, KWin no longer sometimes crashes when showing Task Manager thumbnails or ending a screen recording/streaming session (Alois Wohlschlager, Plasma 5.22)

Accented and dead keys now work in the Plasma Wayland session when the virtual keyboard is available (Aleix Pol Gonzalez, Plasma 5.22 with Qt 5.15.3 plus KDE’s backported patches)

The Present Windows effect now works in the Plasma Wayland session when activated from grouped Task Manager entries (David Redondo, Plasma 5.22)

The new S.M.A.R.T. monitoring system no longer erroneously warns you that VirtualBox disks are broken when they’re not, or tracks the status for devices without S.M.A.R.T. support at all (Harald Sitter, Plasma 5.22)

When using the new Systemd startup feature, processes that crash at logout or login can no longer either block re-login, or fail to get started at login in circumstances under which they would otherwise launch normally (David Edmundson, Plasma 5.22)

System Settings no longer sometimes crashes when navigating from one QtQuick-based page to another (Jan Blackquill, Frameworks 5.82)

List Items throughout QtQuick-based KDE software no longer exhibit excessive left padding for their icons (me: Nate Graham, Frameworks 5.82)

User Interface Improvements

Digital signatures in Okular are no longer drawn with scary red text (Albert Astals Cid, Okular 21.04)

When dragging a document in Okular using the mouse, the cursor now wraps around horizontally when you reach the edge of the screen, just like it already does vertically (David Hurka, Okular 21.08)

On systems with slow PackageKit implementations (such as openSUSE-based distros), Discover now presents the initial view a bit more accurately while metadata is still being loaded (Aleix Pol Gonzalez, Plasma 5.22)

In the new Plasma System Monitor app, any page with a search field now focuses that search field by default when the page is loaded, so you can always start typing right away to search (David Redondo, Plasma 5.22)

The Bluetooth applet’s section separator now visually matches that of the Networks applet (me: Nate Graham, Plasma 5.22):

Web Presence

Pablo Marcos re-did Okular’s website to be nice and modern, with the help of Carl Schwan:

…And everything else

Keep in mind that this blog only covers the tip of the iceberg! Tons of KDE apps whose development I don’t have time to follow aren’t represented here, and I also don’t mention backend refactoring, improved test coverage, and other changes that are generally not user-facing. If you’re hungry for more, check out https://planet.kde.org/, where you can find blog posts by other KDE contributors detailing the work they’re doing.

How You Can Help

Have a look at https://community.kde.org/Get_Involved to discover 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!

Finally, consider making a tax-deductible donation to the KDE e.V. foundation.

Categories: FLOSS Project Planets

Montreal Python User Group: Montréal-Python 85 – Polite Koala

Planet Python - Sat, 2021-04-17 00:00

Join us for the April monthly meeting for the Pythonistas of Montréal on Monday the 19th at 6pm.

This month, we have for you:

  • Machine learning in robotics by Nicholas Nadeau;
  • Module of the month: random by Kouame Kofi;
  • Overview of the PyCon 2021 programme by the chairman of the talk selection committee, Philippe Gagnon.

All the details on Meetup page of the event.

Categories: FLOSS Project Planets

hussainweb.me: What I would like to see in Drupal 10

Planet Drupal - Fri, 2021-04-16 23:47
I picked up this topic from my ideas list for this #DrupalFest series of posts. I didn't think I would want to write about this because I don't think about features that way. One of the strengths of Drupal is its modular architecture and I can put in any feature I want from the contrib space.
Categories: FLOSS Project Planets

PyCharm: PyCharm 2021.1.1 RC Is Out: A Better Experience From PyCharm 2021.1

Planet Python - Fri, 2021-04-16 13:00

Thank you for your feedback on PyCharm 2021.1! We were looking carefully into it – and have managed to make some quick and important bug fixes – so that you can enjoy working with PyCharm.

DOWNLOAD PyCharm 2021.1.1 RC

Here is the list of major improvements:

  • Find in Files: works well again. IDEA-266391
  • Python Console: we disabled the auto-import feature for the Python Console. The code completion should work smoothly again in the Python Console. PY-47905
  • Jupyter Notebooks: autoscroll from and to source works in a synchronized manner for the preview and editor panes. PY-47976
  • Jupyter Notebooks: preview pane stays active and updated. PY-45112
  • PyCharm no longer scans the home directory for virtualenvs if the custom virtualenv directory was deleted. PyCharm switches back to keeping virtualenvs in the project/venv path. PY-47913

The whole list of improved functionality is available in the release notes.

Do not forget to submit your bug reports and feature requests to our tracker.

Categories: FLOSS Project Planets

SoK Final Update

Planet KDE - Fri, 2021-04-16 12:23

Hello again everyone, I wrote my last update related to Season of KDE in January, and now is the time for the final update. I am sorry I couldn’t write blogs in between. The 3 months passed by like at supersonic speed.

So I was selected to work on Calamares project under Adriaan de Groot. Most of my work revolved around the functionality of sending the installation logs to paste server online. This feature would help distro maintainers, calamares developers as well as the end users to pin point the errors that possibly may have caused installation to stop (if that happens).

First of all there was some basic (but important) code work by Bill Auger. My duty was to convert this work into a functionality, so that it is customizable and a distro maintainer can use the functionality without having to go through all the codebase. Currently a maintainer can easily setup the paste feature after tweaking a configuration file. The customizations offered are : the type of server to paste the data, the specific server (url) to paste the data and the maximum size of data to be send to that server (last one is under review).

Then some of the smaller works included hiding the next/prev buttons when calamares is actually installing and adding an option to skip the bootloader installation for EFI system.

Conclusion

All and all Season of KDE has been a wonderful experience for me. The programme taught me how to write some good, real-world code and how to collaborate with others. Calamares IRC channel was super helpful to me, people are really nice and know their stuff. A special thank to Adriaan, who used to teach me some seemingly complicated things in the easiest words. Although I never really understood why he randomly writes :momo in the channel xD.

Categories: FLOSS Project Planets

Python Pool: What is the Use of Semicolon in Python? [Explained]

Planet Python - Fri, 2021-04-16 10:33
Introduction

In Python, we have discussed many concepts. In this tutorial, we will be discussing the role of the semicolon in python. The basic meaning of semicolon(;) in all the other languages is to end or discontinue the current statement. 

In programming languages like c, c++, and java, we semicolon to terminate the line of code, and it is necessary to use. But in python, it is not compulsory to use a semicolon.

What are semicolon in python?

The semicolon in python is used to denote separation rather than termination—the use of it to write the multiple statements on the same line. If you write a semicolon, it makes it legal to put a semicolon at the end of a single statement. So. it is treated as two statements where the second statement is empty.

Role of the semicolon in python
  • In python, we don’t use semicolons, but it is not restricted.
  • Python does not use a semicolon to denote the end of the line.
  • Python is a simple and easy coding language Because there we don’t need to use a semicolon, and if we even forget to place it, it doesn’t throw an error.
  • The use of Semicolon in python is as the line terminator where it is used as a separator to separate multiple lines.
Examples to Use a Semicolon in Python

Here, we will be discussing how we can use the semicolon in python by different methods or ways:

1. Printing semicolon in python

In this example, we will normally be printing the semicolon inside the print statement. Let us look at the example for understanding the concept in detail.

#print semicolon print(";")

Output:

;

Explanation:

  • In this example, we have directly applied the print function.
  • Inside the print function, we have written a semicolon inside the Quotation mark so that semicolon gets treated as a string.
  • Hence, you can see the output as the semicolon.
2. Splitting statements with the help of semicolons

In this example, we will first print the multiple statements in multiple lines with a print statement. After that, we will print all the statements in a single line separated by the semicolons between them. And see what happens with the help of semicolons in python. Let us look at the example for understanding the concept in detail.

print("Hy") print("Python") print("Pool") print("\n") print("Hy"); print("Python"); print("Pool")

Output:

Hy Python Pool Hy Python Pool

Explanation:

  • Firstly, we have printed three statements with different print functions and in different lines.
  • After that, we have applied a new line so that we understand the output more clearly.
  • Then, we have applied all three print statements in a single line, separating them by the semicolon.
  • At last, we have seen the output.
  • Hence, you can see how you can write the print function but using a semicolon is not the correct order.
3. Using semicolons with loops

In this example, we will be using the semicolons with the for loop. Let us look at the example for understanding the concept in detail.

#using for loop for i in range (4): print ('Hi') ; print('Python Pool')

Output:

Hi Python Pool Hi Python Pool Hi Python Pool Hi Python Pool

Explanation:

  • Firstly, we have applied for loop from i=0 to i=4.
  • Then, we have put a semicolon and printed hi with the help of the print function.
  • After that, again, we have applied a semicolon and printed the python pool.
  • Hence, we have seen that we have written for loop in a single line, which worked properly.
How to print the semicolon in python

Here, we will be printing the semicolon inside the print statement with the help of some string. Let us look at the example for understanding the concept in detail.

print("Python pool is the best website ; ")

Output:

Python pool is the best website ; Is using semicolon necessary in python?

Using a semicolon is not necessary, but it is also not restricted. It is only used as the line terminator, where it is used as a separator to separate multiple lines.

Also, See Conclusion

In this tutorial. We have learned about the concept of semicolons in python. We have also seen the role of it in python. After that, we have explained different examples of semicolons. All the ways are explained in detail with the help of examples. You can use any of the functions according to your choice and your requirement in the program.

However, if you have any doubts or questions, do let me know in the comment section below. I will try to help you as soon as possible.

The post What is the Use of Semicolon in Python? [Explained] appeared first on Python Pool.

Categories: FLOSS Project Planets

Quansight Labs Blog: Spot the differences: what is new in Spyder 5?

Planet Python - Fri, 2021-04-16 10:00

In case you missed it, Spyder 5 was released at the beginning of April! This blog post is a conversation attempting to document the long and complex process of improving Spyder's UI with this release. Portions lead by Juanita Gomez are marked as Juanita, and those lead by Isabela Presedo-Floyd are marked as Isabela.

What did we do?

[Juanita] Spyder was created more than 10 years ago and it has had the contributions of a great number of developers who have written code, proposed ideas, opened issues and tested PRs in order to build a piece of Spyder on their own. We (the Spyder team) have been lucky to have such a great community of people contributing throughout the years, but this is the first time that we decided to ask for help from an UX/UI expert! Why? You might wonder. Having the contributions of this great amount of people has resulted in inconsistencies around Spyder’s interface which we didn’t stop to analyze until now.

When Isabela joined Quansight, we realized that we had an opportunity of improving Spyder’s interface with her help. We thought her skill set was everything we needed to make Spyder’s UI better. So we started by reviewing the results of a community survey from a few months ago and realized that some of the most common feedback from users is related to its interface (very crowded, not consistent, many colors). This is why we decided to start a joint project with Isabela, (who we consider now part of the Spyder team) called Spyder 5!!!

Read more… (8 min remaining to read)

Categories: FLOSS Project Planets

Joachim's blog: A better way to work on Drupal core

Planet Drupal - Fri, 2021-04-16 09:32

Often when things seem really complicated, I think it's because I must be doing it wrong.

Working on Drupal core since dependencies were removed from git has seemed really fiddly. For a long time I thought I must have missed something, that there was some undocumented technique I wasn't aware of.

But I've asked various people who work on core a lot more than I do, and they've confirmed that what I've been doing is pretty much the way that they do it:

  1. Get a git clone of Drupal core.
  2. Run composer install on it.
  3. Write code!
  4. Make a patch (well, a merge request now!)

That all sounds simple, right? But wait! If you're working on core, you're going to want Devel module for its useful debugging and inspection tools, right? And Drush, for quick cache clearing. And probably Admin Toolbar so going around the UI is quicker.

But you have to install all those with Composer. And doing that dirties the composer.lock file that's part of Drupal core's git clone.

It's fairly simple to keep changes to that file out of your merge request or patch, but pretty soon, you're going to do a git pull on core that's going to include changes to the composer.lock file, because core will have updates to dependencies.

And that's where it all starts to go wrong, because the git pull will fail because of conflicts in the composer.lock file and in other Composer files, and conflicts in that file are really painful to resolve.

So maintaining an ongoing Drupal install that uses a Drupal core git clone quickly becomes a mess. As far as I know, most core developers frequently reset the whole thing and reinstall from scratch.

The problem is caused by using the git clone of Drupal core as the Composer project, so that Drupal core's composer.json is being used as the project composer.json. But there's a better way...

Using Composer with git clones

Composer has a way of using a git clone for a package in a project:

  1. Create your own git clone of the package
  2. Declare that git clone as a Composer package repository in the project's composer.json
  3. Install the package

The result is that Composer creates a symlink from your git clone into the project, and doesn't touch the git clone. You need to be fairly lax in the version requirement you give for the package, so that Composer doesn't object to the git clone being on a feature branch later on.

This, as far as I know, is the standard way for working on a Composer package that you need to operate in the context of a project. It works for library packages and Composer plugins.

For Drupal core...? Well, it works, but as you might have guessed it's a little more complicated.

Drupal has opinions about where it expects to be located in a project, and furthermore, has a scaffolding system which writes files into the webroot when you install it. All of that gets a bit confused if you put Drupal core out of the way and symlink it in.

But with a few symlinks, and one sneaky patch to a scaffold file, it works. It's all quite fiddly and so I've made...

The Drupal Core development project

This is a Composer project template, available at https://github.com/joachim-n/drupal-core-composer. It handles all the necessary tweaks to get Drupal to work when symlinked into a project: just follow the instructions in the README.

It's not posted to Packagist, so you need to git clone it rather than use composer create-project.

There are still a few limitations: those are detailed in the README too.

Of course, I've now fallen down the rabbithole of doing more work towards making Drupal completely agnostic of its location, rather than the core issues I wanted to work on in the first place.

Please try it, report any problems, and happy coding on Drupal core!

Tags: ComposerDrupal core
Categories: FLOSS Project Planets

Web Review, Week 2021-15

Planet KDE - Fri, 2021-04-16 09:02

Let’s go for my web review for the week 2021-15. A bit smaller this week, looks like less articles picked my interest. ;-)

The Community Canvas

Tags: community, management

Looks like a very nice canvas for building and charting communities.

https://community-canvas.org/


What exactly was the point of [ “x$var” = “xval” ]? – Vidar’s Blog

Tags: tech, shell

Interesting dive into history explaining why we had the x hack in shell script. Interestingly it was still relevant all the way to 2015 at least…

https://www.vidarholen.net/contents/blog/?p=1035


Understanding Atomics and Memory Ordering - DEV Community

Tags: tech, multithreading, atomics

If you’re still struggling with atomics and memory fences (and you should) this is a good piece to read. It really goes through it all.

https://dev.to/kprotty/understanding-atomics-and-memory-ordering-2mom


SQLite the only database you will ever need in most cases

Tags: tech, sqlite, sql

Starts a bit like a (somewhat deserved) love letter to SQLite. But that also does a good job pointing out some of its caveats and when to not use it.

https://unixsheikh.com/articles/sqlite-the-only-database-you-will-ever-need-in-most-cases.html


Bye for now!

Categories: FLOSS Project Planets

Real Python: The Real Python Podcast – Episode #56: OrderedDict vs dict and Object Oriented Programming in Python vs Java

Planet Python - Fri, 2021-04-16 08:00

Are you looking for a bit of order when working with dictionaries in Python? Are you aware that the Python dict has changed over the last several versions and now keeps items in order? Could you learn more about object-oriented programming in Python by comparing it to another language? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

[ 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

Codementor: Ruby Python which one the best

Planet Python - Fri, 2021-04-16 07:08
It should be understood that when talking about Python or Ruby, none of the developers will talk about it in its purest form. Because they resort to Python or Ruby in certain situations, which are required in specific projects.
Categories: FLOSS Project Planets

Programiz: Python Program to Append to a File

Planet Python - Fri, 2021-04-16 06:17
In this example, you will learn to append to a file.
Categories: FLOSS Project Planets

Programiz: Python Program to Count the Occurrence of an Item in a List

Planet Python - Fri, 2021-04-16 05:23
In this example, you will learn to count the occurrence of an item in a list.
Categories: FLOSS Project Planets

EuroPython: EuroPython 2021: Launching the conference website

Planet Python - Fri, 2021-04-16 05:12
https://ep2021.europython.eu/

During the last few weeks the team has been hard at work making final changes to the website, and we are excited to announce the launch of the conference website for EuroPython 2021 today !

We have also migrated the accounts from last year's website to the new one, so you should be able to login right away. That said, we still recommend changing your password as best practice. If you don't have an account yet, you can easily create one to be ready for ticket sales.

Quick Summary

EuroPython 2021 will be run online from July 26 - August 1:

  • Two workshop/training days (July 26 - 27)
  • Three conference days (July 28 - 30)
  • Two sprint days (July 31 - August 1)

The sessions will be scheduled to ensure they are also accessible for those in the Asian and Americas time zones.

More updates
  • Ticket sales will start on Monday, April 19. We have refined the ticket structure for EuroPython 2021 to make it easier to understand and added a table outlining the differences between the various ticket types.
  • Financial aid will once again be available, since we've grown our team. We'd like to enable more people from lower income countries to attend. Applications can be filed starting Wednesday, April 21.
  • The Call for Papers (CFP) will be opened on Monday, April 26. If you want to prepare, you can already have a look at the CFP page on the website. The CFP will stay open for two weeks. A mentorship program for first time speakers is planned as well.
  • Sponsorship packages are already available for review. If you decide to sponsor until May 7, you can get a 10% Early Bird discount on your packages.

We will send out more detailed posts on the above items in due course. Please subscribe to our newsletter if you want to make sure to get all information.

Enjoy,
EuroPython 2021 Team
EuroPython Society

Categories: FLOSS Project Planets

Programiz: Python Program to Check If a String Is a Number (Float)

Planet Python - Fri, 2021-04-16 04:51
In this example, you will learn to check if a string is a number (float).
Categories: FLOSS Project Planets

Introducing Qt Quick 3D Particles

Planet KDE - Fri, 2021-04-16 04:27

As you may have already seen or heard, Qt Quick 3D introduces support for 3D particles in Qt 6.1. Similarly to instanced rendering , also 3D particles module is a technology preview in Qt 6.1 and will be fully supported in Qt 6.2. In this blog post we'll go through things every developer & designer should know about the new 3D particles, so please continue reading. With the visual elements such as particles, it is always beneficial to actually see what you can do with them. The video below goes through some demos from our Testbed application, included as part of the Qt 6.1 examples.

Categories: FLOSS Project Planets

hussainweb.me: Building a Digital Experience with Drupal

Planet Drupal - Thu, 2021-04-15 23:24
Drupal is a CMS. One might even say that Drupal is a good CMS and they would be right about that, in my not-so-humble opinion. At its core, Drupal is able to define content really well. Sure, it needs to do better at making the content editor's experience pleasant, apart from other things. But defining content structures that are malleable to multiple surfaces has always been Drupal's strengths. This makes Drupal an excellent choice for building a Digital Experience Platform (DXP).
Categories: FLOSS Project Planets

Lullabot: Lullabot Podcast: The Drupal Theme StarterKit

Planet Drupal - Thu, 2021-04-15 22:00

Matt and Mike have Front-end core committer Lauri Eskola on to talk about the new Drupal core theme starterkit that can be used to generate new themes. We'll talk about what's been done, and what's in store for this new Drupal core feature.

Categories: FLOSS Project Planets

Pages