FLOSS Project Planets

Codementor: How to Learn Python 3 from Scratch | A Beginners Guide

Planet Python - Wed, 2019-05-29 05:32
This article on Learn Python 3 talks about Python 3 scripting basics and fundamentals. Alongside, it provides a rich perspective for beginners to get started with Python 3.
Categories: FLOSS Project Planets

Vardot: Drupal SEO: 13 Things That Improve Ranking

Planet Drupal - Wed, 2019-05-29 04:30
Firas Ghunaim May 29, 2019

Search Engine Optimization (SEO) might not be the first thing you think of when designing a new website, but building an optimized framework from the start will help you drive traffic to your site and keep it there.

With our Drupal SEO checklist in hand, you can build an excellent website that draws customers in as soon as you launch. To give you a quick summary before we go into detail, here’s a bullet list of what to check before the launch day.

  • Check that all web pages have unique titles using the Page Title module

  • Check if your XML Sitemap and Google News Sitemap are configured properly

  • Check if the Redirect module is enabled and configured

  • Check if the Global Redirect module is enabled and configured

  • Check that .htaccess redirects to your site

  • Check that your homepage title includes a descriptive headline, logo, and primary image

  • Check if your meta tags are filled with descriptive information

  • Check that OG tags are filled correctly and with descriptive information

  • Check if your site's information displays well when shared on social

  • Check if your path alias patterns are meaningful

  • Check if Google Analytics is enabled and configured

  • Check if Site Verification is enabled and configured

  • Check if Search 404 module is enabled and configured

 

Drupal SEO: 13 Things that Will Improve Your Site's Ranking

 

1. Check that all web pages have unique titles

Titles are the first element that any user will see --whether they come directly to your site, find it on a search engine, or see it shared on social media. Not only do good page titles help customers who are already on your site, but they help with social sharing, and picking your site out of search engine results.

 

All of your pages should be easily identifiable to the end user. Not only should they have unique titles, but they should also have meaningful titles. Having multiple pages with the same titles (like “Get in touch”, “Contact us” and “Make a booking”) will simply confuse your end users and search engine crawlers.

 

From an SEO perspective, page titles are among the most important types of data you can fill, because they help search engines understand what each of your web pages is about.

 

Writing good titles is extremely important, and having keywords in your title that match a user's search greatly improves the chances of them clicking on your page. Moz suggests the following format for title tag design: Primary Keyword - Secondary Keyword | Brand Name.

You can set up unique page titles much easier if you install the Drupal Page Title module.

 

Read more: 10 Drupal Modules that Will Boost Your Website’s SEO

 

2. Check if XML Sitemap and Google News Sitemap are configured properly

The XML Sitemap module for Drupal creates a robot-friendly map of your site that Google and other search engines can crawl to categorize your website. You should configure XML Sitemap early in your site build for the best effect, but you can also alter the settings later on at admin/config/search/XML if needed.

You can view your sitemap from http://yoursite.com/sitemap.xml (just replace “yoursite.com” with your own domain).

Google News Sitemap offers a similar but different service that creates a Google-specific map for ranking under their “News” section and to appear as news items on their main SERP pages. These two modules work nicely side by side to make your site easy for search engines to crawl and index.

 

Image from Drupal.org

 

Please note that if your site contains accelerated mobile pages (AMPs), there is no need to create sitemaps for them. The rel=amphtml link is enough for Google to pick up on AMP versions, which means you can easily gain traffic from Top Stories carousels and mobile search.

 

3. Check if Redirect module is enabled and configured

Redirect is a handy module for making sure users always make it to your site. It uses case-insensitive matching to help catch broken links with redirects and tracks how often users are hitting those redirects.

You can use redirects to capture any broken links, set up promotional links, or simply capture typos users are entering when trying to access your site.

 

Image from webwash.net

 

4. Check if Global Redirect module is enabled and configured

If you’re using Drupal 8 you can skip this one because the functionality has been rolled into the Redirect module. Otherwise, install Global Redirect to work in tandem with Redirect to catch any broken links.

Global Redirect will test all links with and without a trailing slash, ensure links are case-insensitive, and if a link is truly broken, it will return a user to your home page rather than a 404 page that decreases the position of your site in SERPs.

 

