Language Selection

English French German Italian Portuguese Spanish

Development

Python Programming Leftovers

Filed under
Development
  • #100DaysOfCode, Day 001 – Dates & Times

    We begin with a date/time project.
    Python has objects (primitives) to deal with dates and times.
    They are part of the datetime module, which is part of the Python Standard Library.

  • Top 25 Python Libraries for Data Science Projects

    This post is attempting to enlighten you about the most useful and popular Python libraries used by data scientists. And why only Python, because it has been the leading programming language for solving real-time data science problems.

    These libraries have been tested to give excellent results in various areas like Machine Learning (ML), Deep Learning, Artifical Intelligence (AI), and Data Science challenges. Hence, you can confidently induct any of these without putting too much time and effort in R&D.

    In every data science project, programmers, even architects, use to spend considerable time researching the Python libraries that can be the best fit. And we believe this post might give them the right heads up, cut short the time spent, and let them deliver projects much faster.

  • Invalid Syntax in Python: Common Reasons for SyntaxError

    Python is known for its simple syntax. However, when you’re learning Python for the first time or when you’ve come to Python with a solid background in another programming language, you may run into some things that Python doesn’t allow. If you’ve ever received a SyntaxError when trying to run your Python code, then this guide can help you. Throughout this tutorial, you’ll see common examples of invalid syntax in Python and learn how to resolve the issue.

  • Scraping dynamic websites using Scraper API and Python

    In the last post of scraping series, I showed you how you can use Scraper API to scrape websites that use proxies hence your chance of getting blocked is reduced. Today I am going to show how you can use Scraper API to scrape websites that are using AJAX to render data with the help of JavaScript, Single Page Applications(SPAs) or scraping websites using frameworks like ReactJS, AngularJS or VueJS.

    I will be working on the same code I had written in the introductory post. Let's work on a simple example. There is a website that tells your IP, called HttpBin. If you load via browser it will tell your real IP.

  • Registration for PyCon US 2020 is open!

    We are excited to announce the opening of PyCon US 2020 registration. The registration site has been updated, tweaked, and tested all in the effort to provide you a seamless experience.

    The new system will allow you to access, view, and add to your current registration. You can book and view hotel reservations and request changes if needed right through your dashboard.

  • The Incredible Disaster of Python 3

    I have long noted issues with Python 3?s bytes/str separation, which is designed to have a type ?bytes? that is a simple list of 8-bit characters, and ?str? which is a Unicode string. After apps started using Python 3, I started noticing issues: they couldn?t open filenames that were in ISO-8859-1, gpodder couldn?t download podcasts with 8-bit characters in their title, etc. I have files on my system dating back to well before widespread Unicode support in Linux.

    Due to both upstream and Debian deprecation of Python 2, I have been working to port pygopherd to Python 3. I was not looking forward to this task. It turns out that the string/byte types in Python 3 are even more of a disaster than I had at first realized.

    [...]

    On POSIX platforms such as Unix, a filename consists of one or more 8-bit bytes, which may be any 8-bit value other than 0x00 or 0x2F (‘/’). So a file named “test\xf7.txt” is perfectly acceptable on a Linux system, and in ISO-8859-1, that filename would contain the division sign ÷. Any language that can’t process valid filenames has serious bugs – and Python is littered with these bugs.

Programming: Dart 2.6 and Python Leftovers

Filed under
Development
  • Dart 2.6 Adds Native Linux Support

    Google's Dart has increased support for native, ahead-of-time (AOT) compilation for Linux, Windows and MacOS. The extra support comes from an extension of Dart's existing compiler set called dart2native, which can be used to create command-line programs.

    Dart is described as a client-optimized language for fast apps on any platform. It began life as an alternative to JavaScript that would be supported directly by browsers, but when this didn't work out it was redeveloped as a better compiler.

  • A couple of handy zsh/bash functions for Python programmers

    Just a quick post today, to tell you about a couple of simple zsh functions that I find handy as a Python programmer.

    First, pyimp – a very simple function that tries to import a module in Python and displays the output. If there is no output then the import succeeded, otherwise you’ll see the error. This saves constantly going into a Python interpreter and trying to import something, making that ‘has it worked or not’ cycle a bit quicker when installing a tricky package.

  • Python CSV

    A CSV (Comma Separated Values) format is one of the most simple and common ways to store tabular data. To represent a CSV file, it must be saved with the .csv file extension.

  • Switching from Python 2 to Python 3: What you need to know

    In 2012, the team maintaining the Python programming language reviewed its options. There were two increasingly different codebases, Python 2 and Python 3. Both were popular, but the newer version was not as widely adopted.

    In addition to Python 3's disruption of changing the underlying way data is handled by completely reworking Unicode support, a major version change allowed non-backward-compatible changes to happen all at once. This decision was documented in 2006. To ease the disruption, Python 2 continued to be maintained, with some features backported. To further help the community transition, the EOL date was extended from 2015 to 2020, another five years.

