FLOSS Project Planets

Doug Hellmann: smtplib — Simple Mail Transfer Protocol Client — PyMOTW 3

Planet Python - Mon, 2017-08-28 08:00
smtplib includes the class SMTP , which can be used to communicate with mail servers to send mail. Read more… This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.
Categories: FLOSS Project Planets

Mike Driscoll: PyDev of the Week: Shannon Turner

Planet Python - Mon, 2017-08-28 07:30

This week we welcome Shannon Turner as our PyDev of the Week! Shannon is the founder of Hear Me Code, a free, beginner-friendly coding class for women in the Washington DC area. She has several interesting projects over on Github that you might find worthy of checking out. Let’s take some time to get to know Shannon better!

Can you tell us a little about yourself (hobbies, education, etc):

I have my grandma to thank for my career path — she loved playing video games. As a kid, I would watch her play, and sketch out the game on paper and show her. I’d say “Wouldn’t this be cool if it were part of the game?” and she loved that – but told me that I had to get very good at computers if I wanted to make that happen!

Why did you start using Python?

I was teaching myself how to code after six years of not doing any coding at all, and I had forgotten pretty much everything. It was frustrating trying to learn it all again, and I wanted a language that would be easy for beginners. I found it so much more intuitive to pick up than a lot of other languages I had done in the past, and from then I was hooked!

What other programming languages do you know and which is your favorite?

Python is my favorite, though I’m also fluent in HTML, CSS, Javascript. I’ve dabbled in PHP, Java, Perl, C++, and Visual Basic, but I don’t use them much.

What projects are you working on now?

Lately I’ve been learning how to do virtual reality with Unity, which has been a fun long-term project.

Which Python libraries are your favorite (core or 3rd party)?

I use Django for all of my websites, including Watch This Instead, a website that tells you if a movie has passed the Bechdel test, and Let’s Go, a list of 6000 museums across the US that you can search by location and category.

What inspired you to create “Hear Me Code”?

I was tired of going to tech events and being one of the only women in the room, and tired of being talked down to and not taken seriously. I felt like I didn’t belong. So did a lot of other women I talked to, and I thought since I was self-taught, I could teach others as well, and create my own group where women could learn and grow together. So I started teaching classes with four women around my kitchen table and never thought it would grow like this.

Can you describe the impact that “Hear Me Code” has had in the DC area?

Since starting Hear Me Code almost four years ago, it’s grown to 3000 women in the DC area. For many women, this is their first introduction to coding. Hear Me Code focuses on leadership development and turning students into teachers, and over 100 women have become teachers and teaching assistants. Dozens of women have credited Hear Me Code with providing them the skills and experience that they needed to land a better-paying job in tech.

Are there plans to expand the project beyond DC?

I’m keeping it local! Organizing a group like Hear Me Code takes an enormous amount of my time and energy, and it’s an all-volunteer effort that’s on top of my regular day job.

Is there anything else you’d like to say?

One project I had a lot of fun with was creating Budgie Cam — I have a Raspberry Pi and camera attached to my pet parakeet’s cage, and whenever I send a text message to a special phone number, it takes a photo and sends me a picture of my bird. It’s instant gratification, and helps me not feel as homesick when I travel.

Categories: FLOSS Project Planets

We’re hiring! C++, Qt, VTK, …

Planet KDE - Mon, 2017-08-28 03:15

Hi all, and long (!) time no blog.

My work at Orexplore is keeping me a busy bee. In fact, I’m now in search of a co-worker :)

We’re looking for a talented software developer to join us at our office in Stockholm. Our primary product is a revolutionary new drill core analysis machine for the mining industry. You’ll be working with me and the rest of the team in building cross-platform visualization and data exploration applications using C++, Qt and VTK. The team is a happy mix of software developers, physicists and mechanical engineers.

If like me, you find cross-discipline cooperation exciting, and value the freedom to innovate and pick your own tools, you’ll find the work very rewarding.

Experience in building 2D/3D visualization tools, especially using Qt and VTK, is highly meritable, as is experience in the FOSS communities. If you also have some Python skills (PyQt/QML, numpy/scipy, Django, …) and a keen interest in usability and user experience, then you’re our perfect candidate.

Sounds interesting? Just send me an email at first name dot last name at orexplore dot com.

The position is on-site and some proficiency in Swedish is a must.

Categories: FLOSS Project Planets

Import Python: Import Python 140 - Publish your Python packages, Python for research course, sys.getrefcount ...