Image from webwash.net

 

5. Check that .htaccess redirects to your site

Some users attempting to visit your site will navigate to www.yoursite.com, while others will simply type yoursite.com. By setting up your site to handle either request using an .htaccess redirect, you can be sure you won’t miss any visitors.

 

6. Check that the homepage title includes a descriptive headline, logo and primary image

Design a homepage title that contains a descriptive headline as well as a slogan, to represent who you are as a business. This is usually the first impression you give off to visitors the moment they land on your site or catch your entry on a search engine.

This is a good opportunity to load your website up with SEO-friendly keywords, but don’t go overboard and sacrifice your image for it - keyword stuffing may not only decrease the trust index of your site but also its conversion rates.

 

 

 

7. Ensure that your meta tags are filled with descriptive information

SEO-optimized meta tags remains to be one of the top on-page ranking factors. You can think of these as expanded page headers --short-form descriptions of your website that give users and search engines a clearer idea of what to expect out of a webpage.

Make sure to install the Metatag module on your site to have an easy, user-friendly interface for updating metadata. With the module installed you can easily populate meta data with keywords, page descriptions, and more.

The Metatag module will also give you extra control over how your site appears when shared on Twitter or Facebook.

 

Read more: SEO tips for your Drupal site

 

8. Check that OG tags are filled correctly and with descriptive information.

OG tags are meta tags specifically designed to ensure your site communicates nicely with Facebook. By setting these tags correctly you will be able to control exactly how your site appears on Facebook, including what images and what taglines are used.

 

9. Check if your site information displays well when shared on Facebook and Twitter

After configuring the Metatag module and OG tags, pop over to Facebook and make sure that your site shares the way you would like it to. It’s important to test this out now before users start sharing your site.

Similarly, try tweeting a couple of your pages to see how well your Twitter Cards come through. If you don’t want to show your site to your audience until you are sure it’s set up properly, you can check Twitter Cards using the Card Validator.

For more information on configuring Twitter cards, check out these user guides by Twitter.

 

 

10. Check if your path alias patterns are meaningful

By default, Drupal will set your URLs to node/123 - while this works great for the database backend, it doesn’t work well for your end users, or for search engines.

You can use the Pathauto module to create rules and patterns for your URLs that will significantly cut down on your maintenance times and simplify your site navigation.

 

11. Check if Google Analytics is enabled and configured

While having Google Analytics configured won’t improve your SEO, it will give you all the data you need to understand where your users are coming from and how they behave once they hit your site.

Installing the Google Analytics module makes setting up and configuring Google Analytics a breeze.

 

12. Check if Site Verification is enabled and configured

Having your site verified will make it easier for search engines crawlers to reward you with a higher rank, and for Google to allow you to access private search data. With site verification, you will receive better data and better search engine rankings for just a few minutes work.

The Site Verification module makes it easy to prove to search engines that your site is truly your own.

 

13. Check if Search 404 module is enabled and configured

The Search 404 module is a saving grace for reducing your bounce rate and SERP rankings, as well as for improving your overall user experience. Instead of your users finding an ‘Error: Page not Found” in place of the content they were hoping for, they will be offered a search of your site based on the URL string.

For example, if www.yoursite.com/great-seo-tips doesn’t exist, use this module will automatically search your site for “Great SEO tips” and show visitors the results.

 

While SEO may seem like a tricky subject to wrap your head around, the basics are easy with the right modules and guidance, and Drupal is a great content management system for building search engine optimized websites.


If you liked our SEO checklist, then check out the other educational materials that we at Vardot have designed to help you build a top quality website. If you’re looking for even more ways to improve your site’s SEO, have a look at SEO articles on our blog --or better yet, get in touch with our team!

Categories: FLOSS Project Planets

Michal Čihař: Spring cleanup

Planet Debian - Wed, 2019-05-29 04:15

What you can probably spot from past posts on my blog, my open source contributions are heavily focused on Weblate and I've phased out many other activities. The main reason being reduced amount of free time with growing family, what leads to focusing on project which I like most. It's fun to develop it and it seems like it will work business wise as well, but that's still something to be shown in the future.

