File directory – Boom Directory http://boomdirectory.com/ Fri, 03 Dec 2021 17:24:47 +0000 en-US hourly 1 https://wordpress.org/?v=5.8 https://boomdirectory.com/wp-content/uploads/2021/08/cropped-icon-32x32.png File directory – Boom Directory http://boomdirectory.com/ 32 32 Craven County Superior Court Clerk Terri Sharp will run in 2022 https://boomdirectory.com/craven-county-superior-court-clerk-terri-sharp-will-run-in-2022/ Fri, 03 Dec 2021 11:11:06 +0000 https://boomdirectory.com/craven-county-superior-court-clerk-terri-sharp-will-run-in-2022/ Craven County Superior Court Clerk Terri Sharp has said she will stand for re-election in 2022 for a third term. Stopping the practice of law in 2012, entered the office of the clerk of the court by virtue of the appointment by the senior resident judge of the Superior Court Benjamin G. Alford. Sharp officially […]]]>

Craven County Superior Court Clerk Terri Sharp has said she will stand for re-election in 2022 for a third term.

Stopping the practice of law in 2012, entered the office of the clerk of the court by virtue of the appointment by the senior resident judge of the Superior Court Benjamin G. Alford.

Sharp officially ran for his first full term for court clerk in 2014. Running as a Democrat, Sharp defeated Republican candidate Mark Griffin with 52 percent of the vote.

In 2018, Sharp won again, this time with a slim margin of 462 votes against Republican candidate Lexanne Vernelson Huffman.

“In 2012, I left the practice of law and entered the public service as a court clerk to work full time for you. I am proud to be part of a wonderful team of 32 deputy and deputy court clerks who work hard for our Craven County residents, ”said Sharp.


Source link

]]>
What are environment variables in Linux? All you need to know https://boomdirectory.com/what-are-environment-variables-in-linux-all-you-need-to-know/ Sat, 27 Nov 2021 14:00:00 +0000 https://boomdirectory.com/what-are-environment-variables-in-linux-all-you-need-to-know/ If you’ve been using Linux for a while, you might be wondering how to set some parameters from the command line that can keep your settings in all programs. Environment variables are the way you do it. By the end, you will have a deep understanding of what environment variables are and how you can […]]]>

If you’ve been using Linux for a while, you might be wondering how to set some parameters from the command line that can keep your settings in all programs. Environment variables are the way you do it.


By the end, you will have a deep understanding of what environment variables are and how you can create such variables from the command line.


What are environment variables?

Environment variables are variables that are supposed to be consistent across all instances of the Linux shell. When you run a program from the shell, it makes a copy of itself, or “forks”, then replaces itself with the program it is going to run, called “exec”.

Environment variables will be inherited in all copies of the shell that the shell generates, also known as “export” variables. Even Windows uses environment variables, dating back to the days of MS-DOS, but in modern times most programs rely on the registry and their own settings menus for configuration.

An environment variable can set your preferred editor, so when a program launches the text editor to edit a config file, that editor appears every time.

VIDEO OF THE DAY MAKEUSE

Environment variables can be set system-wide by the system administrator, but it is more common for them to be set in startup files for individual users. By convention, they are printed in upper case and are indicated by a leading “$” sign, such as “$ EDITOR” for the default text editor.

List of environment variables

To see the value of any environment variable, use the echo order. For example, to display the value of the variable $ EDITOR, run the following command:

echo $EDITOR

If set, the shell will print the value, such as “vim”, but if it is empty it will just print an empty line.

To see all currently set environment variables, type “together“on the command line.


run the set command

Defining environment variables in Linux

You can set environment variables in two ways: from the command line or in shell configuration files.


The first method is simple. In Bash, you use the “export“. For example, to define the $ EDITOR environment variable :

export EDITOR='vim'

Note that in this syntax, you omit the beginning “$“. You can also use VARIABLE = ‘value’, but that will just extend to that particular instance of the shell, which means that the shell will reset the modified value once you close the terminal.

Now your editor will be Vim or whatever text editor you have in this session and every subshell it launches. If you want to keep your environment variables between different shell sessions, set them in your shell startup files.

Bash reads several files on startup: / etc / profile, / etc / bash / bashrc, .bash_profile, and .bashrc. The first two are system-wide and can only be changed by a system administrator, while the others reside in your home directory.


The .bashrc is what you want to change, because it affects interactive shells whether or not it is running as a login shell. If you are using the shell of a terminal emulator, .bashrc is what will be read.

The method of setting environment variables in a file is the same as setting on the command line. Just add the export VARIABLE = ‘value’ in the shell configuration file. When you’re done, save the file and start a new shell.

Note that Linux users can also change the default shell from Bash to another shell. For those who have it, you will need to edit your shell config file instead of .bashrc, which is the Bash configuration file.

You now know how environment variables work

With environment variables, you can have consistent settings across all of your shell sessions. Shell variables are an important part of shell scripts, something every Linux user should be aware of.



shell script
What is Shell Script and Why You Should Use It

In addition to being able to accept and execute commands interactively, the shell can also execute commands stored in a file. This is called shell scripts. Here we cover the basics of shell scripts.

Read more


About the Author


Source link

]]>
How to run multiple commands in Linux at once https://boomdirectory.com/how-to-run-multiple-commands-in-linux-at-once/ Fri, 26 Nov 2021 20:00:00 +0000 https://boomdirectory.com/how-to-run-multiple-commands-in-linux-at-once/ The Linux terminal is a powerful tool that allows you to perform a wide variety of operations using commands. These commands allow you to perform various computer tasks, including manipulating files, managing programs, and automating services. Ideally, when you need to run a bunch of terminal commands, you do it one at a time. However, […]]]>

The Linux terminal is a powerful tool that allows you to perform a wide variety of operations using commands. These commands allow you to perform various computer tasks, including manipulating files, managing programs, and automating services.


Ideally, when you need to run a bunch of terminal commands, you do it one at a time. However, it turns out that there is a better way to do it, and that involves running multiple commands at once.

Follow us as we demonstrate the different ways to run multiple terminal commands in Linux.


Run multiple Linux commands at once

In Linux, there are three ways to run multiple commands in a terminal:

  1. The Semicolon (;) operator

  2. The Logical OR (||) operator

  3. The Logical AND (&&) operator