Planet Python - Mon, 2017-08-28 02:13
Worthy Read
Publish your Python packages easily using flit Flit is a simple way to Package and deploy Python projects on PyPI, Flit makes it easier by using a simple flit.ini file and assumes common defaults to save your time and typing. I knew about Flit when I was taking a look at Mariatta Wijaya game called Tic Tac Taco Pizza and noticed that she used flit to deploy the game, so we also asked her the reason for using this on the podcast we recorded so I decided to try porting my projects to Flit.
pypi
Using Python for Research - edX Course ( Harvard University ) This course bridges the gap between introductory and advanced courses in Python. While there are many excellent introductory Python courses available, most typically do not go deep enough for you to apply your Python skills to research projects. In this course, after first reviewing the basics of Python 3, we learn about tools commonly used in research settings.
course, mooc
Fun with Python's sys.getrefcount() Python has a function called sys.getrefcount() that tells you the reference count of an object.
core-python
HelloSign eSign API Embed docs directly on your website with a few lines of code.
sponsor
Predicting the Winning Team with Machine Learning Can we predict the outcome of a football game given a dataset of past games? That's the question that we'll answer in this episode by using the scikit-learn machine learning library as our predictive tool.
machine learning
Patterns for Continuous Integration with Docker on Travis CI Part 2 of 3: The “Docker repo” pattern. Note - Very informative and detailed article for those looking to bring CI + docker into their workflow.
docker, CI
Analyzing Cryptocurrency Markets Using Python How do Bitcoin markets behave? What are the causes of the sudden spikes and dips in cryptocurrency values? Are the markets for different altcoins inseparably linked or largely independent? How can we predict what will happen next?
cryptocurrency
Analytical Dashboard with Python Flask, Pandas and MongoDB Analyzing your sensor data has always been a daunting task and putting your data in the Dashboard has never been an easy task. In this article, we will see how using Python Flask, Pandas and MongoDB you can develop an Analytical Dashboard over a weekend.
mongodb, pandas, flask
Error monitoring, alerting, analytics. Root cause to resolution in 30 secs.
sponsor
mimesis Mimesis is a fast and easy to use library for Python, which helps generate mock data for a variety of purposes (see "Data providers") in a variety of languages (see "Locales"). This data can be particularly useful during software development and testing. The library was written with the use of tools from the standard Python library, and therefore, it does not have any side dependencies.
testing, mocking
Greenlets, threads, and processes parallel processing
Listing of Python implementations core-python
USER-USER Collaborative filtering Recommender System we will start building a system that uses the profile of the given user and provide recommendation completely based on that user’s preference and liking.
recommendation engine
Gaussian Naive Bayes - numpy Bayes Theorem describes the probability of an event, based on prior knowledge of conditions be related of conditions to the event. So it basically fits perfectly for machine learning, because that is exactly what machine learning does: making predictions for the future based on prior experience.
machine learning
Python Matplotlib Style - 2.0 Matplotlib is a great and very capable plotting library for Python.
matpoltlib
How-To Use Python to Remove or Modify Empty Values in a CSV Dataset Data sets are not perfect. Sometimes they end up with invalid, corrupt, or missing values. For the project I was working on, I could not have any values that are null or empty. This How-To will walk you through writing a simple Python script to see if your data set has null or empty values, and if so, it will propose two options for how to modify your data.
code snippets, csv
How to make an art website load at lightning speed using Cloudinary and Python cloudinary
A `pip` hack to upgrade all your Python packages pip
Using PySpark Dataframe as in Python – Zhiqiang Zhong – Medium I will share you about how using Dataframe of PySpark as Dataframe of Python.
pyspark, dataframes
How To Step Through The CPython Interpreter I will outline the process I typically follow to dig deeper into aspects of the python programming language I am curious about.
cpython
Python: Guidelines & Code Style This document is intended to Storepilots employees, but worth the read.
coding standards
Tips and tricks on http(s) session recording http
pep 551 This PEP describes additions to the Python API and specific behaviors for the CPython implementation that make actions taken by the Python runtime visible to security and auditing tools. The goals in order of increasing importance are to prevent malicious use of Python, to detect and report on malicious use, and most importantly to detect attempts to bypass detection. Most of the responsibility for implementation is required from users, who must customize and build Python for their own environment.
PEP
What is self healing software? humor
Linking Python to C with CFFI c
Let’s Synchronize Threads in Python
Nuitka - Python Complier Nuitka is a Python compiler. It's fully compatible with Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and 3.6. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
compiler
Python cryptography cheatsheet cryptocurrency
pyheatmagic IPython magic command to profile and view your python code as a heat map using py-heat.
ipython

Projects
raven - 133 Stars, 20 Fork raven is a Linkedin information gathering tool that can be used by pentesters to gather information about an organization employees using Linkedin.
unformat - 113 Stars, 6 Fork generates .clang-format file from example codebase
Pytorch_fine_tuning_Tutorial - 47 Stars, 6 Fork A short tutorial on performing fine tuning or transfer learning in PyTorch.
coinbin.org - 44 Stars, 3 Fork A Human–Friendly API Service for Crypto Currency Information.
Tiny-URL-Fuzzer - 35 Stars, 1 Fork A tiny and cute URL fuzzer.
argo - 16 Stars, 13 Fork Get stuff done with container-native workflows for Kubernetes.
awesome-apistar - 10 Stars, 0 Fork A curated list of awesome packages, articles, and other cool resources from the API Star community.
htmldate - 2 Stars, 0 Fork extract the date of HTML documents.
pg-materialize - 2 Stars, 0 Fork Postgres Materialized View Dependency Manager.
phone-scraper - 0 Stars, 0 Fork Python library for finding phone numbers in random user input text.
Categories: FLOSS Project Planets

Norbert Preining: Gaming: The Long Dark – Wintermute Episode 1

Planet Debian - Mon, 2017-08-28 00:50

One month ago the Story Mode for The Long Dark has been released. Finally I managed to finish the first of the two chapters, and it was worth the wait.

I have played many ours in the Sandbox mode, but while the first days in story mode are like hand-holding kids, on the fifth day you are kicked into a brutal void with lots, and I mean *lots* of wolves being more than eager to devour you.

Targeting new players the four days one just practice basic techniques, fire making, water, food, first aid, collecting materials. Finally one is allowed to leave the crash site of the plane and climbs out into a mountainous area searching for shelter and at the end for Milton, a deserted village. But the moment one reaches a street, wolves are appearing again and again, and the only way is often to run from car to car and hide there, hoping not to freeze to death. Took me several tries to make it to the church and then into town to meet the Grey Mother.

The rest of epsiode one is dedicated to various tasks set by the Grey Mother, and some additional (optional) side quests. And while the first encounter with the wolves was pretty grim, in the later parts I had the feeling that they became a bit more easy to take. This might be related to one of the many patches (8 till now) that were shipped out in this month.

After having finished all the quests, including the side quests (and found the very useful distress pistol), I made my way out of Milton, probably not to be seen again?! And while all the quests were finished, I had the feeling I could spend a bit more time and explore the surroundings, maybe something is still hiding out there. But shouldering the climbing rope and climbing out of Milton leads to a very beautiful last stretch, a canyon lined with waterfalls leading to a cave and to the next episode.