Programming Leftovers

Filed under
Development
  • Using cURL in Python with PycURL

    In this tutorial, we are going to learn how to use PycURL, which is an interface to the cURL library in Python. cURL is a tool used for transferring data to and from a server and for making various types of data requests. PycURL is great for testing REST APIs, downloading files, and so on. Some developers prefer using Postman for testing APIs but PycURL is another suitable option to do so as it supports multiple protocols like FILE, FTPS, HTTPS, IMAP, POP3, SMTP, SCP, SMB, etc. Moreover, PycURL comes in handy when a lot of concurrent, fast, and reliable connections are required.

    As mentioned above, PycURL is an interface to the libcURL library in Python; therefore PycURL inherits all the capabilities of libcURL. PycURL is extremely fast (it is known to be much faster than Requests, which is a Python library for HTTP requests), has multiprotocol support, and also contains sockets for supporting network operations.

  • Faster Winter 3: Difference Lists

    Today, we will tackle the big bad memory leak that eats up my laptop’s memory.

    A quick look at the heap profile (+RTS -h) showed that the memory was filling up with lists. Not very helpful, as lists are everywhere. So I looked through the hot code of the interpreter, eval, step and instr in Wasm.Exec.Eval to see if anything fishy is going on. I found some uses of the list concatenation operator (++) – always a bad sign, as it has to traverse the list on its left completely!

    And often the solution is pretty simple: Use difference lists! It’s even simpler than the name makes it sound like. It does not require you to import anything new, and works well everywhere where you assemble a list in multiple stages, but use it, in its full form, only once at the end.

  • Fabric-licious Raspberry Pi projects - Raspberry Pi

    I’m currently (re)learning how to knit. Here are some textile-themed Raspberry Pi projects for the yarn-curious.

  • [ Perl | Raku | The ] Weekly Challenge - 2020

    It has been wonderful journey so far in the year 2019. When I started the journey in March, I didn’t know it would take this shape. All credit goes to the support of Perl/Raku community in general. It would be unfair if I pick few names. You know who I am talking about anyway. Let me share the story with you all.

GNOME Development: Technical Reports From Federico Mena-Quintero and Jussi Pakkanen

Filed under
Development
GNOME
  • Refactoring the Length type

    Over a couple of years, librsvg's type that represents CSS lengths went from a C representation along the lines of "all data in the world is an int", to a Rust representation that uses some interesting type trickery:

    C struct with char for units.

    C struct with a LengthUnits enum.

    C struct without an embodied direction; each place that needs to normalize needs to get the orientation right.

    C struct with a built-in direction as an extra field, done at initialization time.

    Same struct but in Rust.

    An ugly but workable Parse trait so that the direction can be set at parse/initialization time.

    Three newtypes LengthHorizontal, LengthVertical, LengthBoth with a common core. A cleaned-up Parse trait. A macro to generate those newtypes.

    Replace the LengthDir enum with an Orientation trait, and three zero-sized types Horizontal/Vertical/Both that implement the trait.

    Replace most of the macro with a helper trait LengthTrait that has an Orientation associated type.

    Replace the helper trait with a single Length<T: Orientation> type, which puts the orientation as a generic parameter. The macro disappears and there is a single implementation for everything.

    Refactoring never ends!

  • Some intricacies of ABI stability

    As far as I know, there is no known real-world solution to this problem that would scale to a full operating system (i.e. all of Debian, FreeBSD or the like). If there are any university professors reading this needing problems for your grad students, this could be one of them. The problem itself is fairly simple to formulate: make it possible to run two different, ABI incompatible C++ standard libraries within one process. The solution will probably require changes in the compiler, linker and runtime loader. For example, you might extend symbol resolution rules so that they are not global, but instead symbols from, say library bar would first be looked up in its direct descendents (in this case only abi2) and only after that in other parts of the tree.

    To get you started, here is one potential solution I came up with while writing this post. I have no idea if it actually works, but I could not come up with an obvious thing that would break. I sadly don't have the time or know-how to implement this, but hopefully someone else has.