All of these methods require an operator. Although any of these operators can run two or more shell commands at a time, knowing which operator to use and when can help you create effective commands. The following sections cover both the purpose and the syntax for using these operators correctly.

Related: What Is The Linux Command Line And How Do You Use It?


1. Using the semicolon operator (;)

Segmenting a string of commands with the semicolon is the most common practice when you want to run multiple commands in a terminal. This is partly due to the behavior of the operator: he executes all the commands in the sequence, whether the previous command was executed successfully or not.

VIDEO OF THE DAY MAKEUSE

For example, if there are two commands: command A and command B, using the semicolon operator between them ensures that the first and second commands are executed sequentially, regardless of the output of the first command.

command A ; command B

So if you find yourself in a situation where it is necessary to run two or more unbound terminal commands so that the exit status of the first command does not affect the execution of the last one, the operator semicolon is the solution.


Example use case: To display the current user name and the system host name:

whoami ; hostname

Keep in mind, however, that the shell executes these commands in the order in which you mention them. Here’s what the output would look like:


run multiple terminal commands using a semicolon

2. Using the OR operator (||)

The very definition of the word “or” is a giveaway here: when you run two commands using the OR operator, you’re telling the shell to run a single command in between.

Consider a scenario where you used the OR operator with two commands: command A and command B. This is what the joint command with the OR operator would look like:

command A || command B

Here, command B will only run if command A fails, i.e. when command A returns an error. Likewise, if command A works successfully, command B will not run.


Speaking of its use case, you can use the OR operator when you need to run two commands linked together so that the shell executes the next command only when the previous one fails.

Example use case: Suppose you want to create a new file, say Document.txt, but before that you want to make sure that a file with the same name doesn’t already exist in the current directory. In such situations, you can run your commands in the following order:

find . -name Document.txt || touch Document.txt

Here the find command will search the current working directory for the Documents.txt to file. If it finds the file, the command progress will stop and the second command will not execute.

On the other hand, if it does not find a matching file, the command on the right will run and a new file with the name Document.txt will be created in your current working directory.


3. Using the AND operator (&&)

As you have probably guessed, the AND operator executes the next command in a sequence only when its previous command completes successfully.

To better understand this, consider a scenario where you want to run two related commands so that you want the second command to run only if the first returns valid output. In this case, we can tie the commands together using the AND operator, called &&, to get the desired result.

Example use case: One of the most common use cases of the AND operator in Linux is to create a new directory and access it immediately. This way, you won’t have to run the two commands individually to complete the operation.

For the purposes of this guide, let’s say you want to create a new directory called Documents and immediately change your current working directory to this one.


mkdir Documents && cd Documents

Here the mkdir The command will create a new directory named Documents in your current working directory. If successful, it will allow execution of the cd command.

Combination of several operators to meet your execution criteria

In addition to using individual operators in your orders, you can also group multiple operators together to meet your fulfillment criteria. This is useful when you want to run commands based on multiple conditions.

Consider a scenario where you want to run two commands (command B and command C) only when command A failed. To do this, you will need to use operators as shown in the notation below:

command A || command B && command C

Example use case: Suppose you want to determine whether a folder (named Document) exists in your current working directory and create it if it is not. In this case, instead of running separate commands to find the directory and create a new one, you can use the OR and AND operators together to perform the whole operation efficiently.


Here’s what it would look like:

find . -name Document || echo "Directory not found" && mkdir Document

In this command, find ask the shell to search for a named folder Document in the current working directory. If the directory is not present, the terminal transfers the stream to the echo and mkdir commands, which print the specified string and respectively create a new folder.

Efficient execution of terminal commands in Linux

As you have just seen, using operators in your commands can simplify many command line operations.

If you are someone who likes to handle different system operations on their computer through terminal, knowing how to use these operators can be very helpful and will definitely help you to run Linux commands more efficiently.

Likewise, if you are new to or are less familiar with Linux, learning different terminal commands is another step towards mastering the CLI.



most-used-linux-terminal-cmds
Linux command reference cheat sheet

This simple cheat sheet will help you get started with Linux command line terminal in no time.

Read more


About the Author


Source link

]]>
How to create a desktop shortcut to a specific Firefox profile https://boomdirectory.com/how-to-create-a-desktop-shortcut-to-a-specific-firefox-profile/ Thu, 25 Nov 2021 03:28:15 +0000 https://boomdirectory.com/how-to-create-a-desktop-shortcut-to-a-specific-firefox-profile/ If you have created multiple profiles in the Firefox browser and want to create a desktop shortcut to a specific Firefox profile, this step-by-step guide will help you do that. You don’t need an add-on or third-party software to create a desktop shortcut to a specific profile and open the browser with that profile. Like […]]]>

If you have created multiple profiles in the Firefox browser and want to create a desktop shortcut to a specific Firefox profile, this step-by-step guide will help you do that. You don’t need an add-on or third-party software to create a desktop shortcut to a specific profile and open the browser with that profile.

Like Google Chrome, you can create multiple profiles in the Mozilla Firefox browser. Whether you want to create a profile for video streaming or browsing, you can do everything normally with any profile. If the two built-in profiles are not enough for you, you can create a custom profile and customize it to your needs.

The problem starts when you want to switch from one profile to another. Although Google Chrome has a user-friendly option to switch between profiles, Firefox does not have a similar option. You have to open about: profiles to switch from the current profile to another once. If you change your profile often for some reason, you can create a desktop shortcut and pin it to the taskbar or Start menu to open Firefox with that profile quickly.

How to create a desktop shortcut to a specific Firefox profile

To create a desktop shortcut to a specific Firefox profile, follow these steps:

  1. Open File Explorer on your computer.
  2. Navigate to this path: C: Program Files Mozilla Firefox
  3. Right click on EXE and select the Show more options.
  4. Select the Send to> Desktop (Create shortcut) option.
  5. Right click on the desktop shortcut and select Properties.
  6. Enter -P “profile name” at the end of Target box.
  7. Click it Okay button.
  8. Double-click on the desktop shortcut to open Firefox with a specific profile.

To learn more about the aforementioned steps, keep reading.

First, you need to create a shortcut on the desktop of the Firefox browser. If you already have one and want to convert it to open with a specific profile, you don’t need to go through the next few steps and go straight to the 5th step.

To get started, open File Explorer on your computer and navigate to this path:

C:Program FilesMozilla Firefox

This is the default installation directory for the Firefox browser. However, if you selected anything else while installing this browser, you need to open this directory. Then right click on the firefox.exe file and select it Show more options.

Alternatively, you can press Shift + F10 to open the old context menu. Then select the Send to> Desktop (Create shortcut) option.

Then go to the desktop, right click on the Firefox browser desktop shortcut and select the Properties option.

Place your cursor at the end of the Target and enter the following text:

-P "profile-name"

How to create a desktop shortcut to a specific Firefox profile

Remember to replace the profile name with the original profile name of your Firefox browser you want to open.

Then click on the Okay button to save the change. After that, you can double click on the desktop shortcut to open the Firefox browser with the selected profile.

To verify you can enter about: profiles in the address bar after opening the Firefox browser to check if This is the profile in use and it cannot be deleted message is displayed under your profile name or not.

How to create a desktop shortcut to a specific Firefox profile

Once you’re done creating the desktop shortcut, you can pin it to the taskbar as well as the Start menu.

How do I create a desktop shortcut in Firefox?

To create a shortcut on the Firefox browser desktop, you must first open the installation directory. By default, Windows installs the Firefox browser at this location: C: Program Files Mozilla Firefox. After opening this folder, right click on the firefox.exe> ​​Show more options> Send to> Desktop. Then you can find the Firefox browser desktop shortcut on your computer.

How do I change the Firefox profile to use?

To change which Firefox profile to use, you have two options at hand. First of all, you can follow the aforementioned guide to create desktop shortcut of desired profile. Then you can double click on the desktop shortcut to open Firefox with the specific profile. Second, you can open the Firefox browser and enter about: profiles in the address bar. Then choose a profile you want to open and click on the button Launch the profile in a new browser button. This will open a new Firefox browser window with the profile selected.

How to open two Firefox profiles at the same time?

You can have two Firefox profiles open at the same time like Google Chrome. Whether you want to open two or three profiles simultaneously, you can do so using the aforementioned guide. At first, you need to open a desktop shortcut of a specific profile. Then you can open a profile using the desktop shortcut and another from the start menu. Alternatively, you can enter about: profiles in the address bar of the Firefox browser and click on the Launch the profile in a new browser button visible under a specific profile. This will open a new window with the desired profile.

That’s all! Hope this tutorial helped you create a desktop shortcut to the specific Firefox profile.

Read: Firefox Profile Manager allows you to create, delete or change Firefox profile

How to create a desktop shortcut to a specific Firefox profile


Source link

]]>
Customize your Mac’s “Finder” to show you what you really need https://boomdirectory.com/customize-your-macs-finder-to-show-you-what-you-really-need/ Tue, 23 Nov 2021 18:30:00 +0000 https://boomdirectory.com/customize-your-macs-finder-to-show-you-what-you-really-need/ Photo: Joel cunningham Finder is your pathaccess to all files on your Mac. Of course you could (and should) use Spotlight to quickly find and open files. But when it comes to managing and work with files, folders and documents, the Finder application is essential, especially since none of them know how to create a […]]]>

Image of the article titled Customize Your Mac's Finder So It Shows You The Things You Really Need

Photo: Joel cunningham

Finder is your pathaccess to all files on your Mac. Of course you could (and should) use Spotlight to quickly find and open files. But when it comes to managing and work with files, folders and documents, the Finder application is essential, especially since none of them know how to create a folder hierarchy more.

The Finder does a very good job of helping you organize files. But there are some things about it that could be improved. What if every new Finder window didn’t open to display the Recent folder? What if you could easily see the detailed path for a given case? Well, you can: Here’s how to customize what you see in the Finder app.

How to customize the sidebar in Finder

Image of the article titled Customize Your Mac's Finder So It Shows You The Things You Really Need

Screenshot: Khamosh Pathak

The sidebar is where you’ll likely start interacting with Finder, so you should take the time to add the things you want to see there and remove what encumbers it.

Go to Searcher > Preferences > Lateral bar. From there, select the items you want to show or hide. For example, you can remove the Tags section, limit the Locations items, and prune the Favorites section..

Once done, navigate to some of your frequently used folders and drag them to the Favorites section so you can still easily access them.

How to change the Finder startup folder

The Finder launches with the Recents folder ready to use. This may not be of use to you-if you store all your files in the Downloads or Documents folder, it may be better to use one of these as a starting point.

Go to Searcher > Preferences > General > New Windows Finder Show. Here, choose any folder to use as the default when you open a new Finder window.

How to show the path bar in Finder

Image of the article titled Customize Your Mac's Finder So It Shows You The Things You Really Need

Screenshot: Khamosh Pathak

The path bar is a feature that every Finder user should turn on. This gives you an idea of ​​where exactly you are in a file directory. Go to Seen > Show path bar to activate it.

You will now see the path to each folder at the bottom of the Finder window. You can click any folder in the path to navigate to it. You can also quickly copy the full path. through -by clicking on a folder from the path, and choosing the “Copy as path name”Option.

If you don’t always want to see the file path, you can choose to show he selectively; right-click on the file or folder name at the top of the Finder window to see a list of all folders or files your current file / folder comes from.

How to display the status bar in the Finder

By default, tThe Finder’s status bar does just two things: It shows you how many items there are in a folder (and how many are selected) and how much space is left on your Mac. This is generally good information to have, however, so Itworth spending some space to activate it at the bottom of the Finder window. Do this, go to Seen > Show status bar.

How to customize the Finder toolbar

Image of the article titled Customize Your Mac's Finder So It Shows You The Things You Really Need

Screenshot: Khamosh Pathak

You can customize the Finder toolbar just like you can in Safari. Right click in the empty space of the Finder toolbar and choose the “Customize the toolbar”Option.

Here you can rearrange the items, or drag or delete items from the top. (Added buttons for “Wipe off” and “New folder“will be really helpful.)

How to increase the font size in Finder

Image of the article titled Customize Your Mac's Finder So It Shows You The Things You Really Need

Screenshot: Khamosh Pathak

If you’re using a 13-inch MacBook Air, you might find it is difficult to display a long list of file names. Try increasing the font size for the Finder app. To do this, go to Seen > Show display options, and “Text size“, increase the text size to a reasonable number (16 is probably a good choice).

ohpen new folders in windows instead of tabs