Now I only need more time to play Episode 2.

Categories: FLOSS Project Planets

Continuum Analytics Blog: Continuum Analytics Officially Becomes Anaconda

Planet Python - Sun, 2017-08-27 21:35
Today, Continuum Analytics changed its name to Anaconda. Not surprised? We agree. The name change reinforces our commitment to the Anaconda open source development community, the 4.5 million Anaconda users across the globe and customers of our Anaconda Enterprise Platform. The name Anaconda points to our long-term commitment to supporting the Anaconda open source ecosystem …
Read more →
Categories: FLOSS Project Planets

John Goerzen: The Joy of Exploring: Old Phone Systems, Pizza, and Discovery

Planet Debian - Sun, 2017-08-27 20:54

This story involves boys pretending to be pizza deliverymen using a working automated Strowger telephone exchange demonstrator on display in a museum, which is very old and is, to my knowledge, the only such working exhibit in the world. (Yes, I have video.) But first, a thought on exploration.

There are those that would say that there is nothing left to explore anymore – that the whole earth is mapped, photographed by satellites, and, well, known.

I prefer to look at it a different way: the earth is full of places that billions of people will never see, and probably don’t even know about. Those places may be quiet country creeks, peaceful neighborhoods one block away from major tourist attractions, an MTA museum in Brooklyn, a state park in Arkansas, or a beautiful church in Germany.

Martha is not yet two months old, and last week she and I spent a surprisingly long amount of time just gazing at tree branches — she was mesmerized, and why not, because to her, everything is new.

As I was exploring in Portland two weeks ago, I happened to pick up a nearly-forgotten book by a nearly-forgotten person, Beryl Markham, a woman who was a pilot in Africa about 80 years ago. The passage that I happened to randomly flip to in the bookstore, which really grabbed my attention, was this:

The available aviation maps of Africa in use at that time all bore the cartographer’s scale mark, ‘1/2,000,000’ — one over two million. An inch on the map was about thitry-two miles in the air, as compared to the flying maps of Europe on which one inch represented no more than four air miles.

Moreover, it seemed that the printers of the African maps had a slightly malicious habit of including, in large letters, the names of towns, junctions, and villages which, while most of them did exist in fact, as a group of thatched huts may exist or a water hold, they were usually so inconsequential as completely to escape discovery from the cockpit.

Beyond this, it was even more disconcerting to examine your charts before a proposed flight only to find that in many cases the bulk of the terrain over which you had to fly was bluntly marked: ‘UNSURVEYED’.

It was as if the mapmakers had said, “We are aware that between this spot and that one, there are several hundred thousands of acres, but until you make a forced landing there, we won’t know whether it is mud, desert, or jungle — and the chances are we won’t know then!”

— Beryl Markham, West With the Night

My aviation maps today have no such markings. The continent is covered with radio beacons, the world with GPS, the maps with precise elevations of the ground and everything from skyscrapers to antenna towers.

And yet, despite all we know, the world is still a breathtaking adventure.

Yesterday, the boys and I were going to fly to Abilene, KS, to see a museum (Seelye Mansion). Circumstances were such that we neither flew, nor saw that museum. But we still went to Abilene, and wound up at the Museum of Independent Telephony, a wondrous place for anyone interested in the history of technology. As it is one of those off-the-beaten-path sorts of places, the boys got 2.5 hours to use the hands-on exhibits of real old phones, switchboards, and also the schoolhouse out back. They decided — why not? — to use this historic equipment to pretend to order pizzas.

Jacob and Oliver proceeded to invent all sorts of things to use the phones for: ordering pizza, calling the cops to chase the pizza delivery guys, etc. They were so interested that by 2PM we still hadn’t had lunch and they claimed “we’re not hungry” despite the fact that we were going to get pizza for lunch. And I certainly enjoyed the exhibits on the evolution of telephones, switching (from manual plugboards to automated switchboards), and such.

This place was known – it even has a website, I had been there before, and in fact so had the boys (my parents took them there a couple of years ago). But yesterday, we discovered the Strowger switch had been repaired since the last visit, and that it, in fact, is great for conversations about pizza.

Whether it’s seeing an eclipse, discovering a fascination with tree branches, or historic telephones, a spirit of curiosity and exploration lets a person find fun adventures almost anywhere.

Categories: FLOSS Project Planets

GSoC - Final Period

Planet KDE - Sun, 2017-08-27 19:20

Hi everyone, how is it going? Fine, I hope.

Today, I will talk about my work in the Krita during the month 2-3 of the coding period. Yeah, it's over :(.

Overview

I implemented some scripts to the showcase and some new plugins as well. You can find my task here and see more details about my progress during GSoC. In a nutshell, I implemented the follow scripts/plugins:

  • Simple scripts defined previously in the task
  • Plugin to export all the layers (batch)
  • Document Tools Plugin
  • Fix and Improve Ten Brushes Plugin
  • Last Documents Thumbnails Docker
  • Implement Ten Scripts Plugin
Simple Scripts Export, Duplicate Image and Export Layers

Export and Duplicate Scripts

First, I had to write scripts to automatize some simple tasks like export and duplicate image. They are simple, but very common when manipulating documents in the Krita. You can see the implementation below and a simple use case on main function after.

Functions to export and duplicate image.

Simple use case to export and duplicate scripts.

Script to export all layers

One of the scripts suggested from the community was the "Export All Layers". That script was suggested from some users of the GIMP and with the current API, We could provide that implementation. You can see the recursive export function below, but you can find the complete implementation on the Phabricator task.

Recursive function that exports all sub-layers with a predefined configuration. Plugin to export all the layers (batch)

GUI Mockup

The GUI Mockup was the screenshot of the GIMP's plugin. The main idea here was to make a GUI with the main options available on GIMP with the currently available API. This image that follows is the gimp plugin.