Python Programming

Filed under
Development

Programming Lesson 101, Bash and Java Books/Tutorials

Filed under
Development
  • Lesson 101: Everything You Need To Learn About Programming Guidance

    This era has witnessed how far technology can go, and at present, it seems to be ruling all. Technology plays a significant role when it comes to innovations and a remarkable portion of such creations deal with software.
    Software development is mainly based on programming, and thus, it has become an exciting topic. Since a significant portion of technology revolves around programming, every student should at least have a basic concept regarding the same. However, many are willing to gain in-depth knowledge. Either way, there are some essential aspects everyone should be aware of before proceeding with the subject.

  • Generate random passwords with this Bash script
  • Excellent Free Tutorials to Learn Java

Programming Leftovers

Filed under
Development
  • Mike Hommey: Five years of git-cinnabar

    On this very day five years ago, I committed the initial code of what later became git-cinnabar. It is kind of an artificial anniversary, because I didn’t actually publish anything until 3 weeks later, and I also had some prototypes months earlier.

    The earlier prototypes of what I’ll call “pre-git-cinnabar” could handle doing git clone hg::https://hg.mozilla.org/mozilla-central (that is, creating a git clone of a Mercurial repository), but they couldn’t git pull later. That pre-git-cinnabar initial commit, however, was the first version that did.

    The state of the art back then was similar git helpers, the most popular choice being Felipec’s git-remote-hg, or the opposite tool: hg-git, a mercurial plugin that allows to push to a git repository.

    They both had the same caveats: they were slow to handle a repository the size of mozilla-central back then, and both required a local mercurial repository (hidden in the .git directory in the case of Felipec’s git-remote-hg).

  • Top 10 Vim plugins for programming in multiple languages

    Recently, when I was redoing my setup (as I do every so often), I decided it was a good opportunity to identify the best Vim plugins for programming in multiple languages and a way to combine those plugins for each language I program in.

    I do use certain plugins for specific languages and profiles (e.g., I only install Rocannon in my Ansible profile), and I won't go into those here—that would be a long list. But the 10 Vim plugins described below are my favorites, the ones I use in virtually every profile I have, no matter what programming language I'm using.

  • teach your kids to build their own game with Python - 1

    I used to be a coding trainer few months ago. Our students were former street kids coming from under-privileged societies. You can imagine the lack of education they had. As a teacher there, I had to make my lessons fun and easy for them to grasp, so I would often use games to do so. I was going through my old files and I found this lesson plan I wrote to teach the kids how to build the famous game Space Invaders. At the beginning it seemed an impossible mission, but they actually loved it and got to love coding because of it!

    Anywho, with no further details, I am going to share this lesson in three posts here. today is the first, hoping that any beginner or parent would find it helpful.

  • p2k19 Hackathon Report: Jeremy Evans on PostgreSQL and Ruby

    I started off by preparing an update to PostgreSQL 12. This involved updating a bunch of ports that depend on PostgreSQL. Thankfully, the PostgreSQL 12 update was a little easier than the PostgreSQL 11 update, and didn't take as much time. Now that PostgreSQL 12.1 has been released, this update should hopefully be committed to the ports tree soon.

  • Book review – Supercharged Python, by Brian Overland and John Bennet

    If you have been following beginner or even intermediate guides on Python and are starting to feel the need for more advanced learning, this book may be the one you have been looking for.

    According to the authors, this book was written for those who already know the basics of Python, but want to deepen their knowledge and skills. While being targeted to people who already know the fundamentals of Python, it still includes a quick review in the first chapter. It goes briefly through the usual stuff, like variables, operators, data types, basic I/O, if/else, while, for, function definitions and arguments, lists, tuples, dictionaries, sets, and the distinction between global and local variables. This initial chapter is presented as being an optional reading, as its contents are pretty basic, but the authors recommend that the reader takes a minute or so on the last to pages, which cover the global statement.

  • New book: Retro Gaming with Raspberry Pi

    Raspberry Pi Press is delighted to announce the release of the latest addition to your bookshelf: Retro Gaming with Raspberry Pi!

  • 2019.46 Guidance

    Naoum Hankache has taken the famous perl6intro.com website, which currently provides the same introduction in 13 different languages, to the Raku era at https://raku.guide (/r/rakulang comments). So if your native language is Bulgarian, Chinese, Dutch, French, German, Indonesian, Italian, Japanese, Portuguese, Spanish, Russian or Turkish, you can learn the basics about the Raku Programming Language in your native language!

