ARB Security Solutions, LLC.

Archive for the ‘Automation’ Category

Evaluate Model With PyTorch, Send To SharePoint Online

Add an evaluate_model() function that computes an evaluation metric for the trained model. The save_model() function still saves the model to a file using The upload_to_sharepoint() function has been updated to upload both the model file and the evaluation metrics file to the specified target folder in the SharePoint Online document library. import os […]

Pytorch To Train An ML Model, Upload to SPO

This script trains a simple PyTorch model (in this case, a linear regression model) and saves it to a file using It then uses the Office365 and Site classes from the shareplum library to authenticate and connect to SharePoint Online. The upload_to_sharepoint() function uploads the model file to the specified target folder in the […]

Tests all CIS benchmarks in Office 365 using the Microsoft Cloud Security Benchmark

# Function to check if a specific Office 365 configuration meets the CIS benchmarkfunction Test-Office365CIS { param ( [Parameter(Mandatory = $true)] [string]$BenchmarkID, [Parameter(Mandatory = $true)] [string]$Configuration ) # Logic to test the Office 365 configuration against the CIS benchmark # Implement your own logic here to check specific Office 365 configurations # Return the result […]

Use PyTorch and SharePoint Online to Train a Simple Neural Network on the Iris dataset

This example shows how to train a simple neural network on the Iris dataset using PyTorch, save the trained model to SharePoint Online, load the trained model from SharePoint Online, and use it to make predictions on new data. This is a common workflow in machine learning, and SharePoint Online can be a useful tool […]

SharePoint Online to Store and Retrieve PyTorch Models

This example uses SharePoint Online to store and retrieve PyTorch models. It first defines a PyTorch model (in this case, a ResNet18 model), and then defines two functions to save and load PyTorch models to and from SharePoint Online. The save_model_to_sharepoint function takes a PyTorch model and a filename as inputs, and saves the model […]

Combining SharePoint Online, PyTorch, and Flask

Using a pre-trained ResNet18 model to classify images of cats and dogs, first load the PyTorch model weights from a file stored in a SharePoint Online document library. Then, it defines a Flask app with two routes: one to display a form for uploading an image, and another to receive the uploaded image, preprocess it, […]

SharePoint Online Text Classification With PyTorch

Connect to SharePoint Online, extract text data from a list, load the data into a custom PyTorch dataset, train a simple DistilBERT model using the dataset, and use the trained model to predict the label for a new test text. Blah. # Import required libraries import pandas as pd import torch import torch.nn as nn […]

SharePoint Online and PyTorch for Image Classification

This example shows how to use Python to connect to SharePoint Online, extract image data from a list, load the data into a custom PyTorch dataset, train a simple CNN model using the dataset, and use the trained model to predict the label for a new test image. # Import required libraries import requests import […]

Sentiment Analysis With PyTorch ML On Feedback Data in SharePoint Online

Connect to SharePoint Online and extract customer feedback data from a SharePoint Online list named CustomerFeedback. The feedback and corresponding sentiment labels are then loaded into a custom PyTorch dataset, which is used to train a DistilBERT-based sentiment analysis model. The trained model is then used to predict the sentiment labels for a test dataset […]

Using PyTorch To Deep Learn SharePoint Online Data

This script uses the office365 Python library to connect to SharePoint Online and retrieve data from a specified list. The data is then converted to PyTorch tensors for use in the machine learning model. The model architecture, loss function, and optimizer are defined and used to train the model on the data. The trained model […]