The Finder now has tabs, just like Safari. And by default it will open now folders in tabs instead of in new windows when you double-click while holding down the Command key.

To revert to the old behavior and open new folders as separate Finder windows, go to Searcher > Preferences and uncheck the box “Open folders in tabs instead of new windows”Option.


Source link

]]>
GTA Trilogy modders add fog to San Andreas https://boomdirectory.com/gta-trilogy-modders-add-fog-to-san-andreas/ Fri, 19 Nov 2021 23:26:00 +0000 https://boomdirectory.com/gta-trilogy-modders-add-fog-to-san-andreas/ The modders restore the fog effect from the Definitive Edition of Grand Theft Auto: San Andreas, correcting a running review of the trilogy remaster. “Trouble” is probably the polite way to describe the launch of Grand Theft Auto: The Trilogy – The Definitive Edition. Comparisons with Cyberpunk 2077 can be somewhat hyperbolic, although it’s understandable […]]]>

The modders restore the fog effect from the Definitive Edition of Grand Theft Auto: San Andreas, correcting a running review of the trilogy remaster.


Fog mod GTA San Andreas Definitive Edition

“Trouble” is probably the polite way to describe the launch of Grand Theft Auto: The Trilogy – The Definitive Edition. Comparisons with Cyberpunk 2077 can be somewhat hyperbolic, although it’s understandable that some players draw this parallel.

Fortunately, modders are working hard to fix some of the issues plaguing Grand Theft Auto: The Trilogy – The Definitive Edition. This includes a recent mod that reintroduces fog into Grand Theft Auto San Andreas.

RELATED: Rockstar Apologizes For GTA Trilogy, Brings Back Original Games

It may not seem important to those who haven’t played Grand Theft Auto: The Trilogy, corn San Andreas draw distance fog is more important than it looks. Older games often used such weather effects to mask their limited draw distance. However, it also served a secondary function at the start. RGT securities. While their maps were and still are huge, relatively speaking, they can look quite small when viewed at higher elevations. Hiding parts of the city behind the haze or shoreline fog makes the map appear much larger than was possible to model in the game engine.

GAMERANT VIDEO OF THE DAY

Unfortunately, this fog is not present in the Definitive edition. Therefore, to climb a mountain or get on a plane by San Andreas is more like examining a miniature train than flying over a vast metropolis. The absence of fog does not mask the clear border between the ocean and the skybox either. The good news is that modders are coming to the GTA Trilogy rescue, restoring both the haze and the illusion of scale.

Reddit and YouTuber user TJGM uploaded a video that showcases the fog mod in action. While San Andreas’ the map still looks tiny from the sky, the mod does away with much of the “model on a tabletop” look that the game has otherwise. Fog does this by blurring the horizon, reducing the level of detail in distant objects, and toning down the overly vivid, almost plastic colors of the landscape below.

Comparison of fog mods GTA San Andreas Definitive Edition

The effect is even more noticeable at lower elevations, as players can no longer see the entire uninterrupted landscape from the top of a mountain or skyscraper. Even from ground level, the hazy distance looks more realistic than in vanilla Definitive edition. Notably, the mod doesn’t change the render distance of the game, simply enveloping objects further away in cloudy haze. Players can also choose the thickness of the fog in the game.

Installing the mod is a relatively straightforward process, requiring only the player to swap a single folder in RGT: The trilogy file directory. However, that may change as the game and itself receive new updates. Meanwhile, fans better hope Take-Two Interactive doesn’t decide to crack down on another. Grand Theft Auto mod.

MORE: GTA Trilogy Music List: Songs Missing From The Original Games


Halo primordial series streaming 2022
Halo: what we know about the upcoming Paramount + series

With the official release of Paramount’s Halo series in 2022, here’s everything there is to know about the series so far.

Read more


About the Author


Source link

]]>
How to Format Storage Drives Using Linux Terminal https://boomdirectory.com/how-to-format-storage-drives-using-linux-terminal/ Thu, 18 Nov 2021 19:00:00 +0000 https://boomdirectory.com/how-to-format-storage-drives-using-linux-terminal/ A storage device is an integral part of your computer hardware and of computing in general. Used to store processed data, storage devices come in many different forms. Some of the most common include external or internal hard drives, flash drives, CDs, etc. This guide will show you how to format a storage device directly […]]]>

A storage device is an integral part of your computer hardware and of computing in general. Used to store processed data, storage devices come in many different forms. Some of the most common include external or internal hard drives, flash drives, CDs, etc.

This guide will show you how to format a storage device directly from the Linux terminal.

How to follow

When you format a storage device, you are essentially deleting any data or information stored on that device, more like restoring it to its factory default settings. Here are a few reasons why you might want to do this: to get rid of malware, improve performance, or remove sensitive data before handing the storage device over to someone else.

To note: Always be careful when formatting drives to avoid losing important information.

If you want to follow along, the best way is to practice using a USB stick. Note that the steps are the same for other storage devices. Just make sure to back up your data before formatting the device.

VIDEO OF THE DAY MAKEUSE

Connect your USB key to your PC. Most Linux desktops automatically mount your storage device once you connect it to your computer.

If for some reason the device did not mount automatically, here is how you can mount the drive in Linux.

Your USB drive will be listed in the files menu or on the desktop depending on your desktop environment. Most Debian based distributions like Ubuntu will list the drive in the files menu.

usb key under files

Get the properties of your storage device

Before you can proceed with formatting your storage device, it is important that you can list and get the properties of the connected devices on your PC in order to format the correct storage device.

Open the terminal from the Applications menu or via the shortcut Ctrl + Alt + T. In the terminal, run the following df command:

df -h

The command lists all the storage devices available on your system. The -h The option lists storage devices in a human readable format.

Linux storage device command list

Most Linux distributions automatically mount external storage devices such as USB drives under the /media/ phone book.

Here, the storage device that we want to format is mounted in the directory / media / mwiza / CORSAIR, where CORSAIR is the label of the storage device.

Some other important properties include:

  • The physical mount address of the storage device, / dev / sda1 in that case.

  • The size of the drive, including free space available and the amount used in both percentage and gigabytes.

  • Finally, the directory in which the USB key is mounted; / media / mwiza in that case.

Format your storage device

When your storage device is mounted on your system, Linux assumes that the drive is a fixed size and a specific format. For best efficiency when formatting, it is important that you first unmount your storage device.