Programming Leftovers

Filed under
Development
  • Quicksort in Python

    Quicksort is a popular sorting algorithm and is often used, right alongside Merge Sort. It's a good example of an efficient sorting algorithm, with an average complexity of O(n logn). Part of its popularity also derives from the ease of implementation.

    We will use simple integers in the first part of this article, but we'll give an example of how to change this algorithm to sort objects of a custom class.

    Quicksort is a representative of three types of sorting algorithms: divide and conquer, in-place, and unstable.

  • GCC 10.0 Status Report (2019-11-18), Stage 3 in effect now
  • GCC 10 Feature Development Is Over - Now The Focus Turns To Bug Fixing

    GCC 10 has moved to its next stage of development that shifts away from feature work to instead general bug fixing with hopes of shipping the GNU Compiler Collection 10 release in the months ahead.

    GCC 10 release manager Richard Biener of SUSE announced this Monday morning that "stage three" development phase.

  • ttdo 0.0.4: Extension

    A first update release to the still very new (and still very small) ttdo package arrived on CRAN today. Introduced about two months ago in September, the ttdo package extends the most excellent (and very minimal / zero depends) unit testing package tinytest by Mark van der Loo with the very clever and well-done diffobj package by Brodie Gaslam.

  • Adventures optimizing a bytecode based scripting language
  • Keeping a simple markdown work-log, via emacs

    For the past few years I've been keeping a work-log of everything I do. I don't often share these, though it is sometimes interesting to be able to paste into a chat-channel "Oh on the 17th March I changed that .."

  • Implement C++ coroutines.
    This patch series is an initial implementation of a coroutine feature,
    expected to be standardised in C++20.
    
    Standardisation status (and potential impact on this implementation):
    ----------------------
    
    The facility was accepted into the working draft for C++20 by WG21 in
    February 2019.  During two following WG21 meetings, design and national
    body comments have been reviewed, with no significant change resulting.
    
    Mature implementations (several years) of this exist in MSVC, clang and
    EDG with some experience using the clang one in production - so that the
    underlying principles are thought to be sound.
    
    At this stage, the remaining potential for change comes from two areas of
    national body comments that were not resolved during the last WG21 meeting:
    (a) handling of the situation where aligned allocation is available.
    (b) handling of the situation where a user wants coroutines, but does not
        want exceptions (e.g. a GPU).
    
    It is not expected that the resolution to either of these will produce any
    major change.
    
    The current GCC implementation is against n4835 [1].
    
    ABI
    ---
    
    The various compiler developers have discussed a minimal ABI to allow one
    implementation to call coroutines compiled by another; this amounts to:
    
    1. The layout of a public portion of the coroutine frame.
    2. A number of compiler builtins that the standard library might use.
    
    The eventual home for the ABI is not decided yet, I will put a draft onto
    the wiki this week.
    
    The ABI has currently no target-specific content (a given psABI might elect
    to mandate alignment, but the common ABI does not do this).
    
    There is not need to add any new mangling, since the components of this are
    regular functions with manipulation of the coroutine via a type-erased handle.
    
    Standard Library impact
    -----------------------
    
    The current implementations require addition of only a single header to
    the standard library (no change to the runtime).  This header is part of
    the patch series.
    
    GCC Implementation outline
    --------------------------
    
    The standard's design for coroutines does not decorate the definition of
    a coroutine in any way, so that a function is only known to be a coroutine
    when one of the keywords (co_await, co_yield, co_return) is encountered.
    
    This means that we cannot special-case such functions from the outset, but
    must process them differently when they are finalised - which we do from
    "finish_function ()".
    
    At a high level, this design of coroutine produces four pieces from the
    original user's function:
    
      1. A coroutine state frame (taking the logical place of the activation
         record for a regular function).  One item stored in that state is the
         index of the current suspend point.
      2. A "ramp" function
         This is what the user calls to construct the coroutine frame and start
         the coroutine execution.  This will return some object representing the
         coroutine's eventual return value (or means to continue it when it it
         suspended).
      3. A "resume" function.
         This is what gets called when a the coroutine is resumed when suspended.
      4. A "destroy" function.
         This is what gets called when the coroutine state should be destroyed
         and its memory returned.
    
    The standard's coroutines involve cooperation of the user's authored function
    with a provided "promise" class, which includes mandatory methods for
    handling the state transitions and providing output values.  Most realistic
    coroutines will also have one or more 'awaiter' classes that implement the
    user's actions for each suspend point.  As we parse (or during template
    expansion) the types of the promise and awaiter classes become known, and can
    then be verified against the signatures expected by the standard.
    
    Once the function is parsed (and templates expanded) we are able to make the
    transformation into the four pieces noted above.
    
    The implementation here takes the approach of a series of AST transforms.
    The state machine suspend points are encoded in three internal functions
    (one of which represents an exit from scope without cleanups).  These three 
    IFNs are lowered early in the middle end, such that the majority of GCC's
    optimisers can be run on the resulting output.
    
    As a design choice, we have carried out the outlining of the user's function
    in the front end, and taken advantage of the existing middle end's abilities
    to inline and DCE where that is profitable.
    
    Since the state machine is actually common to both resumer and destroyer
    functions, we make only a single function "actor" that contains both the
    resume and destroy paths.  The destroy function is represented by a small
    stub that sets a value to signal the use of the destroy path and calls the
    actor.  The idea is that optimisation of the state machine need only be done
    once - and then the resume and destroy paths can be identified allowing the
    middle end's inline and DCE machinery to optimise as profitable as noted above.
    
    The middle end components for this implementation are:
     1. Lower the coroutine builtins that allow the standard library header to
        interact with the coroutine frame (these fairly simple logical or
        numerical substitution of values given a coroutine frame pointer).
     2. Lower the IFN that represents the exit from state without cleanup.
        Essentially, this becomes a gimple goto.
     3. Lower the IFNs that represent the state machine paths for the resume and
        destroy cases.
     4. A very late pass that is able to re-size the coroutine frame when there
        are unused entries and therefore choose the minimum allocation for it.
    
    There are no back-end implications to this current design.
    
    GCC Implementation Status
    -------------------------
    
    The current implementation should be considered somewhat experimental and is
    guarded by a "-fcoroutines" flag.  I have set out to minimise impact on the
    compiler (such that with the switch off, coroutines should be a NOP).
    
    The branch has been feature-complete for a few weeks and published on Compiler
    Explorer since late September.  I have been keeping a copy of the branch on
    my github page, and some bug reports have been filed there (and dealt with).
    
    The only common resource taken is a single bit in the function decl to flag
    that this function is determined to be a coroutine.
    
    Patch Series
    ------------
    
    The patch series is against r278049 (Mon 11th Nov).
    
    There are 6 pieces to try an localise the reviewer interest areas.  However
    it would not make sense to commit except as possibly two (main and testsuite).
    I have not tested that the compiler would even build part-way through this
    series.
    
    1) Common code and base definitions.
    
    This is the background content, defining the gating flag, keywords etc.
    
    2) Builtins and internal functions.
    
    Definitions of the builtins used by the standard library header and the
    internal functions used to implement the state machine.
    
    3)  Front end parsing and AST transforms.
    
    This is the largest part of the code, and has essentially two phases
     1. parse (and template expansion)
     2. analysis and transformation, which does the code generation for the
        state machine.
    
    4) Middle end expanders and transforms
    
     As per the description above.
    
    5) Standard library header.
    
    This is mostly mandated by the standard, although (of course) the decision
    to implement the interaction with the coroutine frame by inline builtin
    calls is pertinent.
    
    There is no runtime addition for this (the builtins are expanded directly).
    
    6) Testsuite.
    
    There are two chunks of tests.
     1. those that check for correct error handling
     2. those that check for the correct lowering of the state machine
     
    Since the second set are checking code-gen, they are run as 'torture' tests
    with the default options list.
    
    ======
    
    I will put this patch series onto a git branch for those that would prefer
    to view it in that form.
    
    thanks
    Iain
    
  • Initial Patches Wire In C++20 Coroutines For The GCC Compiler

    The GNU Compiler Collection continues picking up new features aligned for the upcoming C++20 standard. The latest are patches pending on the mailing list for implementing coroutines in C++.

    C++20 is expected to have coroutines per the pending technical specification. Coroutines allow a function to have its execution stopped/suspended and then to be resumed later.

  • Faster Winter 1: Vectors
  • Faster Winter 2: SPECIALIZE
  • Attention! Attention! Tutorial Proposal Deadline Approaching
  • Python Software Foundation Fellow Members for Q3 2019

    Congratulations! Thank you for your continued contributions. We have added you to our Fellow roster online.

    The above members have contributed to the Python ecosystem by teaching Python, maintaining popular libraries/tools such as cryptography and pytest, helping document on packaging.python.org, organizing Python events, starting Python communities in their home countries, and overall being great mentors in our community. Each of them continues to help make Python more accessible around the world. To learn more about the new Fellow members, check out their links above.

  • Why Sponsor PyCon 2020?

    Sponsors help keep PyCon affordable and accessible to the widest possible audience. Sponsors are what make this conference possible. From low ticket prices to financial aid, to video recording, the organizations who step forward to support PyCon, in turn, support the entire Python community. They make it possible for so many to attend, for so many to be presenters, and for the people at home to watch along.

  • Pandas GroupBy: Your Guide to Grouping Data in Python

    Whether you’ve just started working with Pandas and want to master one of its core facilities, or you’re looking to fill in some gaps in your understanding about .groupby(), this tutorial will help you to break down and visualize a Pandas GroupBy operation from start to finish.

    This tutorial is meant to complement the official documentation, where you’ll see self-contained, bite-sized examples. Here, however, you’ll focus on three more involved walk-throughs that use real-world datasets.

  • Solving CAPTCHA with Web automation

    CAPTCHA is no longer an alien term to the users. An acronym for Completely Automated Public Turing test to tell Computers and Humans Apart. CAPTCHA is basically a computer program built to distinguish between the human and machine to prevent any type of spam or data extraction from websites. The entire concept of CAPTCHA is based on the assumption that only a human would pass this test and bot or automated scripts would fail.