GUI implementation with PyQt

You can see below the final result of my work. That's a more simple GUI with just some option that can be extended in the future, though.

Testing

Below, you can see the result of the export to the selected directory. You can compare with the previously selected configuration.

Document Tools Plugin

GUI Mockup

The main idea here was to have a QTabWidget that you can easily extend adding new tools like tabs. It's similar to the Scripter plugin that's showed below.

GUI implementation with PyQt

You can see below the final result of my work. That's a simple GUI with extensible code to future implementations. We have Canvas Size, Scale and Rotate option at the moment.

Testing

Below, you can see the result of the rotate applied to one document, but you can apply to multiple documents as well.

Before After Fix and Improve Ten Brushes Plugin

Concept

The Ten Brushes Plugin is a GUI where you can assign brushes to shortcuts. That plugin wasn't implemented by me, but there were some bugs and the code needed refactoring.

What was implemented?

  • Write and Read Settings methods
  • Clean up tenbrushes.py
  • Iterate using enumerate
  • Initialize method to setup GUI components
  • Idiomatic imports
  • Keep actions alive
  • Fix bug when adding new brushes after write settings
  • loadActions method
  • Accept method from dialog is calling writeSettings now

Testing

Below, you can see a gif to understand how the plugin works.

Last Documents Thumbnails Docker

Concept

The Last Documents Thumbnails Docker is a simple Docker that shows the recent documents thumbnails. Until the moment, the Docker is read-only, then you can just visualize the thumbnails, but I'm intending to implement new features in the future.

GUI implementation with PyQt

You can see below the final result of my work. It's QWidget with a horizontal scrollbar where the QImages are rendered and we have a QPushButton to refresh the current list of recently opened documents.

Implement Ten Scripts Plugin

Concept

The Ten Scripts Plugin is pretty similar to Ten Brushes Plugin, but instead of brushes, you assign scripts to be executed. You point the action to a module python and that module will be executed when the shortcut is pressed. The triggered action will find a main function to be executed if there are that function declared. The assigned scripts keeping working even when the application is restarted using saved settings.

GUI implementation with PyQt

You can see below the final result of my work. It's a QGridLayout with ten rows and three columns. QLabel (it shows the shortcut), QLineEdit (read-only to show assigned path of the script) and QPushButton (when pressed, it opens QFileDialog to select the python script).

Testing

Below, you can see a gif to understand how the plugin works.

Experience and next goals

It was an amazing experience and I'm really happy to have the opportunity to make part of the Krita community and help the users to have a better experience. I learned a lot along of this months, not just about code, but about goals, priorities, and people. KDE and Krita remind me every day, why I keep coding and why I'm doing what I'm doing.

I'm intending to keep contributing to Krita with new plugins/scripts, extending Python API and writing documentation to a better experience to users and devs.

Thank you

Categories: FLOSS Project Planets

Carl Chenet: The Importance of Choosing the Correct Mastodon Instance

Planet Python - Sun, 2017-08-27 17:00

Remember, Mastodon is a new decentralized social network, based on a free software which is rapidly gaining users (already there is more than 1.5 million accounts). As I’ve created my account in June, I was a fast addict and I’ve already created several tools for this network, Feed2toot, Remindr and Boost (mostly written in Python).

Now, with all this experience I have to stress out the importance of choosing the correct Mastodon instance.

Some technical reminders on how Mastodon works

First, let’s quickly clarify something about the decentralized part. In Mastodon, decentralization is made through a federation of dedicated servers, called “instances”, each one with a complete independent administration. Your user account is created on one specific instance. You have two choices:

  • Create your own instance. Which requires advanced technical knowledge.
  • Create your user account on a public instance. Which is the easiest and fastest way to start using Mastodon.

You can move your user account from one instance to another, but you have to follow a special procedure which can be quite long, considering your own interest for technical manipulation and the total amount of your followers you’ll have to warn about your change. As such, you’ll have to create another account on a new instance and import three lists: the one with your followers, the one with the accounts you have blocked, and the one with the account you have muted.

From this working process, several technical and human factors will interest us.

A good technical administration for instance

As a social network, Mastodon is truly decentralized, with more than 1.5 million users on more than 2350 existing instances. As such, the most common usage is to create an account on an open instance. To create its own instance is way too difficult for the average user. Yet, using an open instance creates a strong dependence on the technical administrator of the chosen instance.

The technical administrator will have to deal with several obligations to ensure its service continuity, with high-quality hardware and regular back-ups. All of these have a price, either in money and in time.

Regarding the time factor, it would be better to choose an administration team over an individual, as life events can change quite fast everyone’s interests. As such, Framasoft, a French association dedicated to promoting the Free software use, offers its own Mastodon instance named: Framapiaf. The creator of the mastodon project, also offers a quite solid instance, Mastodon.social (see below).

Regarding the money factor, many instance administrators with a large number of users are currently asking for donation via Patreon, as hosting an instance server or renting one cost money.

Mastodon.social, the first instance of the Mastodon network

The Ideological Trend Of Your Instance

If anybody could have guessed the previous technical points since the recent registration explosion on the Mastodon social network, the following point took almost everyone by surprise. Little by little, different instances show their “culture”, their protest action, and their propaganda on this social network.

As the instance administrator has all the powers over its instance, he or she can block the instance of interacting with some other instances, or ban its instance’s users from any interaction with other instances’ users.

With everyone having in mind the main advantages to have federalized instance from, this partial independence of some instances from the federation was a huge surprise. One of the most recent example was when the Unixcorn.xyz instance administrator banned its users from reading Aeris’ account, which was on its own instance. It was a cataclysm with several consequences, which I’ve named the #AerisGate as it shows the different views on moderation and on its reception by various Mastodon users.

