Language Selection

English French German Italian Portuguese Spanish

Development

Programming: Debian, Python and LibreOffice

Filed under
Development
  • Dirk Eddelbuettel: digest 0.6.23: More sha1 refinements

    Another new version of digest got onto CRAN earlier today, and was also uploaded to Debian.

    digest creates hash digests of arbitrary R objects (using the md5, sha-1, sha-256, sha-512, crc32, xxhash32, xxhash64, murmur32, and spookyhash algorithms) permitting easy comparison of R language objects. It is a fairly widely-used package (currently listed at 868k monthly downloads) as many tasks may involve caching of objects for which it provides convenient general-purpose hash key generation.

    This release comes again one month after the previous release and contains further refinements for sha1 digests, thanks once more to Bill Denney and Thierry Onkelinx who added more support for formulae and better support for object attributes. I added some refinement for the encoding / utf8 filename tests from the previous to round things off.

  • Zsh prompt with asynchronous Git status

    Zsh ships vcs_info, a function fetching information about the VCS state for the current directory and populating a variable that can be used in a shell prompt.

  • Talk Python to Me: #239 Bayesian foundations

    In this episode, we'll dive into one of the foundations of modern data science, Bayesian algorithms, and thinking. Join me along with guest Max Sklar as we look at the algorithmic side of data science.

  • Support windows bar calendar

    Like any large suite of applications, Open edX software (my day job) depends on a number of underpinnings: Django, Python, Ubuntu, MySQL, and so on. We want to stay up-to-date on those dependencies, or at least ensure we are using supported versions of each.

    To help with that, I wanted to make a chart of the support windows for different versions of each dependency. I figured the simplest way to draw a chart like that was to make a spreadsheet. Google Sheets is enough for something like this, and makes it easy to share the result with others who need to refer to it.

    To create the spreadsheet programmatically, I used the JavaScript scripting support. My program went through a few other iterations before landing on this technique, so it’s in kind of a strange form now: it’s a Python program that writes JavaScript, which you then paste into a spreadsheet and run.

  • LibreOffice coverity scan

    When we make C++17 a requirement for LibreOffice at the end of 2018 the version of coverity provided by scan.coverity.com no longer worked for us. In July 2019 a newer version of the coverity tooling was available which supported C++17 and analysis resumed.

    Prior to losing coverity support we had a defect density (i.e. defects per 1,000 line of code) of 0, on its return this had inflated to 0.06 due to both new defects introduced during the down period and old defects newly detected due to additional checks introduced in the new version.

Programming Leftovers