To unmount the storage device, you can use the to disassemble order as below.

sudo umount /dev/sda1

To note: In that case, / dev / sda1 is the physical address on which the storage device we want to format is mounted. Make sure you have the correct mount point for your device on your system.

To format your storage device, use the mkfs (Create filesystem) order. The mkfs command creates a file system on a storage device according to the options specified.

sudo mkfs.vfat -n 'MUO' -I /dev/sda1

The aforementioned command formats the specified drive using the FAT32 file format. You can also specify the new name or label of the USB drive. In this case it will be MUO and the mount point of the physical address / dev / sda1. The FAT32 file system is compatible with all popular operating systems.

Besides FAT32 file system, other file system formats that you can use to format your storage device include ext, Minix, MS-DOS, etc.

When formatting is complete, physically unplug the storage device from your computer and then plug it back in. The system will mount your newly formatted drive with the name you specified in the command.

You can also check the name of the storage device by running the df -h order.

Format an external drive on other operating systems

This guide has looked at how to format an external storage device on Linux using the mkfs order. As with everything Linux, there are many other command line tools for formatting storage devices; you can even use the GUI if you want.

If you are using another operating system such as Windows, you have the option to graphically format your internal or external storage devices.


format-usb-drive-featured
How to format a USB flash drive (and why you would need it)

Formatting a USB drive is easy. Our guide explains the easiest and fastest ways to format USB flash drive on Windows computer.

Read more


About the Author


Source link

]]>
How to refine a transformer architecture NLP model – visual studio magazine https://boomdirectory.com/how-to-refine-a-transformer-architecture-nlp-model-visual-studio-magazine/ Tue, 16 Nov 2021 23:08:01 +0000 https://boomdirectory.com/how-to-refine-a-transformer-architecture-nlp-model-visual-studio-magazine/ The data science lab How to refine an NLP transformer architecture model The goal is sentiment analysis: accept text from a movie review (for example, “This movie was a great waste of time.”) And rate output 0 (negative review) or class 1 ( positive review). By James McCaffrey 11/16/2021 This article describes how to refine […]]]>

The data science lab

How to refine an NLP transformer architecture model

The goal is sentiment analysis: accept text from a movie review (for example, “This movie was a great waste of time.”) And rate output 0 (negative review) or class 1 ( positive review).

This article describes how to refine a pre-trained Transformer architecture model for natural language processing. Specifically, this article explains how to refine a condensed version of a pre-trained BERT model to create a binary classifier for a subset of the IMDB movie reviews dataset. The goal is sentiment analysis: accept text from a movie review (for example, “This movie was a great waste of time.”) And rate output 0 (negative review) or class 1 ( positive review).

You can think of a preformed transformer architecture (TA) model as a kind of expert in English. But the TA expert doesn’t know anything about movies, so you provide additional training to refine the model so that he understands the difference between a positive movie review and a negative review.

There are several pre-trained TA models for Natural Language Processing (NLP). Two of the best known are BERT (representations of bidirectional encoder from transformers) and GPT (generative pre-driven transformer). TA models are huge, with millions of weights and bias settings.

TA models have revolutionized NLP, but TA systems are extremely complex and implementing them from scratch can take hundreds or even thousands of hours of work. Hugging Face (HF) is an open source code library that provides pre-trained models and a set of APIs to work with models. The HF library makes implementing NLP systems using TA models much less difficult (see “How to Create a Transformer Architecture Model for Natural Language Processing”).

A good way to see where this article is going is to take a look at the screenshot of a demo program in Figure 1. The demo program begins by loading into memory a small subset of 200 items of the IMDB movie review dataset. The full dataset contains 50,000 film reviews – 25,000 reviews for training and 25,000 reviews for testing, where there are 12,500 positive reviews and 12,500 negative reviews. Working with the full dataset is very time consuming, so the demo data only uses the first 100 positive training reviews and the first 100 negative training reviews.

Movie reviews are in plain text form. The notices are read into memory and then converted to a data structure containing integer tokens. For example, the word “movie” has a token ID = 3185. The data structure of tokenized movie reviews is passed to a PyTorch Dataset which is used to send batches of tokenized reviews and their associated tags to the tokenized review code. learning.

Once the movie review data is prepared, the demo loads a pre-trained DistilBERT model into memory. DistilBERT is a condensed (“distilled”), but still large, version of the enormous BERT model. The caseless version of DistilBERT has 66 million weights and skews. Then the demo refines the pre-trained model by training the model using standard PyTorch techniques. The demo ends with saving the refined model to a file.

Figure 1: Fine-tuning a condensed BERT model for film sentiment analysis
[Click on image for larger view.] Figure 1: Fine-tuning a condensed BERT model for film sentiment analysis

This article assumes you have intermediate or above knowledge of a C family programming language, preferably Python, and a basic knowledge of PyTorch, but does not assume that you know anything about the code library Hugging Face. The full source code for the demo program is presented in this article, and the code is also available in the accompanying download file.

To run the demo program, you must have Python, PyTorch, and HF installed on your machine. The demo programs were developed on Windows 10 using the Anaconda 2020.02 64-bit distribution (which contains Python 3.7.6) and PyTorch version 1.8.0 for the processor installed via pip transformers and HF version 4.11.3. The installation is not trivial. You can find detailed step-by-step installation instructions for PyTorch in my blog post. The installation of the HF transformer library is relatively straightforward. You can run the “pip install transformers” shell command.

Overall program structure
The structure of the demonstration program is:

# import modules and packages
device = torch.device('cpu')
class IMDbDataset(T.utils.data.Dataset): . . .
def read_imdb(root_dir): . . .
def main():
  # 0. preparation
  # 1. load raw IMDB train data into memory
  # 2. tokenize the raw data reviews text
  # 3. load tokenized text, labels into PyTorch Dataset
  # 4. load (possibly cached) pretrained HF model
  # 5. fine-tune / train model using standard PyTorch
  # 6. save trained model weights and biases
if __name__ == "__main__":
  main()

The HF library can use the PyTorch or TensorFlow libraries. The demo uses PyTorch. The IMDbDataset is a program-defined PyTorch class that holds the training data and serves it in batches. The read_imdb () function is a helper that reads movie review text data from the file into memory. All program logic is in a single main () function.

