Language Selection

English French German Italian Portuguese Spanish

Programming: PyLint, C2x, Librem 5, Portable Document Format (PDF) in Python

Filed under
Development
  • Writing Cleaner Python Code With PyLint

    PyLint is a well-known static analysis tool for Python 2 and 3. It has a number of useful features, like checking your code for compliance with the PEP 8 Python style guide. It makes sure that your code follows the code style guide and it can also automatically identify common bugs and errors in your Python code.

    In this video series you’ll see how to install and set up the PyLint code linter tool. You’ll learn why you should use code linters like PyLint, Flake8, PyFlakes, or other static analysis tools—and how they can help you write cleaner and more Pythonic code.

    You can get this setup up and running in a few minutes and it’ll quickly help you write better and cleaner Python code.

  • LLVM Clang 9.0 Picks Up Initial C2x Language Mode

    Merged today to the mainline Clang compiler front-end is the initial C2x language mode support as what will eventually be the successor to the C18 programming language.

    C2x is still quite a ways out from release and its changes still under determination. At this stage the C2x language support for LLVM Clang is just enabling support by default for the [[attribute]] (double square brackets attribute; similar to C++) support.

  • Librem 5 App Design Tutorial – Part II

    Hello and welcome to the second of my series of blog posts on how to design your own, brand new app for the Librem 5.

    In my last post we went over the philosophy and process, goals and relevant art of building a read-it-later app; today we’ll be discussing sketches and mockups – specifically in what concerns navigation, article and article list screens, and desktops.

  • Working with PDFs in Python: Adding Images and Watermarks

    Today, a world without the Portable Document Format (PDF) seems to be unthinkable. It has become one of the most commonly used data formats ever. Up to PDF version 1.4, displaying a PDF document in an according PDF viewer works fine. Unfortunately, the features from the newer PDF revisions, such as forms, are tricky to implement, and still require further work to be fully functional in the tools. Using various Python libraries you can create your own application in an comparable easy way.

    This article is part two of a little series on PDFs with Python. In part one we already gave you an introduction into reading PDF documents using Python, and started with a summary of the various Python libraries. An introduction followed that showed how to manipulate existing PDFs, and how to read and extract the content - both the text and images. Furthermore, we showed you how to split documents into its single pages.

    In this article you will learn how add images to your PDF in the form of watermarks, stamps, and barcodes. For example this is quite helpful in order to stamp or mark documents that are intended to be read by a specific audience, only, or have a draft quality, or to simply add a barcode for identification purposes.

More in Tux Machines

Meet the GNOMEies: Max Huang

Max Huang has been GNOME since 2010, starting with forming a GNOME users group in Taiwan. Max has a story you may understand: being a user, meeting the right person, and slowly finding yourself more and more deeply involved with a community in terms of working together and making friends. Read more

Review: Raspberry Pi 4

The Raspberry Pi began life as a hacker's dream: a cheap, low-power, highly extendable, hackable PC that shipped as a bare circuit board. Intended as one part educational device, one part tinkering tool, it became something of a phenomenon that has been used to power everything from scaled-down Mars rovers to millions of science and hackday experiments in schools around the world. Read more

Debian: No longer a “Universal” operating system

The Debian project has removed support for the MIPS architecture. This is the latest CPU architecture to be removed from Debian, betraying their tagline of being “The Universal Operating System”.

I take issue not only with their removal of the MIPS architecture, but of their reasoning for doing it.

Read more

