Blog

  • Prepare for guided project

    You’ll be using the .NET Editor as your code development environment. You’ll be writing code that uses string and numeric variables, performs calculations, and displays results to a console.

    Project overview

    You’re developing a Student Grading application that automates the calculation of current grades for each student in a class. The parameters for your application are:

    • You’re given a short list of four students and their five assignment grades.
    • Each assignment grade is expressed as an integer value, 0-100, where 100 represents 100% correct.
    • Final scores are calculated as an average of the five assignment scores.
    • Your application needs to perform basic math operations to calculate the final grades for each student.
    • Your application needs to output/display each student’s name and final score.

    Currently, the teachers grade book shows the graded assignments for each student as follows:Copy

    Sophia: 93, 87, 98, 95, 100
    
    Nicolas: 80, 83, 82, 88, 85
    
    Zahirah:   84, 96, 73, 85, 79
    
    Jeong:  90, 92, 98, 100, 97
    

    The teacher requires that the calculated grades for each student are displayed as follows:Copy

    Student     Grade
    Sophia      94.6  A
    Nicolas     83.6  B
    Zahirah     83.4  B
    Jeong       95.4  A
    
    feature

  • Locate commands

    cmdlet (pronounced “command-let”) is a compiled command. A cmdlet can be developed in .NET or .NET Core and invoked as a command within PowerShell. Thousands of cmdlets are available in your PowerShell installation. The challenge lies in discovering what the cmdlets are and what they can do for you.

    Cmdlets are named according to a verb-noun naming standard. This pattern can help you to understand what they do and how to search for them. It also helps cmdlet developers create consistent names. You can see the list of approved verbs by using the Get-Verb cmdlet. Verbs are organized according to activity type and function.

    Here’s a part of the output from running Get-Verb:

    OutputCopy

    Verb        AliasPrefix Group          Description
    ----        ----------- -----          -----------
    Add         a           Common         Adds a resource to a container, or atta…
    Clear       cl          Common         Removes all the resources from a contai…
    

    This listing shows the verb and its description. Cmdlet developers should use an approved verb, and also ensure that the verb description fits their cmdlet’s function.

    Three core cmdlets allow you to delve into what cmdlets exist and what they do:

    • Get-Command: The Get-Command cmdlet lists all of the available cmdlets on your system. Filter the list to quickly find the command you need.
    • Get-Help: Run the Get-Help core cmdlet to invoke a built-in help system. You can also run an alias help command to invoke Get-Help but improve the reading experience by paginating the response.
    • Get-Member: When you call a command, the response is an object that contains many properties. Run the Get-Member core cmdlet to drill down into that response and learn more about it.
    erp

  • What is PowerShell?

    PowerShell consists of two parts: a command-line shell and a scripting language. It started out as a framework to automate administrative tasks in Windows. PowerShell has grown into a cross-platform tool that’s used for many kinds of tasks.

    A command-line shell lacks a graphical interface, where you use a mouse to interact with graphical elements. Instead, you type text commands into a computer console. Here are some of the benefits of using a console:

    • Interacting with a console is often faster than using a graphical interface.
    • In a console, you can run batches of commands, so it’s ideal for task automation for continuous-integration pipelines.
    • You can use a console to interact with cloud resources and other resources.
    • You can store commands and scripts in a text file and use a source-control system. This capability is probably one of the biggest benefits, because your commands are repeatable and auditable. In many systems, especially government systems, everything must be traced and evaluated, or audited. Audits cover everything from database changes to changes done by a script.

    Features

    PowerShell shares some features with traditional shells:

    • Built-in help system: Most shells have some kind of help system, in which you can learn more about a command. For example, you can learn what the command does and what parameters it supports. The help system in PowerShell provides information about commands and also integrates with online help articles.
    • Pipeline: Traditional shells use a pipeline to run many commands sequentially. The output of one command is the input for the next command. PowerShell implements this concept like traditional shells, but it differs because it operates on objects over text. You learn more about this feature later in this module.
    • Aliases: Aliases are alternate names that can be used to run commands. PowerShell supports the use of common aliases such as cls (clear the screen) and ls (list the files). Therefore, new users can use their knowledge of other frameworks and don’t necessarily have to remember the PowerShell name for familiar commands.

    PowerShell differs from a traditional command-line shell in a few ways:

    • It operates on objects over text. In a command-line shell, you have to run scripts whose output and input might differ, so you end up spending time formatting the output and extracting the data you need. By contrast, in PowerShell you use objects as input and output. That means you spend less time formatting and extracting.
    • It has cmdlets. Commands in PowerShell are called cmdlets (pronounced commandlets). In PowerShell, cmdlets are built on a common runtime rather than separate executables as they are in many other shell environments. This characteristic provides a consistent experience in parameter parsing and pipeline behavior. Cmdlets typically take object input and return objects. The core cmdlets in PowerShell are built in .NET Core, and are open source. You can extend PowerShell by using more cmdlets, scripts, and functions from the community and other sources, or you can build your own cmdlets in .NET Core or PowerShell.
    • It has many types of commands. Commands in PowerShell can be native executables, cmdlets, functions, scripts, or aliases. Every command you run belongs to one of these types. The words command and cmdlet are often used interchangeably, because a cmdlet is a type of command.
    digital transformation

  • When should you use Azure Cloud Shell?

    As an IT Admin for Contoso Corporation, you need alternatives to interact with Azure resources from the command line even when not using your default administrative device.

    You can use Azure Cloud Shell to:

    • Open a secure command-line session from any browser-based device.
    • Interact with Azure resources without the need to install plug-ins or add-ons to your device.
    • Persist files between sessions for later use.
    • Use either Bash or PowerShell, whichever you prefer, to manage Azure resources.
    • Edit files (such as scripts) via the Cloud Shell editor.
    data analytics

  • How does Azure Cloud Shell work?

    As an IT admin for Contoso Corporation, you’re frequently on-call to perform administrative tasks and resolve workload disruptions to resources in your organization’s Azure subscriptions. When visiting a family member during a weekend that you’re on call, the development team notifies you of a problem with an Azure virtual machine (VM). The VM became nonresponsive during scheduled maintenance for the upgrade of an application that runs on it. Because the developers weren’t granted access to the underlying Azure virtual machine hosting infrastructure, they’re only able to remotely access the VM when it’s operating normally. So, you’re being called to diagnose and remediate the problem.

    Since you’re visiting family, you don’t have access to your administrative workstation and diagnostic scripts. You do have access to a laptop with an internet browser. Using the laptop, you browse to the Azure portal, authenticate against your organization’s Azure subscription, open Azure Cloud Shell, mount an Azure File Share, access your diagnostic scripts, and diagnose and remediate the problems with the VM, returning it to operation.

    cyber security

  • What is Azure Cloud Shell?

    Azure Cloud Shell is a command-line environment you can access through your web browser. You can use this environment to manage Azure resources, including VMs, storage, and networking. Just like you do when using the Azure CLI or Azure PowerShell.

    Because Microsoft manages Cloud Shell, you always have access to the most recent versions of the Azure CLI and PowerShell modules right from any browser. You don’t have to worry about keeping modules up to date. With Cloud Shell, you just open your browser and sign in. Just like that, you have access to a command-line environment fully connected with your account’s permissions and the resources to which you have access. All that works in an infrastructure that’s compliant with double encryption at rest by default. You don’t need to take any further action!

    https://cosmicnext.com/crm

  • Develop an object detection client application

    After you’ve trained an object detection model, you can use the Azure AI Custom Vision SDK to develop a client application that submits new images to be analyzed.

    C#Copy

    using System;
    using System.IO;
    using Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction;
    
    // Authenticate a client for the prediction API
    CustomVisionPredictionClient prediction_client = new CustomVisionPredictionClient(new ApiKeyServiceClientCredentials("<YOUR_PREDICTION_RESOURCE_KEY>"))
    {
        Endpoint = "<YOUR_PREDICTION_RESOURCE_ENDPOINT>"
    };
    
    // Get classification predictions for an image
    MemoryStream image_data = new MemoryStream(File.ReadAllBytes("<PATH_TO_IMAGE_FILE>"));
    var result = prediction_client.DetectImage("<YOUR_PROJECT_ID>",
                                                 "<YOUR_PUBLISHED_MODEL_NAME>",
                                                 image_data);
    
    // Process predictions
    foreach (var prediction in result.Predictions)
    {
        if (prediction.Probability > 0.5)
        {
            var left = prediction.BoundingBox.Left;
            var top = prediction.BoundingBox.Top;
            var height = prediction.BoundingBox.Height;
            var width =  prediction.BoundingBox.Width;
            Console.WriteLine($"{prediction.TagName} ({prediction.Probability})");
            Console.WriteLine($"  Left:{left}, Top:{top}, Height:{height}, Width:{width}");
        }
    }
    
    contact
  • Train an object detector

    Object detection is a form of computer vision in which a model is trained to detect the presence and location of one or more classes of object in an image.

    Photograph with the location and type of fruits detected.

    There are two components to an object detection prediction:

    • The class label of each object detected in the image. For example, you might ascertain that an image contains an apple, an orange, and a banana.
    • The location of each object within the image, indicated as coordinates of a bounding box that encloses the object.

    To train an object detection model, you can use the Azure AI Custom Vision portal to upload and label images before training, evaluating, testing, and publishing the model; or you can use the REST API or a language-specific SDK to write code that performs the training tasks.

    Image labeling

    You can use Azure AI Custom Vision to create projects for image classification or object detection. The most significant difference between training an image classification model and training an object detection model is the labeling of the images with tags. While image classification requires one or more tags that apply to the whole image, object detection requires that each label consists of a tag and a region that defines the bounding box for each object in an image.

    Labeling images in the Azure AI Custom Vision portal

    The Azure AI Custom Vision portal provides a graphical interface that you can use to label your training images.

    Screenshot of tagged images in the Azure AI Custom Vision portal.

    The easiest option for labeling images for object detection is to use the interactive interface in the Azure AI Custom Vision portal. This interface automatically suggests regions that contain objects, to which you can assign tags or adjust by dragging the bounding box to enclose the object you want to label.

    Additionally, after tagging an initial batch of images, you can train the model. Subsequent labeling of new images can benefit from the smart labeler tool in the portal, which can suggest not only the regions, but the classes of object they contain.

    application services

  • Use Azure AI Custom Vision for object detection

    To use the Custom Vision service to create an object detection solution, you need two Custom Vision resources in your Azure subscription:

    • An Azure AI Custom Vision training resource – used to train a custom model based on your own training images.
    • An Azure AI Custom Vision prediction resource – used to generate predictions from new images based on your trained model.

    When you provision the Azure AI Custom Vision service in an Azure subscription, you can choose to create one or both of these resources. This separation of training and prediction provides flexibility. For example, you can use a training resource in one region to train your model using your own image data; and then deploy one or more prediction resources in other regions to support computer vision applications that need to use your model.

    Each resource has its own unique endpoint and authentication keys; which are used by client applications to connect and authenticate to the service.

    about 2

  • Use data pipelines to load a warehouse

    Microsoft Fabric’s Warehouse provides integrated data ingestion tools, enabling users to load and ingest data into warehouses on a large scale through either coding or noncoding experiences.

    Data pipeline is the cloud-based service for data integration, which enables the creation of workflows for data movement and data transformation at scale. You can create and schedule data pipelines that can ingest and load data from disparate data stores. You can build complex ETL, or ELT processes that transform data visually with data flows.

    Most of the functionality of data pipelines in Microsoft Fabric comes from Azure Data Factory, allowing for seamless integration and utilization of its features within the Microsoft Fabric ecosystem.

    https://cosmicnext.com/about