The full demo code, with some minor edits to save space, is shown in List 1. I prefer to indent using two spaces rather than the standard four spaces. The backslash character is used for line continuation to break up long statements.

List 1: The complete fine-tuning demonstration program

# imdb_hf_01_tune.py
# fine-tune HF pretrained model for IMDB 
# zipped raw data at:
# https://ai.stanford.edu/~amaas/data/sentiment/

import numpy as np  # not used
from pathlib import Path
from transformers import DistilBertTokenizer
import torch as T
from torch.utils.data import DataLoader
from transformers import AdamW, 
  DistilBertForSequenceClassification
from transformers import logging  # suppress warnings

device = T.device('cpu')

class IMDbDataset(T.utils.data.Dataset):
  def __init__(self, reviews_lst, labels_lst):
    self.reviews_lst = reviews_lst  # list of token IDs
    self.labels_lst = labels_lst    # list of 0-1 ints

  def __getitem__(self, idx):
    item = {}  # [input_ids] [attention_mask] [labels]
    for key, val in self.reviews_lst.items():
      item[key] = T.tensor(val[idx]).to(device)
    item['labels'] = 
      T.tensor(self.labels_lst[idx]).to(device)
    return item

  def __len__(self):
    return len(self.labels_lst)

def read_imdb(root_dir):
  reviews_lst = []; labels_lst = []
  root_dir = Path(root_dir)
  for label_dir in ["pos", "neg"]:
    for f_handle in (root_dir/label_dir).iterdir():
      reviews_lst.append(f_handle.read_text(
        encoding='utf-8'))
      if label_dir == "pos":
        labels_lst.append(1)
      else:
        labels_lst.append(0)
  return (reviews_lst, labels_lst)  # lists of strings

def main():
  # 0. get ready
  print("nBegin fine-tune for IMDB sentiment ")
  logging.set_verbosity_error()  # suppress wordy warnings
  T.manual_seed(1)
  np.random.seed(1)

  # 1. load raw IMDB train data into memory
  print("nLoading IMDB train data subset into memory ")
  train_reviews_lst, train_labels_lst = 
    read_imdb(".DataSmallaclImdbtrain") 
  print("Done ")

  # consider creating validation set here

  # 2. tokenize the raw data reviews text
  print("nTokenizing training text ")
  toker = 
    DistilBertTokenizer.from_pretrained(
    'distilbert-base-uncased')
  train_tokens = toker(train_reviews_lst, 
    truncation=True, padding=True)  # token IDs and mask

  # 3. load tokenized text and labels into PyTorch Dataset
  print("nLoading tokenized text into Pytorch Datasets ")
  train_dataset = 
    IMDbDataset(train_tokens, train_labels_lst)
  print("Done ")

  # 4. load (possibly cached) pretrained HF model
  print("nLoading pre-trained DistilBERT model ")
  model = 
    DistilBertForSequenceClassification.from_pretrained( 
    'distilbert-base-uncased')
  model.to(device)
  model.train()  # set into training mode
  print("Done ")

  # 5. fine-tune / train model using standard PyTorch
  print("nLoading Dataset bat_size = 10 ")
  train_loader = DataLoader(train_dataset, 
    batch_size=10, shuffle=True)
  print("Done ")

  print("nFine-tuning the model ")
  optim = AdamW(model.parameters(), lr=5.0e-5)  # wt decay
  for epoch in range(3):
    epoch_loss = 0.0
    for (b_ix, batch) in enumerate(train_loader):
      optim.zero_grad()
      inpt_ids = batch['input_ids']        # tensor
      attn_mask = batch['attention_mask']  # tensor
      lbls = batch['labels']               # tensor
      outputs = model(inpt_ids, 
        attention_mask=attn_mask, labels=lbls)
      loss = outputs[0]
      epoch_loss += loss.item()  # accumulate batch loss
      loss.backward()
      optim.step()
      if b_ix % 5 == 0:  # 200 items is 20 batches of 10
        print(" batch = %5d curr batch loss = %0.4f " % 
        (b_ix, loss.item()))
      # if b_ix >= xx: break  # to save time for demo
    print("end epoch = %4d  epoch loss = %0.4f " % 
      (epoch, epoch_loss))
  print("Training complete ")

  # 6. save trained model weights and biases
  print("nSaving tuned model state ")
  model.eval()
  T.save(model.state_dict(), 
    ".Modelsimdb_state.pt")  # just state
  print("Done ")
  
  print("nEnd demo ")

if __name__ == "__main__":
  main()

Get IMDB training data
Online IMDB movie review data is stored in compressed form in the aclImdb_v1.tar.gz file and on a Windows system must be unzipped and extracted using a utility program such as WinZip or 7-Zip. Both utilities are good, but I prefer 7-Zip.

The unzipped files will be in a root folder named aclImdb (“ACL IMDB”). The root folder contains subdirectories named test and train. The test and train directories contain subdirectories named pos and neg. Each of these two directories contains 12,500 text files where each file is a movie review.

The filenames look like 0_9.txt and 113_3.txt where the first part of the name, before the underscore, is a 0-based index and the second part of the name is the actual numeric score of the review. Ratings of 7, 8, 9, 10 are positive reviews (all in the “pos” repertoire) and ratings of 1, 2, 3, 4 are negative reviews. Movie reviews that received ratings of 5 and 6 (neither strong positive nor negative) are not included in the IMDB dataset. Note that the actual scores from 1 to 10 are not used in the demo.

To reduce the IMDB dataset to a manageable size for experimentation, I used only the training files and deleted all reviews except the first 100 positives and the first 100 negatives, leaving 200 reviews total training.

The program-defined read_imdb () function reads journal text and labels in memory. It is implemented as:

from pathlib import Path
def read_imdb(root_dir):
  reviews_lst = []; labels_lst = []
  root_dir = Path(root_dir)
  for label_dir in ["pos", "neg"]:
    for f_handle in (root_dir/label_dir).iterdir():
      reviews_lst.append(f_handle.read_text(
        encoding='utf-8'))
      if label_dir == "pos": labels_lst.append(1)
      else: labels_lst.append(0)
  return (reviews_lst, labels_lst)  # list of strings

The Python pathlib library is relatively new (from Python 3.4) and is a bit more robust than the old os library (which still works fine). The return result of the read_imdb () function is a Python tuple where the first element is a comma-separated Python list of notices, and the second element is a list of associated class labels, 0 for negative notice and 1 for a positive opinion.

