Language Selection

English French German Italian Portuguese Spanish

Development

Programming Leftovers

Filed under
Development
  • This Week In Rust: This Week in Rust 406
  • Dirk Eddelbuettel: RQuantLib 0.4.13: Routine Update

    A new release 0.4.13 of RQuantLib arrived on CRAN yesterday, and has been uploaded to Debian as well.

    QuantLib is a very comprehensice free/open-source library for quantitative finance; RQuantLib connects it to the R environment and language.

    This updates RQuantLib to a few now-deprecated (daycount convention) interfaces in QuantLib release 1.23. As the last release was sixteen months ago, we also updated a few standard packaging aspects (such as use of r-ci), updated README.md and DESCRIPTION and fixed an old typo. No other changes, no new interfaces.


  • Dirk Eddelbuettel: RcppSMC 0.2.4 on CRAN: Even More GSoC !!

    A brand new release 0.2.4 of the RcppSMC package arrived on CRAN earlier today, with a dual delay for CRAN closing for a well-earned break, and then being overwhelmed when reopening. Other than that the processing was again versy smooth.

    RcppSMC provides Rcpp-based bindings to R for the Sequential Monte Carlo Template Classes (SMCTC) by Adam Johansen described in his JSS article. Sequential Monte Carlo is also referred to as Particle Filter in some contexts.

  • What's new in QML Tooling in Qt 6.2?
  • Opening doors: Eclipse Foundation

    As you probably know by now, the Eclipse Foundation has become an European non-profit organization and they are strengthening their team in Europe. The organization reach has always been global including a team in Europe, but this formal movement means that there is now a solid Open Source organization to host collaboration projects created by corporations and companies for commercial purposes, under EU laws, which has interesting implications at different levels.

    After contributing to KDE and being part of its Board of Directors, working at ASOLIF (Spanish trade federation of associations of FOSS companies) as executive, being a line manager at Linaro, leading the GENIVI distribution as supplier or contributing to different initiatives at the Linux Foundation as member representative, being part of one of the most relevant organizations that provides a neutral environment to different type of organizations helping to create and consolidate projects is very appealing to me.

Programming Leftovers

Filed under
Development

  • GCC 12 Looking At Enabling Its Vectorizer For "-O2" Optimization Level - Phoronix

    The GCC compiler when using the default "-O2" optimization level is likely to be slightly faster with next year's GCC 12 release as the developers are looking at enabling the vectorizer options by default.

  • 8 Ways to Check if a File Exists Using Python

    Python’s dependency on external files is a crucial aspect, it's wise to pay heed to the base/source files before executing any code. Before running a particular program, you need to ensure your source files exist at the specified location.

    Every developer understands the need to create fall back codes, which can save a prorgram from failing in the case that a condition isn't met. In Python, there are several ways to check if a file exists; here are the top methods you should know about.

  • Banner Grabber
  • How to check if a string contains another string in JavaScript

    Checking if a string contains a word is a common task in any programming language. In JavaScript there are several ways to check whether a string contains a word or a substring.

Programming Leftovers

Filed under
Development

  • Qt 6.2 vs. Qt 5.15 – The Feature Parity Comparison

    The Qt Company recently compared the latest Long Term Releases Qt 5.15 and Qt 6.2 of its software development platform consisting of design, development, and quality assurance applications plus various software libraries, referred to in this post as modules. This blog post, intended particularly for product and R&D leaders, summarizes the main findings of the comparison.

    Comparing two major releases is never trivial, especially when there are eight years between their initial releases, the comparison highlights that there is enough feature parity for most customers to move to the Qt 6.2 LTS release., It’s important to stress that we at Qt have been laser-focused on providing Qt 6 with as much source compatibility as feasible. In addition, Qt projects can find plenty of resources in the Qt online documentation helping with the source code migration. We also offer professional services helping with the transition to Qt 6.

  • Qt 6.2 LTS Will Nearly Be At Feature Parity To Qt 5.15 - Phoronix

    When the Qt 6.0 tool-kit debuted last year much of the early criticism stemmed around it not having all the modules/functionality ported over from Qt5 meanwhile The Qt Company was restricting newer Qt 5.15 LTS point releases to paying customers only. Since then the developers have been working to address the voids in Qt6 and with the upcoming Qt 6.2 as their next long-term support release, all of the important functionality should be in place.

    The Qt Company is sharing that for Qt 6.2 LTS, it should effectively be at feature parity to Qt 5.15 LTS. There still is some missing modules and other functionality not directly ported over from Qt 5.15, but those missing elements appear to be for unpopular items that might not have any users or at least ones visible to The Qt Company.

  • Josef Strzibny: Deployment from Scratch, 1st edition is released!

    Today, I am releasing Deployment from Scratch, 1st edition. It was a long journey of more than three years, and it’s time to make it a reality. Of course, I could always do a one more read and rewrite a paragraph or two, but it’s just as important to stop at some point and let the world benefit from all that work.

  • Fortran newsletter: September 2021

    Welcome to the September 2021 edition of the monthly Fortran newsletter. The newsletter comes out at the beginning of every month and details Fortran news from the previous month.

