Download Flower Dataset Using TensorFlow

AmitDiwan
Updated on 19-Feb-2021 17:20:43

407 Views

The flower dataset can be downloaded using a google API that basically links to the flower dataset. The ‘get_file’ method can be used to pass the API as a parameter. Once this is done, the data gets downloaded into the environment.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We will be using the flowers dataset, which contains images of several thousands of flowers. It contains 5 sub-directories, and there is one sub-directory for every class.  We are using the Google Colaboratory to run the below code. Google Colab or Colaboratory helps run Python code ... Read More

Add New Element in XML Using PowerShell

Chirag Nagrekar
Updated on 19-Feb-2021 13:18:54

9K+ Views

Suppose we have a XML file as shown below.           Gambardella, Matthew       XML Developer's Guide       Computer       44.95       2000-10-01       An in-depth look at creating applications with XML.     We need to add a new node. So we will first load the XML file and then operate on it as shown below.The below command will save the XML file to the variable.$xmlfile = [XML](Get-Content C:\Temp\SampleXML.xml)The below command will create a new XML element$newelement = $xmlfile.CreateElement("book")Once the element is created we need ... Read More

Run Invoke-Command in PowerShell Workflow

Chirag Nagrekar
Updated on 19-Feb-2021 13:15:55

1K+ Views

To run Invoke-Command in PowerShell Workflow we need to use the InlineScript block because Invoke-Command is not supported directly in the workflow. The below example is without using the InlineScript block we get an error.ExampleWorkflow TestInvokeCommand{    Invoke-Command -ComputerName LabMachine2k16 -ScriptBlock{       Get-Service WINRM    } }Output −At line:2 char:5 +    Invoke-Command -ComputerName LabMachine2k16 -ScriptBlock{ +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cannot call the 'Invoke-Command' command. Other commands from this module have been packaged as workflow activities, but this command was specifically excluded. This is likely because the command requires an interactive Windows PowerShell session, or has behavior not suited ... Read More

Remove Windows Service with PowerShell

Chirag Nagrekar
Updated on 19-Feb-2021 13:13:54

6K+ Views

We need to remove the window service named TestService using PowerShell. If you are using PowerShell 6.0 or above version, you can directly use a cmdlet Remove-Service command as shown below.In this example, we have a service name called TestService.Remove-Service Testservice -Confirm:$false -VerboseIf you are using the PowerShell framework version (5.1 or below), you need to use the registry. Services are stored in the registry at the below location.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\To delete the service, we need to remove that service key with the command as shown below.Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\TestService | Remove-Item -Force -Verbose Here we are using the Service name TestService and you need to reboot the server ... Read More

Parallel and Sequence Execution in PowerShell Workflow

Chirag Nagrekar
Updated on 19-Feb-2021 13:08:19

1K+ Views

PowerShell workflows are the best way to design the script to execute on more than one node parallel which saves extensive time for the output to produce but we always don’t want to run all the commands parallel but also need some of them to run sequentially and we can design both Parallel and Sequence commands using PowerShell Workflow.Workflow TestWorkflow{    parallel{       Command1       Command2    }    Sequence{       Command3       Command4    } } TestWorkflowIn the above code, Command1, Command2 will be executed parallelly in any order while command3 ... Read More

Use the ForEach Loop Parallelly in PowerShell

Chirag Nagrekar
Updated on 19-Feb-2021 13:05:09

10K+ Views

There are two ways to use the foreach loop parallelly in PowerShell.Using Foreach-Object -Parallel command (Supports in PowerShell 7.0 or above)Using Foreach -Parallel in Workflow (Supports PowerShell 5.1 or below)Suppose we have Servers.txt and which contains 10 Servers. When we use the Parallel for loop, it isn’t guaranteed which server loop will pick first as shown below with two examples.Using Foreach-Object-Parallel command. (not Foreach -Parallel)This Foreach-Object -Parallel command feature is newly added to the PowerShell version 7.0 or above.Example$servers = Get-Content C:\Temp\Servers.txt $servers | foreach-Object -parallel{    Write-output "Working on $_" }OutputPS C:\> C:\Temp\Test1.ps1 Working on IndiaServer003 Working on IndiaServer002 Working on IndiaServer001 Working on ... Read More

What is the PowerShell Workflow

Chirag Nagrekar
Updated on 19-Feb-2021 13:01:31

468 Views

PowerShell workflow is built on the .Net based Windows Workflow Foundation (WWF) and it has a separate Workflow engine to execute the code because it translates code into XAML for the WWF framework.PowerShell workflow is series of steps that is mainly used forRunning activities parallelly on more than one machine.Long-running scripts.Structuring steps (Which steps will execute parallel and which in sequence)Frequently used tasks.Resuming the script from where it was terminated due to system failure or any other interruption by defining checkpoints.The PowerShell workflow was introduced in PowerShell 3.0 and discontinued for windows in the Core version (6.0 onwards) and only ... Read More

Validate IP Address Using PowerShell

Chirag Nagrekar
Updated on 19-Feb-2021 12:59:09

2K+ Views

To validate the IP address using PowerShell, we can use several methods as shown below.Using RegEx method.Using Typecasting method.Using TypeCasting method.In this method, we are using System.Net method class IPAddress to validate the IP address.[ipaddress]$IP = "192.168.0.1"The above one is valid. Let’s check what $IP stores in.PS C:\> $IP Address : 16820416 AddressFamily : InterNetwork ScopeId : IsIPv6Multicast : False IsIPv6LinkLocal : False IsIPv6SiteLocal : False IsIPv6Teredo : False IsIPv4MappedToIPv6 : False IPAddressToString : 192.168.0.1The above one is Ipv4 and this method also works for IPv6. See the example below.PS C:\> [ipaddress]"2001:0db8:85a3:0000:0000:8a2e:0370:7334" Address : AddressFamily : InterNetworkV6 ScopeId ... Read More

Navigating Your Dashboard in Canva

Zahwah Jameel
Updated on 19-Feb-2021 11:05:35

595 Views

Canva is a free graphic designing tool that allows you to create professional designs without any prior skills.Before you dive in and start designing with Canva, you should know about the dashboard of your Canva account so that you can use the features.This is how your account’s dashboard on Canva will look like.Here a few things you can do through your account’s dashboard.Creating a designYou can go to the design tab through various ways from your dashboard.You can click on the ‘create a design’ option present in the top-right corner.You can scroll down and select the suitable template to start ... Read More

Design a Logo Using Canva

Zahwah Jameel
Updated on 19-Feb-2021 11:01:58

1K+ Views

If you are looking to create a logo that represents the face of your company but you don’t have the skills, you can always use Canva. Canva helps you create professional designs in a few minutes. Besides, Canva is free and open to everyone.To create a logo using Canva, follow these four steps.Click ‘create a design’Go to the homepage of Canva and press the ‘create a design’ button. You will find it on the topmost right corner of your dashboard.From the drop−down list of options, select the logo.You will be automatically redirected to the design tab.Select a suitable templateThis is ... Read More

Advertisements