Loading movie reviews
The demo program begins execution with these instructions:

def main():
  # 0. get ready
  print("Begin fine-tune for IMDB sentiment ")
  logging.set_verbosity_error()  # suppress warnings
  T.manual_seed(1)
  np.random.seed(1)
. . .

Suppressing the warnings is not a good idea, but I did it to keep the output tidy for the screenshot in Figure 1. There’s no need to tune the NumPy torch and random number seeds, but it’s generally a good idea to try and make program executions repeatable.

The film review text and labels are loaded into memory as follows:

  # 1. load raw IMDB train data into memory
  print("Loading IMDB train data subset into memory ")
  train_reviews_lst, train_labels_lst = 
    read_imdb(".DataSmallaclImdbtrain")  # text list
  print("Done ")

Tokenize the text of notices
The demo creates a tokenizer object, then tokenizes the text of the notices with these two declarations:

  # 2. tokenize the raw data reviews text
  print("Tokenizing training text ")
  toker = 
    DistilBertTokenizer.from_pretrained( 
    'distilbert-base-uncased')
  train_tokens = toker(train_reviews_lst, 
    truncation=True, padding=True)

In general, each HF model has its own associated tokenizer to divide the text of the source sequence into tokens. This is different from earlier language systems which often use a generic tokenizer such as spaCy. Therefore, the demo loads the distilbert-base-uncased tokenizer. The return result of calling the tokenizer on IMDB journals is a data structure that has two components: an input_ids field which contains integer IDs that correspond to words in the journal text, and the attention_mask field which contains 0’s and 1’s indicating which tokens are active and which tokens to ignore (usually filler tokens).

The tokenized text and attention mask, along with the list of class labels are passed to the IMDbDataset constructor:

  # 3. load tokenized text and labels into PyTorch Dataset
  print("Loading tokenized text into Pytorch Datasets ")
  train_dataset = 
    IMDbDataset(train_tokens, train_labels_lst)
  print("Done ")

The returned result is a PyTorch Dataset object that can serve as batch training items. The underlying elements are collections of dictionaries with keys [input_ids], [attention_mask], [label].


Source link

]]>
How to Import and Export LUTs in DaVinci Resolve https://boomdirectory.com/how-to-import-and-export-luts-in-davinci-resolve/ Sat, 13 Nov 2021 15:00:00 +0000 https://boomdirectory.com/how-to-import-and-export-luts-in-davinci-resolve/ When your blacks are milky and your highlights are above the ceiling, who do you turn to? For DIY filmmakers who want to give their footage a dramatic and professional touch, there is no competition. DaVinci Resolve is the undisputed champion. Creating a LUT in Resolve is the easiest way to save a graded look […]]]>

When your blacks are milky and your highlights are above the ceiling, who do you turn to? For DIY filmmakers who want to give their footage a dramatic and professional touch, there is no competition. DaVinci Resolve is the undisputed champion.

Creating a LUT in Resolve is the easiest way to save a graded look and apply it to other media, both in the project and throughout Resolve, as well as cross-functionally. in other creative applications. This includes the Adobe suite, Final Cut, and even AVID.

Here we show you how to export the LUTs you created and then import them back into DaVinci Resolve so you can apply them to your other projects. Let’s get started!

How to export a LUT from DaVinci Resolve

The Color workspace in DaVinci Resolve.

Ideally, before participating in this exercise, you should already have a project open in DaVinci and a few clips that have recently received a well-deserved makeover.

If you don’t, set up a new project and add media to the timeline under the To cut tongue. Use the Color workspace to adjust the footage – for our purposes here, this note doesn’t need to be too wild. It just needs to be something other than having each parameter set to the base default.

Now that you have a preview to work with, we can start pulling it out of the app. Follow these steps:

  1. At the bottom, you’ll see the entire DaVinci pipeline presented in a series of tabs. From the one you currently have selected, choose Color if it is not already active.

    Modifying the workspace in DaVinci Resolve.

  2. In the Color workspace, you should already have media in your timeline. Right click on the thumbnail image of the clip from which you want to drag your new LUT.

    How to export a LUT in Resolve.

  3. Take it out Generate LUT menu. Choose either 17 point cube, 33 point cube, Where 65 point cube. A 33 point cube is what most people think of as the norm in an ordinary sense.

    How to register a LUT in DaVinci Resolve.

  4. Select a destination folder, name the LUT and press to safeguard.

    Creating a LUT from Resolve.

You should see your LUT saved as a CUBE file in your chosen destination folder. It doesn’t matter where you save it now; we’re going to move it to Resolve’s dedicated LUT folder momentarily.

Once you’ve exported your LUT, it can be applied to another clip.

Import the footage you want to apply the LUT to into the project you just worked on or into a new one. Add your media to the timeline using the Cut workspace, then return to Color.

Related: HitFilm Express Vs DaVinci Resolve: The Free Video Editor’s Battle

How to import a LUT into DaVinci Resolve

Applying the LUT you just created is easy, but you’ll need to perform a few maneuvers before throwing it away. First let’s see the LUT panel in Solve.

At the top of the screen, just below the drop-down menu, you should see a few buttons—Gallery, LUT, and Media Pool. Select LUT to display the LUT panel.

The LUTs panel in Resolve.

Now you can see all the default LUTs offered by DaVinci Resolve. You’ll find everything from simple inversions to more technical LUTs, like the always-loved Sony S-Log 2 to Rec. 709, an iconic classic and fan favorite.

Related: How To Read Lumetri Staves In Premiere

Add a LUT in DaVinci Resolve

One LUT that is noticeably missing, however, is the one we just exported. To use it in the app, we need to copy the destination folder we chose to the one Resolve uses for LUTs.

Blackmagic makes this part super easy. To add a LUT to Resolve, here’s what you need to do:

  1. Under the To file drop-down list, click on your Project settings or use the shortcut Gap + 9 instead of.

    How to change project settings in Resolve.

  2. Switch to the Color management tab, located in the left sidebar. Hit it Open LUT folder button. This will reveal the Resolve LUT folder in your computer’s file directory outside of the application.

    Open the LUT folder in Resolve.

  3. Drag and drop your CUBE file or original destination folder into Resolve’s LUT folder.

    Added a new LUT to resolve.

  4. Go back to the Resolve Project Settings menu. Just above the Open LUT Folder button is another titled Update lists. Click this button to refresh your LUT panel.

    Updated LUTs in Resolve.

  5. Hit to safeguard at the bottom to lock in these changes and resume your session. If we click inside the folder, we will see our LUT, ready and waiting for action.

    Added custom LUT to DaVinci Resolve.