If you don’t manage your own instance, when you’ll have to choose the one where to create your account, make sure that the content you plan to toot is within the rules and compatible with the ideology of said instance’s administrator. Yes, I know, it may seem surprising but, as stated above, by entering a public instance you become dependent on someone else’s infrastructure, who may have an ideological way to conceive its Mastodon hosting service. As such, if you’re a nazi, for example, don’t open your Mastodon account on a far-left LGBT instance. Your account wouldn’t stay open for long.

The moderation rules are described in the “about/more” page of the instance, and may contain ideological elements.

To ease the process for newcomers, it is now possible to use a great tool to select what instance should be the best to host your account.

 

Remember that, as stated above, Mastodon is decentralized, and as such there is no central authority which can be reached in case you have a conflict with your instance’ administrator. And nobody can force said administrator to follow its own rules, or not to change them on the fly.

Think Twice Before Creating Your Account

If you want to create an account on an instance you don’t control, you need to check two elements: the availability of the instance hosting service in the long run, often linked to the administrator or the administration group of said instance, and the ideological orientation of your instance. With these two elements checked, you’ll be able to let your Mastodon account growth peacefully, without fearing an outage of your instance, or simple your account blocked one morning because it doesn’t align with your instance’s ideological line.

in Conclusion

To help me get involved in free software and writing articles for this blog, please consider a donation through my Liberapay page, even if it’s only a few cents per week. My contact Bitcoin and Monero are also available on this page.

Follow me on Mastodon

Categories: FLOSS Project Planets

Carl Chenet: The Importance of Choosing the Correct Mastodon Instance

Planet Debian - Sun, 2017-08-27 17:00

Remember, Mastodon is a new decentralized social network, based on a free software which is rapidly gaining users (already there is more than 1.5 million accounts). As I’ve created my account in June, I was a fast addict and I’ve already created several tools for this network, Feed2toot, Remindr and Boost (mostly written in Python).

Now, with all this experience I have to stress out the importance of choosing the correct Mastodon instance.

Some technical reminders on how Mastodon works

First, let’s quickly clarify something about the decentralized part. In Mastodon, decentralization is made through a federation of dedicated servers, called “instances”, each one with a complete independent administration. Your user account is created on one specific instance. You have two choices:

  • Create your own instance. Which requires advanced technical knowledge.
  • Create your user account on a public instance. Which is the easiest and fastest way to start using Mastodon.

You can move your user account from one instance to another, but you have to follow a special procedure which can be quite long, considering your own interest for technical manipulation and the total amount of your followers you’ll have to warn about your change. As such, you’ll have to create another account on a new instance and import three lists: the one with your followers, the one with the accounts you have blocked, and the one with the account you have muted.

From this working process, several technical and human factors will interest us.

A good technical administration for instance

As a social network, Mastodon is truly decentralized, with more than 1.5 million users on more than 2350 existing instances. As such, the most common usage is to create an account on an open instance. To create its own instance is way too difficult for the average user. Yet, using an open instance creates a strong dependence on the technical administrator of the chosen instance.

The technical administrator will have to deal with several obligations to ensure its service continuity, with high-quality hardware and regular back-ups. All of these have a price, either in money and in time.

Regarding the time factor, it would be better to choose an administration team over an individual, as life events can change quite fast everyone’s interests. As such, Framasoft, a French association dedicated to promoting the Free software use, offers its own Mastodon instance named: Framapiaf. The creator of the mastodon project, also offers a quite solid instance, Mastodon.social (see below).

Regarding the money factor, many instance administrators with a large number of users are currently asking for donation via Patreon, as hosting an instance server or renting one cost money.

Mastodon.social, the first instance of the Mastodon network

The Ideological Trend Of Your Instance

If anybody could have guessed the previous technical points since the recent registration explosion on the Mastodon social network, the following point took almost everyone by surprise. Little by little, different instances show their “culture”, their protest action, and their propaganda on this social network.

As the instance administrator has all the powers over its instance, he or she can block the instance of interacting with some other instances, or ban its instance’s users from any interaction with other instances’ users.

With everyone having in mind the main advantages to have federalized instance from, this partial independence of some instances from the federation was a huge surprise. One of the most recent example was when the Unixcorn.xyz instance administrator banned its users from reading Aeris’ account, which was on its own instance. It was a cataclysm with several consequences, which I’ve named the #AerisGate as it shows the different views on moderation and on its reception by various Mastodon users.

If you don’t manage your own instance, when you’ll have to choose the one where to create your account, make sure that the content you plan to toot is within the rules and compatible with the ideology of said instance’s administrator. Yes, I know, it may seem surprising but, as stated above, by entering a public instance you become dependent on someone else’s infrastructure, who may have an ideological way to conceive its Mastodon hosting service. As such, if you’re a nazi, for example, don’t open your Mastodon account on a far-left LGBT instance. Your account wouldn’t stay open for long.

The moderation rules are described in the “about/more” page of the instance, and may contain ideological elements.

To ease the process for newcomers, it is now possible to use a great tool to select what instance should be the best to host your account.

 

Remember that, as stated above, Mastodon is decentralized, and as such there is no central authority which can be reached in case you have a conflict with your instance’ administrator. And nobody can force said administrator to follow its own rules, or not to change them on the fly.

Think Twice Before Creating Your Account

If you want to create an account on an instance you don’t control, you need to check two elements: the availability of the instance hosting service in the long run, often linked to the administrator or the administration group of said instance, and the ideological orientation of your instance. With these two elements checked, you’ll be able to let your Mastodon account growth peacefully, without fearing an outage of your instance, or simple your account blocked one morning because it doesn’t align with your instance’s ideological line.

in Conclusion

To help me get involved in free software and writing articles for this blog, please consider a donation through my Liberapay page, even if it’s only a few cents per week. My contact Bitcoin and Monero are also available on this page.

Follow me on Mastodon