Programming: Django, Python and Qt

Filed under
Development
  • Introducing DjangoCon Africa

    Following the huge success of PyCon Africa, the Django community in Africa is ready to bring a new major software event to the continent - the very first DjangoCon Africa! The Django Software Foundation is excited to endorse and support this initiative.

    Plans are already in motion for a DjangoCon Africa to be held in Addis Ababa, Ethiopia in November 2020. Actual dates to be announced as soon as key details are in place.

    DjangoCon Africa will include 3 days of single-track talks, 1 day of workshops and sprints, and another day for touring for international visitors.

    The event will also include a Django Girls workshop to be held the weekend before DjangoCon Africa. To make the conference as inclusive as possible, the event will offer financial aid to members of under-represented communities in software to ensure they can also attend.

  • Django 3.0 release candidate 1 released

    Django 3.0 release candidate 1 is the final opportunity for you to try out the raft of new features before Django 3.0 is released.

    The release candidate stage marks the string freeze and the call for translators to submit translations. Provided no major bugs are discovered that can't be solved in the next two weeks, Django 3.0 will be released on or around December 2. Any delays will be communicated on the django-developers mailing list thread.

  • Cyber Discovery - What it is all about

    Cyber Discovery is made of 4 rounds. The first one being CyberStart Assess. It ran from the 3rd September to the 25th October 2019. There are 10 challenges starting easy, getting much harder. The aim for most of the challenges are to use 'Inspect Element' to get into the website and find the flag. I completed all of these challenges and was invited onto the next round: CyberStart Game. CyberStart Game is much more about finding things out yourself. A useful tip if you are stuck is to search for help on Google. CyberStart Game has 3 'Bases': Headquarters where you get to take part in lots of varied challenges, Moon Base where you learn the basics of Python and Internet Tools that can be run in python e.g. FTP... You also learn how to use python to Brute Force password protected ZIP files and other securities. The Forensics Base is, well you can guess: Forensics. It teaches you about Cryptography and other hiding methods.

  • PyDev of the Week: Martin Uribe

    While taking some college courses I learned Java, but I didn’t like it much. I know enough of the following to get things done: HTML, CSS, JavaScript, Perl, SQL, and BASH. Python is my favorite; I use it pretty much every day even though my job doesn’t require me to code.

  • You can now hone your testing / pytest skills on our platform

    Writing test code is an essential skill. As PyBites we believe writing code is the only solution to becoming a master (Ninja) at programming. The same applies to test code. For that reason we extended our regular exercises with Test Bites.

    In this article you will read about the feature showcasing it on our first ever Test Bite. We also share some details around implementation and a challenge we hit getting it to work. Enjoy and start honing your testing skills today!

  • unu – Using Qt on embedded Linux

    Right from the start, unu wanted to add a stylish, first-class embedded high-res display to their second generation electric scooter. Like many top-class engineering companies, unu didn’t have in-house expertise for building a modern UI, so they decided to partner with KDAB to build a modern UI based on Qt. In this video you learn more about the development process in this project and why unu chose KDAB as a partner.

