Open-source News

Linux Patches Posted For Enabling The Aquacomputer Aquaero

Phoronix - Tue, 12/20/2022 - 18:42
Over the past year we've seen a fair amount of work for enabling support for various Aquacomputer devices under Linux. The German parts vendor specializes in various PC cooling solutions and other cooling accessories that can be monitored and managed under Linux thanks to this open-source driver work...

Intel Releases oneDNN 3.0 In Advance Of Sapphire Rapids

Phoronix - Tue, 12/20/2022 - 18:14
Intel overnight released oneDNN 3.0 as the newest major release to this open-source project for assisting in building deep learning applications. This oneAPI software component can already be used by PyTorch, ONNX, MATLAB, and other prominent software while the v3.0 release prepares it for future Intel hardware...

How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command

Tecmint - Tue, 12/20/2022 - 16:24
The post How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

When making backups, and copying/moving large files on your Linux system, you may want to monitor the progress of an ongoing operation. Many terminal tools do not have the functionality to allow you to

The post How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

How I use Artipie, a PyPI repo

opensource.com - Tue, 12/20/2022 - 16:00
How I use Artipie, a PyPI repo olena Tue, 12/20/2022 - 03:00

While developing with Python as a student, I found that I needed some private centralized storage. This was so I could store binary and text data files, as well as Python packages. I found the answer in Artipie, an open source self-hosted software repository manager.

At university, my colleagues and I conducted research and worked with a lot of data from experimental measurements. I used Python to process and visualize them. My university colleagues at the time were mathematicians and didn't have experience with software development techniques. They usually just passed data and code on a flash drive or over email. My efforts to introduce them to a versioning system like Git were unsuccessful.

Python repository

Artipie supports the PyPI repository, making it compatible with both twine and pip. This means you can work with the Artipie Python repository exactly as you would when installing or publishing packages on the PyPI and TestPyPI repositories.

To create your own Python repository, you can use the hosted instance of Artipie called Artipie Central. Once you sign in, you see a page with your repositories listed (which is empty to begin with) and a form to add a new repository. Choose a name for your new repository (for example, mypython), select "Python" as the repository type, and then click the Add button.

Next, you see a page with repository settings in the YAML format:

---
​repo:
  type: pypi
  storage: default
  permissions:
    olenagerasimova:
     - upload
    "*":
     - download

The type mapping in the configuration sets the repository type. In this example, the Python repository is configured with the default Artipie Central storage.

The storage mapping defines where all of the repository packages are stored. This can be any file system or S3 storage compatible location. Artipie Central has a preconfigured default storage that can be used for tests by anyone.

The permissions mapping allows uploads for the user olenagerasimova, and allows anyone to download any package.

To make sure this repository exists and works, open the index page in your browser. The packages list is displayed. If you've just created a new repository but have yet to upload a package, then the repository index page is blank.

Binary repository

You can store any kind of file in Artipie. The storage type is called file or binary, and I use this as storage for experimental data. I use this as input for Python visualizations. A file repository can be created in Artipie Central the same way as a Python repository. You give it a name, choose the type binary, and then click the Add button.

---
​repo:
  type: file
  storage: default
  permissions:
    olenagerasimova:
     - upload
      - download
    "*":
     - download

The settings are basically the same as for Python. Only the repository type differs. The binary repository, in this example, is called data. It contains three text files with some numbers:

​6
3.5
5
4
4.5
3
2.7
5
6
3
1.2
3.2
6

The other two files take the same form (only the numbers are different.) To see the files yourself, open the links one, two, and three in your browser and download the files, or you can perform a GET request using httpie:

​httpie -a https://central.artipie.com/olenagerasimova/data/y1.dat > ./data/y1.da

These files were uploaded to the Artipie Central data repository with PUT requests:

​httpie -a olenagerasimova:*** PUT https://central.artipie.com/olenagerasimova/data/y1.dat @data/y1.dat

httpie -a olenagerasimova:*** PUT https://central.artipie.com/olenagerasimova/data/y2.dat @data/y2.dat

httpie -a olenagerasimova:*** PUT https://central.artipie.com/olenagerasimova/data/y3.dat @data/y3.dat

As this binary repository API is very simple (HTTP PUT and GET requests), it's easy to write a piece of code in any language to upload and download the required files.

More Python resources What is an IDE? Cheat sheet: Python 3.7 for beginners Top Python GUI frameworks Download: 7 essential PyPI libraries Red Hat Developers Latest Python articles Python project

The source code of an example Python project is available from my GitHub repository. The main idea of the example is to download three data files from Artipie Central, read the numbers into arrays, and use these arrays to draw a plot. Use pip to install the example package and run it:

​$ python3 -m pip install --index-url \
https://central.artipie.com/olenagerasimova/pypi/ \
pypiexample
$ python3 -m pypiexample

By setting the --index-url to the Artipie Central Python repository, pip downloads the packages from it rather than the PyPi repository that serves as the usual default. After running the commands, a polar plot with three curves, a visualization of the data files is displayed.