today's leftovers

  • Google's Chrome OS 76 Improves Support for Multiple Accounts on Chromebooks

    Google promoted the Chrome OS 76 operating system for supported Chromebook devices to the stable channel, and it is now rolling out to users from around the world with new features and improvements. Based on the latest Google Chrome 76 web browser release, which brings many new features and improvements on its own, Chrome OS 76's probably most exciting is a unified account management for those who use multiple Google accounts on their Chromebook, either by you or if the devices is shared with other people. Users can check out the new account management feature under Settings > Google Accounts, and they should keep in mind that they can now apply all the permissions and access granted to apps, add-ons, websites, Google Play, and in Chrome to all of their signed-in Google accounts. [...] Chrome OS 76 is now rolling out to all supported Chromebook devices. You can update your Chromebook to Chrome OS 76 by going to Chrome settings and accessing the About Chrome OS section. The new version will be automatically downloaded and installed on your Chromebook. A restart is required for Chrome OS 76 to be successfully installed.

  • Netrunner 19.08 Run Through

    In this video, we are looking at Netrunner 19.08.

  • Asterisk Celebrates 25 Million Downloads

    Sangoma Technologies Corporation (TSX VENTURE: STC), a trusted leader in delivering Unified Communications solutions for SMBs, Enterprises, OEMs, and Service Providers, both on-premises and in the cloud, today announced that September will mark the 25 millionth download of Asterisk, the world's most widely used open source communications software.

  • Mozilla Mornings on the future of EU content regulation

    On 10 September, Mozilla will host the next installment of our EU Mozilla Mornings series – regular breakfast meetings where we bring together policy experts, policymakers and practitioners for insight and discussion on the latest EU digital policy developments. The next installment will focus on the future of EU content regulation. We’re bringing together a high-level panel to discuss how the European Commission should approach the mooted Digital Services Act, and to lay out a vision for a sustainable and rights-protective content regulation framework in Europe.

  • FreeIPMI 1.6.4 Released

    o In libfreeipmi, add additional workarounds for packets that are re-ordered during sensor bridging. o In libfreeipmi, add additional sensor / event interpretations. o In libfreeipmi, fix error return value on bridging requests. o Add workaround in ipmi-sel for QuantaPlex T42D-2U motherboard, whichlists a SDR record that makes no sense. o Add workaround for Dell Poweredge FC830, which have an error when reading the last SDR record on a motherboard. o Support Supermicro X10 OEM dimm events.

  • The world’s first mobile phone type crypto digital currency hardware cold wallet officially opened source code

    Recently, the world's first mobile phone type crypto digital asset hardware cold wallet SAFEGEM officially opened source code [...] The cryptography-based blockchain technology is characterized by openness, transparency, and traceability. As an crypto digital asset management system based on blockchain applications, it should have the same characteristics and should have higher security. Therefore, the SAFEGEM development team decided to open up all source code, open source follows the GPL agreement, defines the business boundary, uses open source code for commercial use, and chooses not to open source.

  • Western Digital's Long Trip from Open Standards to Open Source Chips

    It started as a microprocessor pioneer in the 1970s. Now, the company is charting a new course in open source silicon.

  • Excellent Free Books to Learn Go

    Go is a compiled, statically typed programming language that makes it easy to build simple, reliable, and efficient software. It’s a general purpose programming language with modern features, clean syntax and a robust well-documented common library, making it a good candidate to learn as your first programming language. While it borrows ideas from other languages such as Algol and C, it has a very different character. It’s sometimes described as a simple language. Go is an open source project developed by a team at Google and many contributors from the open source community. Go’s first release was in 2009, and it’s distributed under a BSD-style license. This article selects the best open source books that will give readers a firm foundation in developing Go applications.

  • Corner cases and exception types

    Some unanticipated corner cases with Python's new "walrus" operator—described in our Python 3.8 overview—have cropped up recently. The problematic uses of the operator will be turned into errors before the final release, but just what exception should be raised came into question. It seems that the exception specified in the PEP for the operator may not really be the best choice, as a recent discussion hashed out.

  • Dirk Eddelbuettel: Rcpp now used by 1750 CRAN packages

    Since this morning, Rcpp stands at just over 1750 reverse-dependencies on CRAN. The graph on the left depicts the growth of Rcpp usage (as measured by Depends, Imports and LinkingTo, but excluding Suggests) over time. Rcpp was first released in November 2008. It probably cleared 50 packages around three years later in December 2011, 100 packages in January 2013, 200 packages in April 2014, and 300 packages in November 2014. It passed 400 packages in June 2015 (when I tweeted about it), 500 packages in late October 2015, 600 packages in March 2016, 700 packages last July 2016, 800 packages last October 2016, 900 packages early January 2017, 1000 packages in April 2017, 1250 packages in November 2017, and 1500 packages in November 2018. The chart extends to the very beginning via manually compiled data from CRANberries and checked with crandb. The next part uses manually saved entries. The core (and by far largest) part of the data set was generated semi-automatically via a short script appending updates to a small file-based backend. A list of packages using Rcpp is availble too. Also displayed in the graph is the relative proportion of CRAN packages using Rcpp. The four per-cent hurdle was cleared just before useR! 2014 where I showed a similar graph (as two distinct graphs) in my invited talk. We passed five percent in December of 2014, six percent July of 2015, seven percent just before Christmas 2015, eight percent last summer, nine percent mid-December 2016, cracked ten percent in the summer of 2017 and eleven percent in 2018. We are currently at 11.83 percent: a little over one in nine packages. There is more detail in the chart: how CRAN seems to be pushing back more and removing more aggressively (which my CRANberries tracks but not in as much detail as it could), how the growth of Rcpp seems to be slowing somewhat outright and even more so as a proportion of CRAN – just like one would expect a growth curve to.

  • GSoC final report

    The idea of this GSoC project was to implement new Domain-Specific language for LibreOffice to be used in UI testing by logging the user interactions with LO applications then generate the python code needed for the python UI framework which asaswill make testing easier. Also, the project aims to improve the logger that logs all the user interaction to be logged in the new DSL syntax to be more readable. Then we can use this replaying all the user interactions as a UI test.

  • Day 88 [Ed: Karina Passos on her time in KDE GSoC]

    Today, I’ll talk about my GSoC experience and won’t focus so much on Khipu, even because i still have some things to do, so in the next days I’ll publish a post about Khipu and what I’ve done. As I said in the old posts, the begin was the most complicated part for me. I made a project thinking that I’d be able to complete, I started studying the code and the things I’d make many weeks before the start. But I couldn’t understand the code and I think it’s my fault. I even lost three weeks after the start stuck in this situation. It was hard for me, because I was really scared about failing and at the same time dealing with my college stuff, because in Brazil, our summer (and our summer vacation), is in December-February, in July we have a three week vacation, but GSoC lasts three months. I wasn’t having a good time at college as well, but with the help of my therapist and my mentors I found a way to deal with the both things and as everything went well. After this complicated start, to not fail, my mentor suggested that I could change my project. My initial project was to create new features to Khipu and Analitza (Khipu’s main library) to make it a better application and move it out from beta. Then, my new project was to refactor Khipu (using C++ and QML). I was scared because I didn’t know if I’d be able to complete it, but the simplicity of QML helped me a lot, and before the first evaluation (approx. two weeks after I decided my new project) I finished the interface, or at least most of it. [...] And, of course, I’d like to say to KDE, Google and my mentors: thanks for this opportunity.

  • How To Check Your IP Address in Ubuntu [Beginner’s Tip]
  • Phoronix Test Suite 9.0 Milestone 2 Released, OpenBenchmarking.org Serves 42 Millionth Download

    The second development release of the forthcoming Phoronix Test Suite 9.0-Asker is now available for testing. Phoronix Test Suite 9.0 Milestone 2 continued evolving the brand new result viewer being introduced with PTS 9.0 and various new graphing visualizations. Various fixes and other improvements have landed into this new release. Screenshots and more details on the new result viewing experience soon.