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() | |
| r = (255, 0, 0) # red | |
| g = (0, 255, 0) # green | |
| b = (0, 0, 255) # blue | |
| w = (255,255,255) # white | |
| e = (0,0,0) # empty, no light - black | |
| # 8x8 matrix RGB display |
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() | |
| r = (255, 0, 0) # red | |
| g = (0, 255, 0) # green | |
| b = (0, 0, 255) # blue | |
| w = (255,255,255) # white | |
| e = (0,0,0) # empty, no light - black | |
| # 8x8 matrix RGB display |
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() | |
| sense.show_message("1. IT Gymnazium", text_colour = (0, 255, 0)) |
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
| using System; | |
| using System.Net; | |
| using System.Text; | |
| namespace VisionDemo | |
| { | |
| class Program | |
| { | |
| private const string LOCATION = ""; | |
| private const string KEY = ""; |
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 Storage Account | |
| // Azure Storage Account name <storage-account-name> | |
| var storage_account_name = "" | |
| // <file-system-name> | |
| var file_system_name = "logs" | |
| // From AD | |
| // Application (client) ID <application-id> | |
| var application_id = "" | |
| // Key <authentication-key> for application |
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
| curl -H "Ocp-Apim-Subscription-Key: {KEY}" -H "Content-Type: application/json" "https://{LOCATION}.api.cognitive.microsoft.com/vision/v3.1/generateThumbnail?width=100&height=100&smartCropping=true" -d "{\"url\":\"https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Shorkie_Poo_Puppy.jpg/1280px-Shorkie_Poo_Puppy.jpg\"}" -o small_dog.jpg |
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
| export RESOURCE_GROUP="" | |
| export RESOURCE_NAME="" | |
| export LOCATION="" | |
| export DB_NAME="" | |
| export COLLECTION="" | |
| export PARTITION_KEY="" | |
| az group create --name $RESOURCE_GROUP --location $LOCATION | |
| az cosmosdb create --name $RESOURCE_NAME --kind GlobalDocumentDB --resource-group $RESOURCE_GROUP | |
| az cosmosdb sql database create --name $DB_NAME --account-name $RESOURCE_NAME --resource-group $RESOURCE_GROUP |
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 picamera import PiCamera | |
| from azure.storage.blob import BlobServiceClient, BlobClient, BlobSasPermissions, generate_blob_sas | |
| from datetime import datetime, timedelta | |
| # You need to create container first | |
| container_name = '' | |
| account_name = '' | |
| key = '' | |
| connection_string = 'DefaultEndpointsProtocol=https;AccountName=' + account_name + ';AccountKey=' + key + ';EndpointSuffix=core.windows.net' |
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
| import requests | |
| from pprint import pprint | |
| subscription_key = '' | |
| endpoint = '' | |
| api_url = endpoint + 'vision/v3.1/analyze' | |
| image_url = '' | |
| headers = {'Ocp-Apim-Subscription-Key': subscription_key, | |
| 'Content-Type': 'application/json'} |
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
| /* | |
| You neeed to create App.config file with this content | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <appSettings> | |
| <add key="storage" value="YOUR CONNECTION SRING TO AZURE STORAGE ACCOUNT" /> | |
| </appSettings> | |
| </configuration> |
OlderNewer