Python Programming

Filed under
Development
  • Object Oriented Programming In Python

    Object-Oriented Programming is a fundamental programming paradigm based on the concepts of objects and classes that can perform certain operations through their methods. We'll get into more details about OOP in this notebook.

  • Numpy Matrix Multiplication 

    In this post, we will see how to perform matrix multiplication using NumPy. Input parameters for numpy matrix multiplication are two array-like objects (it can be a numpy ndarray or python lists as well), and it produces the product of two matrices as output. Performing matrix multiplication on NumPy arrays is more efficient than performing matrix multiplication on python lists.

    Let’s start by importing NumPy and performing a simple matrix multiplication using NumPy’s matrix multiplication np.matmul.

  • Reproducible Python Bytecode

    Some Linux distributions (like Alpine and Arch Linux) are shipping something called “python bytecode” in their packages. It’s stored in .pyc files and is generated during the package build. They’re stored in __pycache__ folders and can be seen here:

Mozilla and Programming Leftovers

Filed under
Development
  • Mozilla Security Blog: Mozilla VPN Security Audit

    To provide transparency into our ongoing efforts to protect your privacy and security on the Internet, we are releasing a security audit of Mozilla VPN that Cure53 conducted earlier this year.

  • Spidermonkey Development Blog: TC39 meeting, July 13-16 2021

    In this meeting, the Realms proposal finally moved forward to stage 3. The form it will take is as what is now called “isolated realms”. This form does not allow direct object access across the realm boundary (which you can do with iframes). To address this, a new proposal is being put forward titled getOriginals.

    Beyond that, the ergonomic brand checks proposal moved to stage 4 and will be published in the next specification. Intl.Enumeration also finally moved to stage 3 and implementers have started working on it.

    A feature that developers can look forward to experimenting with soon is Array find-from-last. This will enable programmers to easily search for an element from the end of a collection, rather than needing to first reverse the collection to do this search.

  • Rakudo Weekly News: 2021.35 Superseding

    Steve Roe opened an issue in the raku.land repository: My modules are Duplicates. It describes the tricky issue the Raku ecosystem is facing in light of the migration of modules between different “repository backends”. There are currently three of them: the original git-based ecosystem, the modules uploaded to CPAN (with PAUSE), and modules uploaded to the zef repository backend (with fez) (/r/rakulang comments). This will most likely need some more careful thought in a problem solving issue.

    [...]

    All of the core developments of this week are either directly or indirectly a result of the extensive work that is being done on the new-disp branch, which is focussing more and more on making things faster, than making things work again!

  • Cryptography with Python

    Cryptography, the science of ciphers, is made real with the help of coding. We cannot decide a programming language to be better or worse than another. However, the selection of an appropriate cryptography library makes all the difference.

    Python provides some very sophisticated libraries and modules for encryption and decryption of the data. Some of them are Cryptography, hashlib, Simple-Crypt, etc. The article demonstrates the use of modern cryptographic practices in Python with the help of the cryptography library by illustrating how to encrypt and decrypt text strings and files.

  • How to Change the Working Directory in Python

    A working directory is a current directory in which we are working and from which the script is run; within this directory, we have access to many files (the ones located within it). However, we sometimes need to change directories and go back and forth between files and folders. In this tutorial, we will learn how to change the working directory in Python.

Shell/Bash Programming

