This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://docs.microsoft.com/en-us/azure/cognitive-services/Custom-Vision-Service/quickstarts/object-detection?tabs=visual-studio&pivots=programming-language-javascript | |
| const util = require('util'); | |
| const fs = require('fs'); | |
| const TrainingApi = require("@azure/cognitiveservices-customvision-training"); | |
| const PredictionApi = require("@azure/cognitiveservices-customvision-prediction"); | |
| const msRest = require("@azure/ms-rest-js"); | |
| const trainingKey = ""; | |
| const predictionKey = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://docs.microsoft.com/en-us/azure/cognitive-services/Custom-Vision-Service/quickstarts/image-classification?tabs=visual-studio&pivots=programming-language-javascript | |
| const util = require('util'); | |
| const fs = require('fs'); | |
| const TrainingApi = require("@azure/cognitiveservices-customvision-training"); | |
| const PredictionApi = require("@azure/cognitiveservices-customvision-prediction"); | |
| const msRest = require("@azure/ms-rest-js"); | |
| const trainingKey = ""; | |
| const predictionKey = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://pypi.org/project/azure-iot-device/ | |
| from azure.iot.device import IoTHubDeviceClient, Message | |
| from sense_hat import SenseHat | |
| sense = SenseHat() | |
| t = sense.get_temperature() | |
| h = sense.get_humidity() | |
| p = sense.get_pressure() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-how-to?tabs=azure-portal | |
| # https://tower.hardwario.com/en/latest/hardware/about-climate-module/ | |
| import os | |
| import datetime | |
| from paho.mqtt import client as mqtt | |
| from azure.storage.blob import BlobClient | |
| from azure.storage.blob import ContentSettings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://tower.hardwario.com/en/latest/hardware/about-climate-module/ | |
| # | |
| # MariaDB database setup | |
| # | |
| # create database climate; | |
| # create user 'python'@'localhost' identified by 'Pyth0n'; | |
| # grant all privileges on climate.* to 'python'@'localhost'; | |
| # FLUSH PRIVILEGES; | |
| # | |
| # create table temperature( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://docs.microsoft.com/en-us/graph/powershell/installation | |
| # https://docs.microsoft.com/en-us/graph/powershell/get-started | |
| # https://developer.microsoft.com/en-us/graph/graph-explorer | |
| # https://tech.nicolonsky.ch/exploring-the-new-microsoft-graph-powershell-modules/ | |
| Connect-MgGraph -Scopes "User.Read.All", "GroupMember.Read.All", "Group.Read.All", "Directory.Read.All" | |
| $GROUP_NAME = 'Workspace' | |
| $group = Get-MgGroup -Filter "DisplayName eq '$GROUP_NAME'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": "f7035dda.42292", | |
| "type": "tab", | |
| "label": "Grove", | |
| "disabled": false, | |
| "info": "" | |
| }, | |
| { | |
| "id": "9c65bcd0.754a7", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Cron | |
| # 0,30 * * * * /usr/bin/python3 /home/pi/rpi_grove_temperature_humidity.py | |
| import time | |
| import requests | |
| # https://wiki.seeedstudio.com/Grove-TempAndHumi_Sensor-SHT31/ | |
| # https://github.com/Seeed-Studio/grove.py | |
| # https://seeed-studio.github.io/grove.py/ | |
| from grove.i2c import Bus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sense_hat import SenseHat | |
| sense = SenseHat() | |
| # https://en.wikipedia.org/wiki/Flag_of_Ukraine | |
| b = [0, 87, 183] # Strong azure | |
| y = [255, 215, 0] # Yellow | |
| o = [0, 0, 0] # off | |
| ua_flag = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Azure Active Directory domain | |
| $domain = "" | |
| $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile | |
| $PasswordProfile.Password = "" | |
| $PasswordProfile.ForceChangePasswordNextLogin = $false | |
| $resourceUrlPrefix = "https://portal.azure.com/#" + $domain + "/resource/" | |
| $location = "westeurope" |