Programming Leftovers

Filed under
Development
  • What is -pipe and should you use it?

    This argument may have been needed in the ye olden times of supporting tens of broken commercial unixes. Nowadays the only platform where this might make a difference is Windows, given that its file system is a lot slower than Linux's. But is its pipe implementation any faster? I don't know, and I'll let other people measure that.

    The "hindsight is perfect" design lesson to be learned

    Looking at this now, it is fairly easy to see that this command line option should not exist. Punting the responsibility of knowing whether files or pipes are faster (or even work) on any given platform to the user is poor usability. Most people don't know that and performance characteristics of operating systems change over time. Instead this should be handled inside the compiler with logic roughly like the following:

  • ABlog v0.10 released¶

    ABlog v0.10 is released with the main focus being to support the latest version of Sphinx as well as Python 3 only support.

    Ablog V0.9.X will no longer be supported as Python 2 comes to an end in a few months and it is time people upgraded.

  • How and why I built Sudoku Solver

    The process was pretty intensive first of all i went to the drawing board thinking of how to actually do this i drew a 3x3 matrix and thought how it could be done on this miniature matrix of 3x3.But figuring out the right path was difficult and to get inspiration or an idea as to how to solve this problem I started solving sudoku problems on my own easy to expert level but once I got a hang of them I got back to my project I noted down every technique or idea in the notebook that I always carried with me,I made sure not too look this up on google I wanted to build this thing from scratch on my own.Experimenting day after day lines of code stacking up it took me 15 days to complete the code and the moment correctly filled sudoku matrix was given out well I was on cloud nine.

  • Unconventional Secure and Asynchronous RESTful APIs using SSH

    Some time ago, in a desperate search for asynchronicity, I came across a Python package that changed the way I look at remote interfaces: AsyncSSH.

    Reading through their documentation and example code, you’ll find an interesting assortment of use cases. All of which take advantage of the authentication and encryption capabilities of SSH, while using Python’s asyncio to handle asynchronous communications.

    Thinking about various applications I’ve developed over the years, many included functions that could benefit from decoupling into separate services. But at times, I would avoid it due to security implications.

    I wanted to build informative dashboards that optimize maintenance tasks. But they bypassed business logic, so I wouldn’t dare expose them over the same interfaces. I even looked at using HTTPS client certs, but support from REST frameworks seemed limited.