Filed under
Development
  • Bash Remove Last x Characters From String

    One might have to delete letters from either a string sometimes. Just what the case may be, Linux includes several built-in, useful tools for removing letters form such a text in Bash. This article demonstrates how to delete letters from either a string using those methods. In this post, the instructions were run on Ubuntu 20.04 Focal Fossa. The very same instructions may be run on any Linux system that has the utilities mentioned above installed. To execute the instructions, we’ll utilize the usual Terminal. The Ctrl+Alt+T shortcut will open the Terminal tool.

  • What Set –e do in Bash?

    Set –e is used within the Bash to stop execution instantly as a query exits while having a non-zero status. This function is also used when you need to know the error location in the running code. Let’s continue the article to elaborate on the concept of “set –e” in different aspects of codes.

    Install Bash extensions in Linux. If it is already installed, then you need to upgrade the version because the version must be above 4.

  • How do I Sleep in a Bash Script?

    When you create your Bash scripts, their functionality is such that you have to wait for some function within it to complete its processing before proceeding further. The wait within a Bash script is introduced with the “sleep” command. The sleep command in Bash allows you to wait for as long as you want before doing any further processing. This functionality finds a special use case while dealing with clients and servers in Linux.

    Multiple clients can connect to a single server depending upon its request handling capacity in a client-server model. A client always initiates a connection request, whereas a server listens to this request. However, at times, a server might be busy processing other requests. Therefore, there should be a time duration defined for the client for which that client should wait before canceling the connection initiation request. This time duration can be defined while making use of the sleep command.

    This was just a simple use case of the sleep command with the client-server model; however, this command can also serve other different purposes within this model. Our motive is to learn how we can sleep in a Bash script in Ubuntu 20.04. For doing that, we have designed this tutorial so that you will get the maximum benefit out of it once you follow the examples shared in it.

  • How Do You Escape a Single Quote in Bash?

    Sometimes, the scripts are written in such a dynamic manner that even the programmer does not know exactly how many arguments will be provided by the user at runtime, but he might want to use that total number somewhere later in that script. How to check the Number of Arguments in Bash is explained in this article.

  • How Do You Check the Number of Arguments in Bash?

    You can provide any desired number of command-line arguments to your Bash scripts in Ubuntu 20.04 while executing them. However, sometimes the scripts are written in such a dynamic manner that even the programmer does not know exactly how many arguments will be provided by the user at runtime, but he might want to use that total number somewhere later in that script.

    In this situation, there must be a way through which you can check the total number of arguments passed to any particular Bash script. For that, Bash has a special variable, i.e., $#. To figure out how this special variable works, you will have to go through all the examples shared in this article.

  • How Do I Count the Number of Lines in a File in Bash?

    In any code or a program, sometimes such a situation exists where we need to know how big the data of the filefile’s data is. We can get this through the number of lines of a file, instead of consulting the whole data. Counting the lines manually can consume a lot of time. So these tools are used, that ease us with our desired output. In this guide, wThis guide will cover some common and uncommon ways to count the line number in a file.

Programming Leftovers