Translated from French to English by Stéphanie Chaptal.

Categories: FLOSS Project Planets

GSoC Final report - Part 1: Okular

Planet KDE - Sun, 2017-08-27 17:00

This is the first post of a 3-part series where I will go into technical details of my summer of code project. I will give a high-level overview about the current state of my written code, show you what’s supposed to work and how you can try that; and what still needs to be done.

Then I will write about some “Gotcha!” moments I have experienced in the past few months and what I could learn from them. Those aren’t in any way ordered and are there to explain why my project turned out like it did - and hopefully even help some future GSoC students along the way.

Enough with the introduction, let’s get into the details…

Current status

Nearly finished!

The review request is up on phabricator and currently in the 4th revision.

By and large there are no more showstoppers present and the code is in mergeable quality. Although there are still a few smaller issues present, I think those could be fixed independently in a later revision.

You are encouraged to test my patch, I’m happy about every feedback I can get!

What’s left to do?

Not much. There are still some rendering bugs in obscure places (e.g. when drawing on the screen while in presentation mode).

I also stumbled upon other bugs (more on that later), but those were out of scope.

Difficulties & Lessons learned Tracking pixmaps

I’ve described in the examples how enabling HiDPI support basically works. So at first, I thought it was a good idea to track down any place where a pixmap is created, increase its size and set its device pixel ratio to QPaintDevice::devicePixelRatio().

This had several shortcomings: First, I had to track down where every single pixmap of the application got created. Secondly, I had to introduce getters and setters or extend existing method signatures, so I knew the DPR value of the current screen in every class a pixmap is generated. This was not only cumbersome, but also broke the ABI (application binary interface) - one mustn’t extend functions of the library with another parameter.

Therefore I had to look for another approach: Instead at setting the DPR directly after creating, I noticed it was sufficient to do so just before painting the pixmap, because its value is only used for the layout size. I also filled the pixmap cache with images enlarged by the factor QApplication::devicePixelRatio() - this means that the window can be freely moved between screens with differing scaling factors while the cache stays valid and the documents are correctly rendered. Also, the code was much more concise: The only changes needed were in the PixmapRequest, where the larger images were automatically requested; and in the rendering code - pageview.cpp, pagepainter.cpp, pageviewannotator.cpp and presentationwidget.cpp.

Scaling icons

Okular includes some app-specific icons, which weren’t yet HiDPI-ready.

So I tried to fix it by generating higher resolution PNGs from the SVG source, and install them via cmake, similar to that:

ecm_install_icons(ICONS 32-actions-tool-base-okular.png 64-actions-tool-base-okular.png [...] )

Afterwards I should be able to just load the correct version of the icon via QIcon::fromTheme(QStringLiteral("tool-base-okular")), right?

Yes, that works… for simple, square icons. Which the annotation icons weren’t.

So David showed me another nifty trick: If there is a tool-base-okular@2x.png file next to tool-base-okular.png, Qt recognizes this and will automatically load the HiDPI version with the right scaling factor set when requesting this icon.

But when dealing with QPixmaps - instead of icons -, one must directly load this version:

// Load HiDPI variant on HiDPI screen QString imageVariant; if ( qApp->devicePixelRatio() > 1.05 ) { imageVariant = "@2x"; pixmap.load( QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString("okular/pics/tool-base-okular" + imageVariant + ".png") ) ); Complexity

As already mentioned in my previous post the rendering code is really complex and, in my opinion, difficult to understand in the beginning.

Besides the many different codepaths - depending on the availability of a tile manager, the need for for back buffering or the cases where images are not yet ready - some of the code is also already showing symptom of old age.

It was written for Qt 3.3, and then ported over to newer versions. Nowadays some functions could be much simpler and cleaner. Whenever possible, I tried to modernize the code, but a complete overhaul was out of scope. Thankfully, I was not the only one trying to solve this technical debt though.

Chasing ghosts

A few weeks ago, I was at a state where I could open PDF documents, zoom into them and the rendering worked. I tried to open a PNG images, and that behaved also as it should have. I was pleased with myself.

But for testing, I wanted to make sure every filetype worked. And they all did reasonably well - until I got to multipage TIFF documents.

Those were completely broken, shown in a wrong aspect ratio and generally bahaving quite strange. I was puzzled, because everything else up to that point had worked so well.

I quickly checked the Okular release included in my distribution, noticed that the image got rendered there correctly and then tried to find the bug in my code. If I had been a bit more careful at this step, I could have saved myself several hours of scratching my head and wondering what the hell I got wrong there.

Because, as I noticed after those frustrating hours, my distribution rendered the image using the general “Image Backend”, not the specialized one for TIFFs. As I’ve already checked before the “Image Backend” was working fine, but the TIFF generator had an already known bug - it looks like this hasn’t worked since 2006.

Fractional scaling

As already mentioned, getting fractional scaling correct is not easy. I had to fix many off-by-one and rounding errors and until the rendering finally looked good.

Development setup

For development, I set up a new user account and built the workspace, frameworks and applications with kdesrc-build. But this also had one downside: I once spent many hours narrowing down a crash of the application for seemingly random reasons when calling QAction::setEnabled. Turns out there was a bug in the master branch of KXmlGui.

A good tip for future students is to get acquaint with gdb soon, at least I had to use it heavily.

My setup also included two screens, which also meant a great deal of configuration hassle.

Side trip to the Qt source code

Sometimes, I also had to look directly into the source of the Qt Framework to better understand some things. Luckily, I had compiled it myself, and therefore this was easy.

On one such instance I had to check that the copy constructor of QPixmaps doesn’t perform a deep copy of the whole pixmap data after changing some data. The setDevicePixelRatio method does call detach() when changing the value, but luckily the underlying QPlatformPixmap stays the same.

Testing

I set up a test plan to check that i didn’t break things along the way.