Related: How To Use Scene Cut Detection In DaVinci Resolve

How to apply your custom LUT in DaVinci Resolve

To add the LUT to your footage, drag and drop the LUT onto the media in your Timeline. One cool feature of Resolve is that you can actually audition LUTs on the fly by hovering over the clip’s thumbnail as you drag without actually dropping the LUT.

The preview shot will update and you can see whether or not it’s the right one to use. If you decide to apply the LUT after seeing how it plays out, just release the mouse to close the deal.

How to add a LUT in DaVinci.

Right clicking on the thumbnail image shows us another way to add the LUT – via the LUT pull-out just above the one we used to generate the LUT in the first place. You can follow the check marks until you find your custom LUT folder and the CUBE file in question.

Added custom LUT in DaVinci.

Is it a perfect fit? It looks better than before, but it could definitely need some tweaking, just to polish it up a bit. Let’s end this and save this new version as a second LUT.

How to edit a LUT in Resolve.

From now on, we have them both on deck whenever duty calls us. After a few projects, you’ll have a full library of custom LUT options to choose from. The more you earn, the more you will start to see what DaVinci is capable of.

Related: How to Create LUTs for Video Footage

Importing and Exporting LUTs in DaVinci Resolve

Of course, you’re free to choose any of the design LUTs that come with Resolve if you’re ever in a hurry. However, creating your own LUT will likely result in something much more nifty and unique.

Once you’ve extracted your CUBE file from DaVinci’s gaping mouth, you can use it anywhere, including Premiere and even Photoshop; one glance to rule them all, and we wouldn’t want it any other way.


A camera tested for video shooting.
What is a log gamma curve in cinematography?

Do you want to increase the tonal range of your sequences in post-production? Find out how with a gamma log curve.

Read more


About the Author


Source link

]]>
How to set up your own secure mail server https://boomdirectory.com/how-to-set-up-your-own-secure-mail-server/ https://boomdirectory.com/how-to-set-up-your-own-secure-mail-server/#respond Wed, 10 Nov 2021 17:30:00 +0000 https://boomdirectory.com/how-to-set-up-your-own-secure-mail-server/ Photo: Rawpixel.com (Shutterstock) Recent research from Verizon shows that 96% of social engineering attacks are done by email, and for that reason alone you might want to consider adding additional security. Let’s discuss the definition of a “secure mail server”, its pros and cons, and how to set one up. What is a secure mail […]]]>

Image for article titled How to Set Up Your Own Secure Mail Server

Photo: Rawpixel.com (Shutterstock)

Recent research from Verizon shows that 96% of social engineering attacks are done by email, and for that reason alone you might want to consider adding additional security. Let’s discuss the definition of a “secure mail server”, its pros and cons, and how to set one up.

What is a secure mail server?

The main difference between a regular email and a secure mail server is the level of protection: secure mail servers have additional security features that take time and effort to set up, but are more likely to resist. hackers and bad actors than traditional mail servers. .

To simplify matters, the very act of using a secure email address isn’t much different from a regular email: you won’t have to learn new skills when you switch to secure email. However, you need to make sure that the provider you choose is actually using a secure server. Some popular email providers like Google or Microsoft may claim that their services are secure, and they must some Degree, corn these services cannot offer the same level of control and security as setting up your own secure server.

A truly secure mail server cannot access your conversations, cannot profile you, do not to show you targeted advertising and not record any data or metadata.

What are the pthe pros and cons of a private mail server?

As with all technical decisions, you should know both the pros and cons of using secure mail servers:

On the pro side:

  • Advanced privacy
  • The server is not available to your employer or your email provider
  • More control over email management
  • Advanced features that general email providers lack

On the downside:

  • Creating a secure email takes time and effort
  • It requires more responsibility (installing software to prevent hacks, learning how to protect messages)
  • It requires a hard drive with sufficient capacity

Basically it’s pRivalry, security and reliability that are the main reasons for creating your private mail server.

Setting up a secure mail server

While the idea of ​​setting up a secure mail server may seem daunting at first, it is actually an easy process. He gets a bit technical, but many resources available online can help you through the process.

Here are some of the things you will need to get started:

  • A domain name (yourdomain.com) that you will use to set up an email address
  • A cloud server or dedicated server with a 1 GHz processor, 1 GB + RAM space and 5 GB disk space
  • Free and open source Mailcow software

When creating a secure personal mail server, it is best to use a cloud server, while businesses would benefit from having a dedicated mail server.

The first one step is to configure the DNS records. You can either use the DNS of the domain registrar, in which you will follow these steps:

  • Log in to the domain registrar
  • Define name servers of [yourdomain.com] to the name servers of your domain registrar
  • Set up the mail.example.com A record to the main server IP
  • Put it on MX record of example.com To: mail.example.com

If you are using an external DNS record, you will follow the same steps listed above, but set the name servers to match your external DNS. Just note that IyouIt will take 24-48 hours for DNS records to propagate before you can receive and send emails.

The following steps will help you install the mail server. First of all you will want connect to your SSH. Then you will need to update system packages, install curl and git, download the docker and folder components and update the docker settings to executable.

The next step after doing these steps is to make sure your umask is 0022 and change to the / opt directory. you will download Cash cow files, change them in the Mailcow directory then generate the configuration file. You will extract the images, run the composer file, and your installation will be complete. You will now be able to connect to your server using your admin username and password.

You will want create a unique password then go to control panel to configure various email domains and email addresses. You go then click on the mailbox tab to add mail users.

Finally, to access the mailbox, use the webmail interface at http://mail.yourdomain.com/SOGo/. From there you can send and receive emails, view your calendar, view and make changes to your address book.

It is suggested that you contact an experienced web solutions provider if you encounter any issues along the way.here are plenty you can go online to help you with any server issues you might be having.


Source link

]]>
https://boomdirectory.com/how-to-set-up-your-own-secure-mail-server/feed/ 0