Filed under
Development

  • Bash declare an empty array

    An array is a container that stores the values of a similar data type. The storage process deals with entering the values at any index of the array, and the index of the array accesses that value. Whenever you declare an array, you have two options. Either assign the values at the time of declaration or enter the values when they are needed dynamically. In this guide, we have experienced both approaches. To perform this function in bash, you need to create an environment of the Linux operating system where you can access the terminal and other applications of user privileges.

    To perform operations on array in bash, you need to install bash on Linux operating system. By installing the packages, it is already installed in the system. The version of bash should be greater than 4 to continue this guide further. If it is less than 4, you need to install the latest bash version or at least 4. Execute the command on the Linux terminal to check the version.

  • Bash loop through files in a directory

    In Ubuntu, including Bash, loops have made it possible to apply operations on multiple files. Looping is the most effective thing as it allows the user to apply the same logic to the item repeatedly by using a small code-line.

    To understand the concept of looping over files in the directory, you need access to the Ubuntu application and services. When you have some privileges, you can only operate with files and directories.

    You should have installed Bash on Ubuntu operating system. In some installations, it is installed by default in the updation of packages. If it is already installed, you need to upgrade the version because it must be above 4. To continue the current guide, you need to keep the version above 4. To check the version of the pre-installed Bash in your system, use the command on the Ubuntu terminal.

  • Bash print array with newlines

    An array is a container containing the same data type items, either integer type or float type. We can deal with arrays by performing several operations on them. One commonly used Delima is to break the array and print each word on a new line. This feature is discussed in today’s article. To understand this concept, you need to access a Ubuntu terminal to perform bash-related terms on Ubuntu. We have covered the topic from simplest to critical samples for the understanding of the user.

  • Pyston Team Joins Anaconda

    We have some very exciting news to announce today: we (Marius and Kevin) are joining Anaconda! Anaconda is a well-known company that produces open-source Python software, and we think that by joining them we can significantly accelerate the trajectory of Pyston, our faster implementation of Python.

  • Pyston Developers Join Anaconda To Continue Their Speedy Python Implementation

    Pyston began many years ago as an open-source JIT-based Python implementation developed by Dropbox. But after Dropbox dropped Pyston development, it went dormant for several years before the developers decided to create their own start-up around it and released Pyston 2.0. The Pyston developers are now joining well known Python organization Anaconda.

  • JavaScript Loops – A Guide for Absolute Beginners

    n computing, almost all programming languages support the idea of loops. In computing, loops are a set of instructions that allow the programmer to do something repeatedly in a quick and efficient manner. Loops iterate/repeatedly execute through a block of code until a certain condition is met.

    All high-level programming languages provide several different types of loops. The syntax of these loops may be different but they are used to perform the same tasks. These loops are interchangeable but some are specifically built to be used in some specific conditions.

  • A Candid explainer: Safe higher-order upgrades – Blog – Joachim Breitner's Homepage

    A central idea behind Candid is that services evolve over time, and so also their interfaces evolve. As they do, it is desirable to keep the interface usable by clients who have not been updated. In particular on a blockchainy platform like the Internet Computer, where some programs are immutable and cannot be changed to accommodate changes in the interface of the services they use, this is of importance.

    Therefore, Candid defines which changes to an interface are guaranteed to be backward compatible. Of course it’s compatible to add new methods to a service, but some changes to a method signature can also be ok.

  • Guide to C++ Serialization

    Serialization converts an object into a stream of bytes to be stored in the disk or sent to another computer through a network. There are two kinds of objects in C++: fundamental objects and objects instantiated from a defined class. Note, in C++, the struct is considered a class, and the name of a struct represents the instantiated object of the struct.

    Individual fundamental objects are not normally serialized. However, since an instantiated object has fundamental objects, as the whole object is serialized, the fundamental objects are also serialized. In C++, all data structures, such as the vector, are predefined classes.

    Serialization is also called marshaling. The opposite of serialization is deserialization or unmarshalling. The serialized object as a file from the disk or the network can be converted back (resurrected) to the object at the local computer to be used with the local C++ application (program).

  • How to Use C++ fstream

    The fstream term stands for File Stream. Stream refers to a sequence of characters moving from the disk to the C++ program or from the C+ program to the disk. Moving characters from a file in disk to the program is inputting. Moving characters from the program to a file in the disk is outputting. Input-file-stream abbreviated as ifstream is structured by the template class, basic_ifstream. Output-file-stream abbreviated, ofstream is structured by the template class, basic_ofstream.

    It is possible for inputting and outputting to take place in one session. This is made possible by the class template, basic_fstream. Now, fstream is a synonym for basic_fstream. fstream, which is still basic_fstream, uses basic_ifstream and ofstream to operate.

kstart 4.3

Filed under
Development

kstart provides the programs k5start and krenew, which are similar to the Kerberos kinit program with some extra support for running programs with separate credentials and running as a daemon.

This is the first full release in nearly six years. The major change is new support for the Linux kafs module, which is a native Linux implementation of the AFS protocol that David Howells and others have been working on for years. It has an entirely different way of thinking about tokens and credential isolation built on Linux keyrings rather than the AFS token concept (which sometimes uses keyrings, but in a different way, and sometimes uses other hacks).

Read more

Programming Leftovers