In hindsight, this was a clever thing to do at the start, because it also allowed me to see my progress - which functionality already worked and what still needed to be changed.

You made it to the end of the post, here is a cake for you! :cake: If you’re still reading, the future of Okular has to matter for you. Therefore I would be happy if you could try out my patch and give me a quick feedback how it works for you.

Categories: FLOSS Project Planets

Jonathan McDowell: On my way home from OMGWTFBBQ

Planet Debian - Sun, 2017-08-27 13:42

I started writing this while sitting in Stansted on my way home from the annual UK Debian BBQ. I’m finally home now, after a great weekend catching up with folk. It’s a good social event for a bunch of Debian folk, and I’m very grateful that Steve and Jo continue to make it happen. These days there are also a number of generous companies chipping in towards the cost of food and drink, so thanks also to Codethink and QvarnLabs AB for the food, Collabora and Mythic Beasts for the beer and Chris for the coffee. And Rob for chasing us all for contributions to cover the rest.

I was trying to remember when the first one of these I attended was; trawling through mail logs there was a Cambridge meetup that ended up at Steve’s old place in April 2001, and we’ve consistently had the summer BBQ since 2004, but I’m not clear on what happened in between. Nonetheless it’s become a fixture in the calendar for those of us in the UK (and a number of people from further afield who regularly turn up). We’ve become a bit more sedate, but it’s good to always see a few new faces, drink some good beer (yay Milton), eat a lot and have some good conversations. This year also managed to get me a SheevaPlug so I could investigate #837989 - a bug with OpenOCD not being able to talk to the device. Turned out to be a channel configuration error in the move to new style FTDI support, so I’ve got that fixed locally and pushed the one line fix upstream as well.

Categories: FLOSS Project Planets

Bryan Pendleton: An end-August round-up of this and that

Planet Apache - Sun, 2017-08-27 12:23

  • Roy sells ThoughtWorksThoughtWorks, my employer, had some big news to share today. Our founder and owner, Roy Singham, has decided to sell ThoughtWorks to Apax Funds - a private equity firm based in London. Apax wishes the current management team to continue running and growing ThoughtWorks, using the same model that's driven our growth and success for the last twenty-odd years.
  • Someone who puts that kind of money down to buy a company is going to want to have a say in how it's run.The second rule of buyouts is that everything will change in the second fiscal year. They won't tell you NOT to do something, they just won't give you any budget for it.

    The first rule of buyouts is that the promises always come from someone who isn't in a position to back them up (like the old owner, or your boss's boss, who only have a single seat on the board between them).

  • Oakland grapples with Uber’s threat to sell massive HQ instead of moving inAfter spending two years bracing for Uber’s arrival, residents reacted with both worry and relief Friday after the ride-hailing giant said it may instead sell the building that was supposed to be its Oakland headquarters.

    Following Uber’s announcement that it is reevaluating plans for the Uptown Station building at 1955 Broadway, Oakland residents are left wondering what will become of the massive, vacant building in the heart of the city’s revitalizing Uptown neighborhood. The space, formerly occupied by Sears, has generated excitement and controversy ever since Uber announced its intention to move in two years ago.

  • The best photos and videos of the 2017 solar eclipse
  • The story behind viral, iconic Smith Rock total solar eclipse photoTed Hesser, a 31-year-old freelance photographer from the Bay Area, scouted locations at Smith Rock State Park in Central Oregon with his girlfriend, Martina Tibell, for a week. The two rock climbing enthusiasts spent days trying different climbing routes alongside other adventure photographers who all descended on the park looking for the perfect angle during totality.
  • Limiting Memory to Avoid the OomWhile killing processes is never good, it is better than having the system halt due to memory exhaustion. Sometimes the oom kills Postgres, and that isn't a good thing either. This email thread explains how to use ulimit to cause Postgres sessions that consume a lot of memory to fail due to excessive memory requests. This avoids having them continue and be killed by the oom killer, which causes the entire database server to restart. The Postgres documentation also explains the behavior of the oom killer.
  • How Hardware Drives The Shape Of Databases To ComeWith so many new compute, storage, and networking technologies entering the field and so many different database and data store technologies available today, we thought it would be a good idea to touch base with Stonebraker to see what effect these might have on future databases.
  • Kurtz-FestStuart Kurtz turned 60 last October and his former students John Rogers and Stephen Fenner organized a celebration in his honor earlier this week at Fenner's institution, the University of South Carolina in Columbia.

    Stuart has been part of the CS department at the University of Chicago since before they had a CS department

  • The Enduring Legacy of ZorkIn 1977, four recent MIT graduates who’d met at MIT’s Laboratory for Computer Science used the lab’s PDP-10 mainframe to develop a computer game that captivated the world. Called Zork, which was a nonsense word then popular on campus, their creation would become one of the most influential computer games in the medium’s half-century-long history.
  • The new 'Uncharted' is the best $40 you can spend on gaming in 2017"Uncharted: The Lost Legacy" sounds an awful lot like every previous "Uncharted" game. What that description doesn't tell you is how sharply executed and delightfully concise "The Lost Legacy" is.
  • Trashcan Sinatras 2017 acoustic tourOver the course of the tour, Frank, John and Paul will play each of the just over 100 songs that the band has written and recorded to date. Prepare for deep album cuts and obscure b-sides (many of which have never been played in concert)

And, we close with a question: who really should get credit for:

Never check for an error condition you don't know how to handle. Was it: (a) Henry Spencer, (b) Steinbach, (c) Daniel Keys Moran, or (d) unknown?
Categories: FLOSS Project Planets

Evgeni Golov: starting the correct Chromium profile when opening links from IRC

Planet Debian - Sun, 2017-08-27 11:18

I am using Chromium/Chrome as my main browser and I also use its profile/people feature to separate my work profile (bookmarks, cookies, etc) from my private one.