Filed under
Development
  • Learn Python For Free With These Courses and eBooks

    Want to learn Python for free? Here, we list some of the best Python courses and books that you can use to learn Python online without spending any money.

    Python is a popular programming language. It’s also preferred by sysadmins for writing scripts.

    Python 3 is the latest major version available. Even though Python 2 was very popular among the devs, it is reaching its end of life on January 1, 2020.

    So, if you’re trying to learn Python, I’d recommend you to start with Python 3. While I am trying to learn python – in this article, I focus on pointing out some of the best free Python learning resources I’ve come across.

  • Winter 5: Eta-Expanding ReaderT

    Incidentally, if you look at the code at the end of all my optimizations, there is no mention of etaReaderT any more: Subsequent optimizations simplified the code so much that eventually GHC was able to be able to do this transformation without my help.

  • “Hands-On Docker for Microservices with Python” is now available!
  • Getting Twitch out the Door (but not as Twitch)

    As part of trying to get testing done for a PyOpenGL release, I finally got around to testing Twitch, porting it to Python 3.6 and doing a release, only to discover that in the 4 years (!) since I last worked on it, the original package name got used on PyPI. Duh. So Twitch is now formally Twitch OGLC/twitchoglc (for OpenGLContext, on which it's based). If you don't release early and often you lose, folks.

  • The Fundamental Problem in Python 3

    This expands on my recent post The Incredible Disaster of Python 3. I seem to have annoyed the Internet…

    Back in the mists of time, Unix was invented. Today the descendants of Unix, whether literal or in spirit, power the majority of the world’s cell phones, most of the most popular sites on the Internet, etc. And among this very popular architecture, there lies something that has made people very angry at times: on a Unix filesystem, 254 bytes are valid in filenames. The two that are not are 0x00 and the slash character. Otherwise, they are valid in virtually any combination (the special entries “.” and “..” being the exception).

    This property has led to a whole host of bugs, particularly in shell scripts. A filename with a leading dash might look like a parameter to a tool. Filenames can contain newline characters, space characters, control characters, and so forth; running ls in a directory with maliciously-named files could certainly scramble one’s terminal. These bugs continue to persist, though modern shells offer techniques that — while optional — can be used to avoid most of these classes of bugs.

    It should be noted here that not every valid stream of bytes constitutes a stream of bytes that can be decoded as UTF-8. This is a departure from earlier encoding schemes such as iso-8859-1 and cp437; you might get gibberish, but “garbage in, garbage out” was a thing and if your channel was 8-bit clean, your gibberish would survive unmodified.

  • Dimensionality Reduction in Python with Scikit-Learn

    In machine learning, the performance of a model only benefits from more features up until a certain point. The more features are fed into a model, the more the dimensionality of the data increases. As the dimensionality increases, overfitting becomes more likely.

    There are multiple techniques that can be used to fight overfitting, but dimensionality reduction is one of the most effective techniques. Dimensionality reduction selects the most important components of the feature space, preserving them and dropping the other components.

  • Python Socket File Transfer Send

    The intention of this article is to learn how to transfer a text file over network through python program. This file transfer is based on server client model to use socket programming in python3+.

  • “17% women in tech is not enough”

    Technology should be for everyone, but it has to be built by everyone to be for everyone. At Raspberry Pi, we work to empower everyone to become a tech creator and shape our collective digital future, and we hope that our work will help to increase the tech sector’s diversity.

  • Laurent Rosenfeld Weekly Review: Challenge - 005

    This is derived in part from my blog post made in answer to the Week 5 of the Perl Weekly Challenge organized by Mohammad S. Anwar as well as answers made by others to the same challenge.

  • Meet The Champion: Perl Weekly Challenge - 034

    Welcome to the weekly series “Meet The Champion”.

GNU Guile 2.9.5 (beta) released

Filed under
Development
GNU

We are delighted to announce GNU Guile 2.9.5, the fifth beta release in preparation for the upcoming 3.0 stable series. See the release announcement for full details and a download link.

Besides the usual set of optimizations, this release adds an --r6rs option for better R6RS support out of the box, and also adds a new --r7rs corresponding to R&RS. Guile's core exception handling has also been rebased onto the raise-exception and with-exception-handler primitives, enabling better compatibility going forward with structured exception objects, which are more common in the broader Scheme community than Guile's old throw and catch.

GNU Guile 2.9.5 is a beta release, and as such offers no API or ABI stability guarantees. Users needing a stable Guile are advised to stay on the stable 2.2 series.

Read more

Python Programming Leftovers

Filed under
Development
  • 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.

  • Python, Javascript, and Web automation

    In the last few months, I've been trying to compare the languages that I've worked with so far. The reason being, I often find myself in situations when I have a task at hand, and I realize there are multiple different ways to do it in multiple languages, and I get analysis paralysis.

    Anyways, the focus of this post is Python, Javascript, and their use in Web automation. To be fair, both languages have different histories and evolved very differently, but web automation is one area that I feel where both languages have something to offer. I'll try to compare Python and Javascript in the context of different usage patterns and ways of performing web automation.

  • Higher Performance Python (ODSC 2019)

    Building on PyDataCambridge last week I had the additional pleasure of talking on Higher Performance Python at ODSC 2019 yesterday.

  • Transferring Files Using Python’s Built-in HTTP Server

    The need to transfer files over a network is one that arises often. GNU/Linux systems support multiple protocols and tools for doing so, some of which are designed for somewhat permanent file sharing (such as SMB, AFP, and NFS), while others such as Secure Copy (SCP) are used for quick manual and scripted file transfers. Among these is the HyperText Transfer Protocol (HTTP), the versatile and ubiquitous protocol on which the World Wide Web relies.

    Python, which is included by default in most Linux distributions, provides simple HTTP servers through the “SimpleHTTPServer” and “http.server” modules. The former is found in the Python 2 Standard Library, while the latter is included in Python 3. These lightweight HTTP servers require no separate installation and can be started instantly with a single command.

Programming Leftovers

Filed under
Development
  • Accepted stands

    New this year is that some stands will switch between Saturday and Sunday, so we can give more projects the opportunity to present themselves to the community.

  • Python and shell tools

    I'm not a pythonista, and what little I know about Python for data work amounts to a few published recipes. Out of curiosity, I sometimes re-do those recipes with the GNU/Linux tools I use every day. Below are three such re-doings from Python 2.7 (default on my Debian 10 system, but soon to reach end-of-life).

    Please note that this post isn't meant to be a "which is best?" contest between Python and shell tools. Each world of commands has its pro's and con's, and Python users have access to a large number of general and specialised data-processing tools. Personally, I like the versatility of shell tools and command chains, and I like AWK's speed and flexible syntax (as readers of this blog will know).

  • KDevelop - possibly new release coordinator

    After many days and weeks of thinking and waiting for better person to appear (nobody appeared) I decided to take the initiative (it took a lot) and try my luck at becoming new KDevelop release coordinator.

    My reasoning as I mentioned in my mail is that if there was someone better for the job the position would be filled by now. And I wish for KDevelop to be a healthy project which can rival those monsters like MSVS, NetBeans, Eclipse, Atom, MSVC…

  • Modernizing Java to keep pace in a cloud-native world

    Java is no spring chicken and some are even referring to it as a “vintage language”. Despite its popularity, there are some complaints about it. In our new cloud-native world, why does Java need to evolve? In order to evolve to keep up with modern, cloud-native apps, Java needs to keep all of what makes it so dependable, while also being able to function in new app environments.
    Don’t worry, you are not the only one who feels old when you hear Java being described as a “vintage” programming language. While Java has been around since 1995, it is certainly not ready to retire (or rather, be retired), and continues to rank among the top languages TIOBE index. In fact, no other language has been so popular for so long.

    However, it is not without its issues, including sometimes being too clunky to keep up with some of the newer programming languages, not agile and flexible enough to work in this new world of containers, and not really relevant in applications that are not coded to be Java first. While they say you can’t teach an old dog new tricks, you can rethink how it performs what they already know.

today's howtos and programming bits

Filed under
Development
HowTos
  • How to Install Go on CentOS 8
  • How to Install Plone on Ubuntu 18.04
  • gThumb 3.8.2 Released! Menu in Top Panel Merged to Headbar
  • Python and shell tools

    I'm not a pythonista, and what little I know about Python for data work amounts to a few published recipes. Out of curiosity, I sometimes re-do those recipes with the GNU/Linux tools I use every day. Below are three such re-doings from Python 2.7 (default on my Debian 10 system, but soon to reach end-of-life).

    Please note that this post isn't meant to be a "which is best?" contest between Python and shell tools. Each world of commands has its pro's and con's, and Python users have access to a large number of general and specialised data-processing tools. Personally, I like the versatility of shell tools and command chains, and I like AWK's speed and flexible syntax (as readers of this blog will know).

  • KDevelop - possibly new release coordinator

    After many days and weeks of thinking and waiting for better person to appear (nobody appeared) I decided to take the initiative (it took a lot) and try my luck at becoming new KDevelop release coordinator.

    My reasoning as I mentioned in my mail is that if there was someone better for the job the position would be filled by now. And I wish for KDevelop to be a healthy project which can rival those monsters like MSVS, NetBeans, Eclipse, Atom, MSVC…

  • Modernizing Java to keep pace in a cloud-native world

    Java is no spring chicken and some are even referring to it as a “vintage language”. Despite its popularity, there are some complaints about it. In our new cloud-native world, why does Java need to evolve? In order to evolve to keep up with modern, cloud-native apps, Java needs to keep all of what makes it so dependable, while also being able to function in new app environments.
    Don’t worry, you are not the only one who feels old when you hear Java being described as a “vintage” programming language. While Java has been around since 1995, it is certainly not ready to retire (or rather, be retired), and continues to rank among the top languages TIOBE index. In fact, no other language has been so popular for so long.

    However, it is not without its issues, including sometimes being too clunky to keep up with some of the newer programming languages, not agile and flexible enough to work in this new world of containers, and not really relevant in applications that are not coded to be Java first. While they say you can’t teach an old dog new tricks, you can rethink how it performs what they already know.

Yocto-based Torizon distro adds OTA updater

Filed under
Development
GNU
Linux
Hardware

Toradex has released an experimental version of an OTA updater for its new Torizon embedded Linux distribution. Torizon OTA offers fault-tolerant features and supports web-based remote management including grouping of devices into fleets.

Read more

Programming: Python and Wasm

Filed under
Development
  • Python Anywhere: System update on 21 November 2019

    This morning's system update went smoothly; some websites did take a bit longer than we expected to start up afterwards, but all is well now.

    There are two big new features that we have introduced which are going through some final post-deploy tests before they go live -- a new system image (called fishnchips) to support Python 3.8 and to add on a number of extra OS packages that people have been asking us for, and an update to our virtualization system that will fix a number of problems with specific programs. We'll be posting more about those when they're ready to go live.

  • PyCharm 2019.3 Release Candidate

    The release of PyCharm 2019.3 is right around the corner and we’re excited to announce we now have available a release candidate version. Check it out by downloading it from our website!

  • #11 Ways How To Make Home Education More Effective

    As you can see, in order to get things done, you have to actually start doing something and be creative at that. We’ve presented those points that we believe can be the most beneficial when attempting home education. But these are more like preferable advice rather than strict rules to success. Find something that suits you and work around it. We believe that anyone with enough desire to try can achieve great things!

  • Punch 2.0.0 is out

    This is the latest release of the project that I started to replace bumpversion. Update your version while having a drink!

    Punch is a configurable version updater, and you can use to automate the management of your project’s version number.

  • Navigating Python Code with Wing Pro 7 (part 2 of 3)

    Last week we looked at goto-definition, find uses, and project-wide search as tools for navigating Python code in Wing 7. This time, we'll take a look at the code indices that Wing provides.

  • Multi-Value All The Wasm!

    There are a few scenarios where compilers are forced to jump through hoops when producing multiple stack values for core Wasm. Workarounds include introducing temporary local variables, and using local.get and local.set instructions, because the arity restrictions on blocks mean that the values cannot be left on the stack.

    Consider a scenario where we are computing two stack values: the pointer to a string in linear memory, and its length. Furthermore, imagine we are choosing between two different strings (which therefore have different pointer-and-length pairs) based on some condition. But whichever string we choose, we’re going to process the string in the same fashion, so we just want to push the pointer-and-length pair for our chosen string onto the stack, and control flow can join afterwards.

Programming Leftovers

Filed under
Development
  • Faster Winter 4: Export lists

    Without an export, the compiler has to assume that every top-level function can possibly called from the outside, even functions that you think of as “internal”. If you have a function that you do not export, like instr, step_work and step after my change, the compiler can see all the places the function is called. If the function is only called in one place, it may inline it (copy its definition into where it is called), and simplify the code around the edges. And even if it does not inline the function, it might learn something about how the functions are used, and optimize them based on that (e.g. based on Demand Analysis).

  • Ondřej Holý: How to call asynchronous function synchronously

    GLib provides a lot of asynchronous functions, especially to deal with I/O. Unfortunately, some functions don’t have synchronous equivalents and the code has to be split into several callbacks. This is not handy in some cases. My this year’s GSoC student recently asked me whether it is possible to create synchronous function from asynchronous. He is currently working on test suite and don’t want to split test cases into several callbacks. So I decided to write a blog spot about as it might be handy for more people.

  • Sort list alphabetically with python

    You will be given a vector of string(s). You must sort it alphabetically (case-sensitive!!) and then return the first value.

    The returned value must be a string and have “***” between each of its letters.

    You should not remove or add elements from/to the array.

    Above is another problem in codewars, besides asking us to sort the array list and returning the first value in that list, we also need to insert stars within the characters.

  • Abolishing SyntaxError: invalid syntax ...

    Do you remember when you first started programming (possibly with Python) and encountered an error message that completely baffled you? For some reason, perhaps because you were required to complete a formal course or because you were naturally persistent, you didn't let such messages discourage you entirely and you persevered. And now, whenever you see such cryptic error messages, you can almost immediately decipher them and figure out what causes them and fix the problem.

    Congratulations, you are part of an elite group! Even a large number of people who claim that they can program are almost certainly less capable than you are.

    Given your good fortune, would you mind donating 5 to 10 minutes of your time to help countless beginners that are struggling in trying to understand Python error messages?

  • Is it too late to integrate GitOps?

    The idiom “missed the boat” can be used to describe the loss of an opportunity or a chance to do something. With OpenShift, the excitement to use this new and cool product immediately may create your own “missed the boat” moment in regards to managing and maintaining deployments, routes, and other OpenShift objects but what if the opportunity isn’t completely gone?

    Continuing with our series on GitOps (LINK), the following article will walk through the process of migrating an application and its resources that were created manually to a process in which a GitOps tool manages the assets. To help us understand the process we will manually deploy a httpd application. Using the steps below we will create a namespace, deployment, and service and expose the service which will create a route.

Python Programming Leftovers

Filed under
Development
  • Python Bytes Episode #157: Oh hai Pandas, hold my hand?

    Data validation and settings management using python type annotations.

  • Simulate gravity in your Python game

    The real world is full of movement and life. The thing that makes the real world so busy and dynamic is physics. Physics is the way matter moves through space. Since a video game world has no matter, it also has no physics, so game programmers have to simulate physics.

    In terms of most video games, there are basically only two aspects of physics that are important: gravity and collision.

    You implemented some collision detection when you added an enemy to your game, but this article adds more because gravity requires collision detection. Think about why gravity might involve collisions. If you can't think of any reasons, don't worry—it'll become apparent as you work through the sample code.

    Gravity in the real world is the tendency for objects with mass to be drawn toward one another. The larger the object, the more gravitational influence it exerts. In video game physics, you don't have to create objects with mass great enough to justify a gravitational pull; you can just program a tendency for objects to fall toward the presumed largest object in the video game world: the world itself.

  • How to document Python code with Sphinx

    Python code can include documentation right inside its source code. The default way of doing so relies on docstrings, which are defined in a triple quote format. While the value of documentation is well... documented, it seems all too common to not document code sufficiently. Let's walk through a scenario on the power of great documentation.

    After one too many whiteboard tech interviews that ask you to implement the Fibonacci sequence, you have had enough. You go home and write a reusable Fibonacci calculator in Python that uses floating-point tricks to get to O(1).

Syndicate content

More in Tux Machines