To publish the package to the Artipie Central repository, build it with and use twine to upload it:

commandline
$ python setup.py sdist bdist_wheel

$ twine upload --repository-url \
https://central.artipie.com/olenagerasimova/pypi
-u olenagerasimova -p *** dist/*

That's how easy it is to set up a files repositories in Artipie Central, create a sample Python project, publish, and install it. You don't have to use Artipie Central, though. Artipie can be self-hosted, so you can run a repository on your own local network.

Run Artipie as a container

Running Artipie as a container makes setup as easy as installing either Podman or Docker. Assuming you have one of these installed, open a terminal:

​$ podman run -it -p 8080:8080 -p 8086:8086 artipie/artipie:latest

This starts a new container running the latest Artipie version. It also maps two ports. Your repositories are served on port 8080. The Artipie Rest API and Swagger documentation are provided on port 8086. A new image generates a default configuration, printing a list of running repositories, test credentials, and a link to the Swagger documentation to your console.

You can also use the Artipie Rest API to see existing repositories:

  1. Go to the Swagger documentation page at http://localhost:8086/api/index-org.html.

  2. In the Select a definition list, choose Auth token

  3. Generate and copy the authentication token for the user artipie with the password artipie

  4. Switch to the Repositories definition and click the Authorize button, and then paste in the token

Image by:

(Seth Kenlon, CC BY-SA 4.0)

 

Perform a GET request for /api/v1/repository/list. In response, you receive a JSON list with three default repositories:

 

​[ "artipie/my-bin", "artipie/my-docker", "artipie/my-maven" ]

The Python repository isn't included in the default configuration. You can correct that by performing a PUT request to /api/v1/repository/{user}/{repo} from the  Swagger interface. In this case, user is the name of the default user (artipie) and repo is the name of the new repository. You can call your new Python repository my-pypi. Here's an example request body, containing a JSON object with the repository settings:

​{ "repo": { "type": "pypi", "storage": "default", "permissions": { "*": [ "download" ], "artipie": [ "upload" ] } } }

All the JSON fields are the same as when you create a repository in the dashboard in YAML format. The type of our repository is pypi, the default storage is used, and anyone can download but only the user artipie can upload.

Make a GET request to /api/v1/repository/list again to make sure your repository was created. Now, you have four repositories:

​[ "artipie/my-bin", "artipie/my-docker", "artipie/my-maven", "artipie/my-pypi" ]

You've created your own Artipie installation, containing several repositories! The Artipie image can run both on a personal computer or on a remote server inside a private network. You can use it to exchange packages within a company, group, or university. It's an easy way to set up your own software services, and it's not just for Python. Take some time to explore Artipie and see what it can make possible for you.

Artipie is an open source self-hosted software repository manager that can be used for much more than just Python.

Image by:

WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0

Python Containers What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Explore the features of the Linux Double Commander file manager

opensource.com - Tue, 12/20/2022 - 16:00
Explore the features of the Linux Double Commander file manager sethkenlon Tue, 12/20/2022 - 03:00

Double Commander is a graphical dual-pane file manager for Linux, in the tradition of Midnight Commander (mc). While Midnight Commander (like the DOS application Norton Commander before it) has its fans, its audience is limited by the fact that it only runs in a terminal window. Not everyone wants to use a "flat" interface embedded in a terminal to browse their file system, and so Double Commander provides a similar interface in a way that feels familiar to many desktop users.

Image by:

(Seth Kenlon, CC BY-SA 4.0)

Install Double Commander

To install Double Commander, visit its website and download a package. It's not packaged for a specific Linux distribution, so just download an archive for your CPU architecture.

If you only want to try it out, you can unarchive it and then launch it from your Downloads folder.

To install it permanently, unarchive the package, move it into a location in your path, and then symlink doublecmd to the executable in the source directory:

$ tar xvf doublecmd*tar.xz
$ mv doublecmd ~/.local/bin/doublecmd-X.Y.Z
$ ln -s ~/.local/bin/doublecmd-X.Y.Z/doublecmd ~~/.local/bin/doublecmdHow to start Double Commander

To start Double Commander, use the command doublecmd.

Alternatively, you can add an entry for Double Commander in your application menu. First, create the file ~/.local/share/applications/doublecmd.desktop and enter this text into it:

[Desktop Entry]
Encoding=UTF-8
Name=doublecmd
GenericName=Double Commander
Comment=doublecmd
Exec=../bin/doublecmd
Icon=/usr/share/icons//Adwaita/scalable/apps/system-file-manager-symbolic.svg
Terminal=false
Type=Application
Categories=System;FileTools;Utility;Core;GTK;FileManager;

Now Double Commander appears in your desktop application menu. Note that this does not make Double Commander your default file manager. It only adds it as an application you can launch when you want to.

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles Two panels

Dual-panel file management is a tradition within a subset of file managers, and to some users it's a little unsettling. If you think about it, though, most file management tasks involve a source location and a destination location. You might be used to a workflow that goes something like this:

  1. Open a file manager and find a file you want to move.

  2. Open another file manager window and navigate to the folder you want to move the file into.

  3. Drag and drop the file from one window to the other.

You might use a variation of this involving, for instance, a right-click to copy combined with some navigation and another right-click to paste. Either way, the ingredients are the same. You locate the source, you locate the destination, and then you make the transfer.

Given that common factor, it makes sense that a file manager like Double Command has a persistent view of the source location and the destination location. At the very least, it saves you from having to open another window.

Double Commander interface

Once you get used to the idea of two concurrent views in your file system, there are a lot more features to discover in Double Commander.

  • Menu bar: At the top of the window is a menu bar. That's pretty standard conceptually, but the menu entries are probably unlike any menu bar you've seen before: File, Mark, Commands, Network, Tabs, and more. These are task-specific menus, which is great because you can ignore an entire submenu you don't use.

  • Toolbar: Under the menu bar, there are buttons for common tasks such as opening a terminal, copying a file, synchronizing two directories, and more.

  • Locations: The location bar is situated just under the toolbar. It lists devices and file system locations, including your boot partition, optical media drive, virtual shared locations, the root directory, your home directory (listed as ~), and more.

  • File list: Most of the Double Commander window is occupied by the dual panel view of your file system.

  • Command: My favorite feature of Double Commander is the single command field below the file list pane. This allows you to enter an arbitrary command to run within the active pane. This is great for the odd command you need to run in a directory that no file manager expects you to run, and so no file manager has a function for. It's the brute force method of the plugin model: Provide a command line and let users run what they need to run whenever they need to run it.

  • Functions: Along the very bottom of the Double Commander window, as with Midnight Commander, there's a list of common functions, each assigned to a Function key on your keyboard.

Using Double Commander

Using Double Commander is a lot like using any file manager, except that Double Commander is focused on groups of actions. For instance, the File menu isn't an obligatory entry with just New Window and New Tab, it's full of useful functions, like creating a symlink or hard link, changing attributes, comparing contents, bulk renaming, splitting and combining files, and more. Double Commander is direct. It gets straight to the point, serving as a stand-in for all the commands you'd normally run in a terminal.

Graphical command interface

More than any other file manager I've seen, Double Commander feels like it's meant to be a graphical interface for commands. You can map almost everything in its interface to a command or series of commands you're used to running in a terminal.

Of course, the question then is whether you need a graphical command line. Why not just run the commands in a terminal? Interestingly, I had the opportunity to witness the value of this recently. There are times, as a support person for other computer users, when trying to get a user to navigate the terminal can be overwhelming. This is particularly true when your user is texting on an app on their mobile phone, and you're giving them commands to type into a terminal on their desktop. This introduces several opportunities for mistakes, and what was meant to be "the fast way" of doing something ends up taking an hour.

It's counter-intuitive to a terminal user, and it's not even always true, but there are times when a graphical interface really is easier to give instructions for. Picture it: A zombie apocalypse rages outside your compound, and the file permissions of a vital file need to be changed in order to activate the firewall. "Open a terminal and type chmod a+x /usr/local/bin/foo…​no, that's ch as in change, mod as in mode but without the e…​no, and then a space. Not between the ch and the mod, just after the mod. And then a space. It's chmod and then a space. Not the word space, just press the spacebar. It's the really long key under your thumb…​"

Or you could just say this: "Click on the file, now with that selected, go to the File menu up at the top and click on Change Attributes…​"

Double Command's central feature is in its powerful features disguised as a non-threatening graphical file manager. Download and try it out for yourself.

Double Commander is a graphical dual-pane file manager for Linux

Image by:

opensource.com

Linux What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Progress – Show Percentage of Copied Data for (cp, mv, dd, tar) Commands

Tecmint - Tue, 12/20/2022 - 15:31
The post Progress – Show Percentage of Copied Data for (cp, mv, dd, tar) Commands first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Progress, formerly known as Coreutils Viewer, is a light C command that searches for coreutils basic commands such as cp, mv, tar, dd, gzip/gunzip, cat, grep, etc currently being executed on the system and

The post Progress – Show Percentage of Copied Data for (cp, mv, dd, tar) Commands first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

16 Best Microsoft Teams Alternatives For Linux

Tecmint - Tue, 12/20/2022 - 13:25
The post 16 Best Microsoft Teams Alternatives For Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Brief: In this guide, we explore the best Microsoft Teams alternatives for Linux that you can use to streamline your workflows and collaborate with your friends and colleagues. Microsoft Teams is one of the

The post 16 Best Microsoft Teams Alternatives For Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Arch Linux Powered EndeavourOS "Cassini" Brings Desktop & Arm Improvements

Phoronix - Tue, 12/20/2022 - 07:16
EndeavourOS continues to prove itself as one of the easiest-to-use, quick-to-install Arch Linux powered operating systems out there. Out today is the EndeavourOS "Cassini" update with more desktop enhancements as well as a number of Arm hardware support improvements...

Pages