Filed under
Development
  • Magicbit is a wire-free, modular STEM education platform (Crowdfunding) - CNX Software

    Magicbit board joins other ESP32 platforms for the STEM education market such as the Crowbits Master Kit or ESP32-based Micro:bit clones with visual programming and Arduino and/or MicroPython support, a mobile app, and training materials such as project tutorials and online courses.

    Magicbit is designed to be wire-free with the hexagonal board offering four module’s connectors, an OLED display, buttons, a buzzer, and more. You can still use cables if you’d like with six crocodile clip holes and an expansion connector.

  • Write a guessing game in ncurses on Linux | Opensource.com

    If you’d like to explore a more advanced program that demonstrates a few of these interesting features, here’s a simple “guess the number” game, updated to use ncurses. The program picks a random number in a range, then asks the user to make repeated guesses until they find the secret number. As the user makes their guess, the program lets them know if the guess was too low or too high.

    Note that this program limits the possible numbers from 0 to 7. Keeping the values to a limited range of single-digit numbers makes it easier to use getch() to read a single number from the user. I also used the getrandom kernel system call to generate random bits, masked with the number 7 to pick a random number from 0 (binary 0000) to 7 (binary 0111).

  • Vulkan 1.2.190 Released With SPIR-V Integer Dot Product Support - Phoronix

    Vulkan 1.2.190 resolves several issues with the specification, but most exciting with this routine Vulkan API update is the introduction of two new extensions.

    The extensions introduced with Vulkan 1.2.190 are VK_KHR_shader_integer_dot_product and VK_EXT_primitive_topology_list_restart.

Modding and Programming Leftovers

Filed under
Development
  • Keep track of your ride with a custom bike speedometer | Arduino Blog

    Over on element14, Katie had been wanting to go for a short bike ride after finally getting it fixed. But she encountered a problem: the previously mounted speedometer had lost its display unit, meaning the entire thing was now useless. Rather than simply buying a new one, she had the idea to put together a DIY version that relies on GPS instead of counting wheel rotations to keep track of the current speed.

    Component-wise, only a few modules were required to build this device. First was an Arduino Nano 33 IoT that handled communication and power between the screen and GPS module. Next was a GPS3 Click Board, which contains one of Quectel’s L80 GPS modules that provides accurate tracking information in a small form factor. Finally, a small 1.3” circular LCD was chosen due to its pixel density, integrated touch controller, and ease-of-use. Everything was assembled into a custom-designed and 3D-printed housing that fits neatly over the bike’s handlebars and features an area to store a USB battery bank.

  • Miniature line scan smart camera for embedded applications

    It supports the Linux Debian 10 OS and ViewIT software framework from IMAGO. ViewIT handles image acquisition and I/O handling among other tasks. Python, C++ based tools, and Halcon plugins are easy to integrate with the software framework.

  • Analyzing Big Data with grep and awk

    The Cloud has many features of a large, distributed, and very hard to use computer. The Cloud indeed offers to manage storage and compute resources for us. Great! But these gems are hidden behind a mess of APIs and YAML. The Cloud is sadly quite unlike the beautiful simplicity of UNIX.

    What would a “UNIX way” be for such a Cloud computer? UNIX pipelines are a proven way to handle large amounts of data. After all, this approach of streaming through data with simple and composable utilities was designed precisely for the situation where input size greatly exceeds available local memory. Sounds familiar!

  • Parallel Grep and Awk

    Now I’ll use this to do something useful: count the occurrence of each of the $O(10^7)$ features in the training file. I’ll use a map-reduce pattern. In the map phase I’ll run “feature_count.awk” with the following contents.

  • I Summarized 100+ Command-Line Tools for Data Scientists in 15 Minutes

    A command-line interface is a program that processes commands to a computer program in the form of lines of text. In this awesome article, I will introduce 100+ command-line tools used popularly in Data Science.

  • GNU Linux – how to – kvm-qemu port forwarding – how to forward host-port to guest-vm in NAT networking mode
Syndicate content

More in Tux Machines

Type Title Author Replies Last Postsort icon
Story Kernel: BOLT, OpenZFS, and Latency-Related Work Roy Schestowitz 25/09/2021 - 7:16pm
Story Firefox and Hardware Acceleration on Linux Roy Schestowitz 25/09/2021 - 7:14pm
Story What Is GNU/Linux? Roy Schestowitz 1 25/09/2021 - 6:56pm
Story Steam Deck/Arch Linux Latest Roy Schestowitz 25/09/2021 - 6:37pm
Story How to Install Enlightenment Desktop in Arch Linux [Complete Guide] arindam1989 25/09/2021 - 6:25pm
Story Growth of the Fedora Distribution over time Rianne Schestowitz 25/09/2021 - 6:11pm
Story Cross Compile to PinePhone Part Three Rianne Schestowitz 25/09/2021 - 5:52pm
Story Programming Leftovers Roy Schestowitz 7 25/09/2021 - 5:07pm
Story today's leftovers Roy Schestowitz 25/09/2021 - 4:46pm
Story Open Hardware/Modding Leftovers Roy Schestowitz 25/09/2021 - 4:43pm