Syndicate content

More in Tux Machines

Type Title Author Replies Last Postsort icon
Story Android Leftovers Rianne Schestowitz 12/12/2019 - 1:30pm
Story LibreOffice 6.3.4 available for download Roy Schestowitz 1 12/12/2019 - 1:22pm
Story Graphics: AMD, Intel, Vulkan/Flycast and NVIDIA Roy Schestowitz 12/12/2019 - 1:20pm
Story Qt Creator 4.11 is released Rianne Schestowitz 1 12/12/2019 - 12:55pm
Story Watch these videos from the Linux App Summit Rianne Schestowitz 12/12/2019 - 12:52pm
Story Most essential apps for every Linux user | 2020 Roy Schestowitz 12/12/2019 - 12:48pm
Story Games: Transport Fever 2, Vampire: The Masquerade - Coteries of New York, Rocket League Roy Schestowitz 12/12/2019 - 12:38pm
Story GNOME and gestures, Part 3: HdyLeaflet again Roy Schestowitz 12/12/2019 - 12:31pm
Story New Shows: The Linux Link Tech Show (TLLTS), BSD Now, Choose Linux, Destination Linux Roy Schestowitz 12/12/2019 - 12:10pm
Story Today in Techrights Roy Schestowitz 12/12/2019 - 9:45am