Anyway it's time to admit that I will not spend much time on other things in near future.

Earlier this year, I've resigned from being phpMyAdmin project admin. I was in this role for three years and I've been contributing to the project for 18 years. It has been time, but I haven't contributed significantly in last few months. I will stay with the project for few more months to handle smooth transition, but it's time to say good bye there.

On the Debian project I want to stay active, but I've reduced my involvement and I'm looking for maintainers for some of my packages (mostly RPM related). The special case is the phpMyAdmin package where I was looking for help since 2017, but it still didn't help from the package becoming heavily outdated with security issues what lead to it's removal from Buster. It seems that this has triggered enough attention to resurrect work on the updated packages.

Today I've gone through my personal repos on GitHub and I've archived bunch of them. These have not received any attention for years (many of them were dead by the time I've imported them to GitHub) and it's good to clearly show that to random visitors.

I'm still main developer behind Gammu, but I'm not really doing there more than occasional review of pull requests and merging them. I don't want to abandon the project without handing it out to somebody else, but the problem is that there is nobody else right now.

Filed under: Debian English Gammu SUSE

Categories: FLOSS Project Planets

Learn PyQt: Building a simple Notepad clone with PyQt5

Planet Python - Wed, 2019-05-29 04:14

Notepad doesn't need much introduction. It's a plaintext editor that's been part of Windows since the beginning, and similar applications exist in every GUI desktop ever created.

Here we reimplement Notepad in Python using PyQt, a task that is made particularly easy by Qt providing a text editor widget. A few signal-hookups is all that is needed to implement a fully working app.

The Editor

The full source code for No2Pads is available in the 15 minute apps repository. You can download/clone to get a working copy, then install requirements using:

pip3 install -r requirements.txt

You can then run No2Pads with:

python3 notepad.py

Read on for a walkthrough of how the code works.

Editor

Qt provides a complete plain text editor component widget in the form of QPlainTextEdit. This widget displays an editing area in which you can type, click around and select text.

To add the widget to our window, we just create it as normal and then set it in the central widget position for the window. We don't need a layout, since we won't be adding any other widgets.

We also setup the editor to use the system fixed width font QFontDatabase.FixedFont at pointsize 12.

python from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtPrintSupport import * import os import sys class MainWindow(QMainWindow): def __init__(self, *args, **kwargs): super(MainWindow, self).__init__(*args, **kwargs) self.editor = QPlainTextEdit() # Could also use a QTextEdit and set self.editor.setAcceptRichText(False) self.setCentralWidget(self.editor) # Setup the QTextEdit editor configuration fixedfont = QFontDatabase.systemFont(QFontDatabase.FixedFont) fixedfont.setPointSize(12) self.editor.setFont(fixedfont) # self.path holds the path of the currently open file. # If none, we haven't got a file open yet (or creating new). self.path = None
Categories: FLOSS Project Planets

Quansight Labs Blog: Community-driven open source and funded development

Planet Python - Wed, 2019-05-29 01:00

Quansight Labs is an experiment for us in a way. One of our main aims is to channel more resources into community-driven PyData projects, to keep them healthy and accelerate their development. And do so in a way that projects themselves stay in charge.

This post explains one method we're starting to use for this. I'm writing it to be transparent with projects, the wider community and potential funders about what we're starting to do. As well as to explicitly solicit feedback on this method.

Community work orders

If you talk to someone about supporting an open source project, in particular a well-known one that they rely on (e.g. NumPy, Jupyter, Pandas), they're often willing to listen and help. What you quickly learn though is that they want to know in some detail what will be done with the funds provided. This is true not only for companies, but also for individuals. In addition, companies will likely want a written agreement and some form of reporting about the progress of the work. To meet this need we came up with community work orders (CWOs) - agreements that outline what work will be done on a project (implementing new features, release management, improving documentation, etc.) and outlining a reporting mechanism. What makes a CWO different from a consulting contract? Key differences are:

  1. It must be work that is done on the open source project itself (and not e.g. on a plugin for it, or a customization for the client).
  2. The developers must have a reasonable amount of freedom to decide what to work on and what the technical approach will be, within the broad scope of the agreement.
  3. Deliverables cannot be guaranteed to end up in a project; instead the funder gets the promise of a best effort of implementation and working with the community.
Respecting community processes

Point 3 above is particularly important: we must respect how open source projects make decisions. If the project maintainers decide that they don't want to include a particular change or new feature, that's their decision to make. Any code change proposed as part of work on a CWO has to go through the same review process as any other change, and be accepted on its merits. The argument "but someone paid for this" isn't particularly strong, nor is one that reviewers should have to care about. Now of course we don't expect it to be common for work to be rejected. An important part of the Quansight value proposition is that because we understand how open source works and many of our developers are maintainers and contributors of the open source projects already, we propose work that the community already has interest in and we open the discussion about any major code change early to avoid issues.

Read more… (6 min remaining to read)

Categories: FLOSS Project Planets

Russ Allbery: Review: Nimona

Planet Debian - Wed, 2019-05-29 00:28

Review: Nimona, by Noelle Stevenson

Publisher: HarperTeen Copyright: 2015 ISBN: 0-06-227822-3 Format: Graphic novel Pages: 266

Ballister Blackheart is a supervillain, the most notorious supervillain in the kingdom. He used to be a knight, in training at the Institute alongside his friend Goldenloin. But then he defeated Goldenloin in a joust and Goldenloin blew his arm off with a hidden weapon. Now, he plots against the Institute and their hero Sir Goldenloin, although he still follows certain rules.

Nimona, on the other hand, is not convinced by rules. She shows up unexpectedly at Ballister's lair, declaring herself to be his sidekick, winning him over to the idea when she shows that she's also a shapeshifter. And Ballister certainly can't argue with her effectiveness, but her unconstrained enthusiasm for nefarious schemes is rather disconcerting. Ballister, Goldenloin, and the Institute have spent years in a careful dance with unspoken rules that preserved a status quo. Nimona doesn't care about the status quo at all.

Nimona is the collected form of a web comic published between 2012 and 2014. It has the growth curve of a lot of web comics: the first few chapters are lightweight and tend more towards gags, the art starts off fairly rough, and there is more humor than plot. But by chapter four, Stevenson is focusing primarily on the fascinating relationship between Ballister and Nimona, and there are signs that Nimona's gleeful enthusiasm for villainy is hiding something more painful. Meanwhile, the Institute, Goldenloin's employer, quickly takes a turn for the sinister. They're less an organization of superheroes than a shadow government with some dubious goals, and Ballister starts looking less like a supervillain and more like a political revolutionary.

Nimona has some ideas about revolution, most of them rather violent.

At the start of this collection, I wasn't sure how much I'd like it. It's mildly amusing in a gag sort of way while playing with cliches and muddling together fantasy, science fiction, faux-medieval politics, sinister organizations, and superheros. But the story deepens as it continues. Ballister starts off caring about Nimona because he's a fundamentally decent person, but she becomes a much-needed friend. Nimona's villain-worship, to coin a phrase, turns into something more nuanced. And while that's happening, the Institute becomes increasingly sinister, and increasingly dangerous. By the second half of the collection, despite the somewhat excessive number of fight scenes, it was very hard to put down.

Sadly, I didn't think that Stevenson landed the ending. It's not egregiously bad, and the last page partly salvages it, but it wasn't the emotionally satisfying catharsis that I was looking for. The story got surprisingly dark, and I wanted a bit more of a burst of optimism and happiness at the end.

I thought the art was good but not great. The art gets more detailed and more nuanced as the story deepens, but Stevenson stays with a flat, stylized appearance to her characters. The emotional weight comes mostly from the dialogue and from Nimona's expressive transformations rather than the thin and simple faces. But there's a lot of energy in the art, a lot of drama when appropriate, and some great transitions from human scale to the scale of powerful monsters.

That said, I do have one major complaint: the lettering. It's hand-lettered (so far as I can tell) in a way that adds a distinctive style, but the lettering is also small, wavers a bit, and is sometimes quite hard to read. Standard comic lettering is, among other things, highly readable in small sizes; Stevenson's more individual lettering is not, and I occasionally struggled with it.

Overall, this isn't in my top tier of graphic novels, but it was an enjoyable afternoon's reading that hooked me thoroughly and that I was never tempted to put down. I think it's a relatively fast read, since there are a lot of fight scenes and not a lot of detail that invites lingering over the page. I wish the lettering were more uniform and I wasn't entirely happy with the ending, but if slowly-developing unexpected friendship, high drama, and an irrepressible shapeshifter who is more in need of a friend than she appears sounds like something you'd like, give this a try.

Rating: 7 out of 10

Categories: FLOSS Project Planets

Krita 4.2.0 is Out!

Planet KDE - Tue, 2019-05-28 21:00

Today we’re releasing Krita 4.2.0. This is a big release, with over a thousand bugs fixed and exciting new functionality like support for HDR displays.

Compared to the last beta, there have been over 30 bug fixes. New in Krita 4.2.0 is updated support for drawing tablets, support for HDR monitors on Windows, an improved color palette docker, scripting API for animation, color gamut masking, improved selection handling, much nicer handling of the interaction between opacity and flow and much, much, much more.

Dive into the release notes for a full overview!

And there’s also the lovely new splash image by Tyson Tan!

Join the Community and Help Your Fellow Artists

With millions of downloads every year, and that number is growing rapidly, Krita is clearly very popular. That’s great! But we’re running into the limits what we can do to help people with questions and problems, and we need you all to help out, by helping your fellow Krita artists on Reddit, Ask, the Forum and all the other places!

Download Windows

Note for Windows users: if you encounter crashes, please follow these instructions to use the debug symbols so we can figure out where Krita crashes.

Linux

(If, for some reason, Firefox thinks it needs to load this as text: to download, right-click on the link.)

OSX

Note: the gmic-qt is not available on OSX.

Source code md5sum

For all downloads:

Key

Currently, .sig files aren’t available for this release because the maintainer is travelling. We will prepare those next week.

Support Krita

Krita is a free and open source project. Please consider supporting the project with donations or by buying training videos or the artbook! With your support, we can keep the core team working on Krita full-time.

Categories: FLOSS Project Planets

Python Engineering at Microsoft: Python in Visual Studio Code – May 2019 Release

Planet Python - Tue, 2019-05-28 17:57

We are pleased to announce that the May 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.

In this release we made improvements that are listed in our changelog, closing a total of 42 issues including IntelliSense in the Python Interactive Window and additional improvements to the Python Language Server.

IntelliSense in the Python Interactive Window

The Python Interactive window, our built-in IPython Console, is now enhanced with full-fledged IntelliSense – code completion, member lists, quick info for methods, and parameter hints! Now, you can be just as productive typing in the Python Interactive window as you would in the code editor.

Additional improvements to the Python Language Server

This release includes bug fixes and enhancements to the “Find All References “ and ”Go to Definition” features, such as handling of relative imports. We also made continued improvements to the Python Language Server’s loading time, CPU and memory usage. We’re working hard on decreasing memory consumption, so if you run into problems, please provide more details on the Python Language Server GitHub page or directly on the “high memory usage” issue page.

As a reminder, to opt into the Language Server, change the python.jediEnabled setting to false in File > Preferences > User Settings. We are working towards making the language server the default in the next few releases.

In case you missed it: Remote Development

On May 2nd the Microsoft’s Python and Visual Studio Code teams announced the Remote Development extensions for Visual Studio Code, which allows developers to run, setup and develop their projects inside docker containers, remote SSH hosts and Windows Subsystem for Linux (WSL). It’s all running remotely: auto-completions, debugging, terminal, source control, additional extensions you install and more, but you get the same experience as if it was running locally.

Check out the Remote Python Development in Visual Studio Code blog post to learn more and get started!

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:

  • Allow column sorting in variable explorer (#5281)
  • Use the correct activation script for conda environments (#4402)
  • Always show pytest’s output when it fails. (#5313)
  • Fix performance issues with long collections and variable explorer (#5511)
  • Update ptvsd to 4.2.10.

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – May 2019 Release appeared first on Python.

Categories: FLOSS Project Planets

Pages