However, Chromium always opens links in the last window (and by that profile) that was in foreground last. And that is pretty much not what I want. Especially if I open a link from IRC and it might lead to some shady rick-roll page.

Thankfully, getting the list of available Chromium profiles is pretty easy and so is displaying a few buttons using Python.

To do so I wrote cadmium, which scans the available Chromium profiles and allows to start either of them, or Chromium's Incognito Mode. On machines with SELinux it can even launch Chromium in the SELinux sandbox.

No more links opened in the wrong profile. Yay!

Categories: FLOSS Project Planets

Andrew Cater: BBQ Cambridge 2017 - post 5 - and a bit of a retrospective

Planet Debian - Sun, 2017-08-27 10:01
Thanks to all the sponsors of this BBQ who have made this so awesome.

This is also post 100 in this blog - looking  back, 90 or so of the 100 have been from Cambridge which just goes to show how much of the world revolves around a radius of about five miles from here

Likewise, there are folk in the room whom I've known for 20 years even if I'm dreadful with remembering  stuff. There's also scope for remembering absent friends who have got us this far and are no longer with us, for whatever reason.

I've just handed over some CDs and DVDs which, if readable, have a collective memory back to Debian 0.93 in about 1994 - even if not readable, they're a document of how far we've come from boot floppies to VMs, Bu-Ray size images and architectures undreamt of all those years ago.
Categories: FLOSS Project Planets

Andrew Cater: Helping out around the edges ...

Planet Debian - Sun, 2017-08-27 09:49
for two point releases of Debian CDs.

Lots of testing, lots of folk chatting on IRC on #debian-cd - it's a good process.

Very impressed by processes behind the scenes to obtain necessary computer accounts, access to machines and various other things that are absolutely necessary and invisible from the outside. Hofstadter's law applies of course - it always takes longer than you think, even when you take into account Hofstadter's law.

Also many thanks for the patience and tolerance of people I've known for many years but who I get to see all too seldom. It's a nice group to be with, as ever.
Categories: FLOSS Project Planets

Andrew Cater: BBQ Cambridge 2017 - post 4

Planet Debian - Sun, 2017-08-27 09:41
Room full of people with laptops and an amount of chatting going on. Annoyingly, I can't get the thing I want to work but there's a whole load of other folk deep into dealing with all sorts.

The garden is also full but I'm guessing everyone is under the gazebos - it's now hot and sunny, unusual for a British holiday weekend.
Categories: FLOSS Project Planets

Summing up my GSoC experience

Planet KDE - Sun, 2017-08-27 08:08

This is the fifth post in my GSoC series. You can read the fourth one here.

This summer I worked with KDE during Google Summer of Code, for the last 3 months I have been writing a Progressive Web App for WikiToLearn. In this short post I would like to share some insights about this.

The best thing about this experience is that I learnt a lot of new and exciting stuff: new technologies, pattern and development methodologies. Not only I improved my skills with modern web development tools but I also got quite proficient with the Vue.js and Webpack ecosystems. At the same time I got a bit better at writing and structuring documentation, something that many developers forget about.

For the first time I got to work full-time on a software development project, guided by my mentor and by other members of my organization. Overall working full-time was not impossible but some days it was harder than others. It got especially difficult when I had to face problems with external libraries and tools that were not well written or documented (for example I was stuck for a few days dealing with some weird issues with user authentication): I had to dig in the code of libraries I did not write to find out how to work around the problems I had. Instead, when I had to deal with bugs I introduced, it was a very fun experience: I know, it is strange to like debugging but the feeling you get when you fix the bug is well worth the lengthy debugging process.

Another thing I enjoyed during these 3 months were the blog posts, I did not write that many but every once in a while it was fun and relaxing to just write about how my work was going or about some cool technology. Sometime you get really carried away writing a blog post and many hours pass very quickly. I will try to keep writing these since it is a good way to share some quick ideas or tips.

During this GSoC I also enjoyed talking with my mentor as often as possible, he was always ready to share some tips or some ideas on how to improve the quality of my code and of my work. I think that communicating with the mentor is very important, because it is easy to get lost when the only schedule you have is the one you wrote 4 months ago as part of your proposal.

Speaking of the proposal, everything planned was pretty much implemented, except for a few minor features that were postponed because of greater issues we had to deal with (for example the recent problems with the authentication postponed the notification implementation). This was of course discussed with my mentor and we both agreed that it was ok to implement some minor details later, even after GSoC. This is because, after taking a little break, I will keep on working on the project since I hope to get it fully ready for public usage in the next months.

Overalll I loved Google Summer of Code. Thanks again to KDE, WikiToLearn, Google, my mentor and everyone involved in this amazing project. And now we wait for the final evaluation…

Categories: FLOSS Project Planets

Holger Levsen: 20170827-coreboot-build-environment

Planet Debian - Sun, 2017-08-27 07:55
setting up a coreboot build environment, including an Ada compiler

So without much explaination, this is how lynxis told me how to setup a coreboot build environment, which contains an Ada compiler which is needed to build the free graphics initialisation for Intel cards (=so no binary VGA bios blob is needed).

The Ada compiler is build automatically by default if it's build depends are installed:

sudo apt install build-essential bison flex zlib1g-dev ncurses-dev gnat git clone --recursive https://review.coreboot.org/p/coreboot.git cd coreboot/ git submodule update --init --checkout 3rdparty/blobs # for the x230 this only contains microcode updates make iasl CPUS=$(nproc) make gnumake CPUS=$(nproc) make crossgcc-i386 CPUS=$(nproc)

coreboot is then build as usual:

make menuconfig make

That's it.

(I've just left out the steps to choose the coreboot revision and validating it, as well as choosing a configurationwith make menuconfig as this is better documented elsewhere.)

Categories: FLOSS Project Planets
Syndicate content