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
| /* | |
| Basic usage example | |
| Demonstrated some of the basic functionality of the library. Initialize the display, set the backlight brightness, print some text, count from 0 to 100 and print on display and blink some text. | |
| Note: make sure to set your serial monitor to line end: NEW LINE! | |
| The circuit: | |
| * connect TM1637 pin CLK to NodeMCU pin D4 | |
| * connect TM1637 pin DIO to NodeMCU pin D5 |
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
| /* | |
| * TimeAlarmExample.pde | |
| * | |
| * This example calls alarm functions at 8:30 am and at 5:45 pm (17:45) | |
| * and simulates turning lights on at night and off in the morning | |
| * A weekly timer is set for Saturdays at 8:30:30 | |
| * | |
| * A timer is called every 15 seconds | |
| * Another timer is called once only after 10 seconds | |
| * |
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
| # This file contains common pin mappings for RAMPS (v1.3 and later) | |
| # boards. RAMPS boards typically use a firmware compiled for the AVR | |
| # atmega2560 (though other AVR chips are also possible). | |
| # See docs/Config_Reference.md for a description of parameters. | |
| [stepper_x] | |
| step_pin: ar54 | |
| dir_pin: !ar55 |
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 Azure; | |
| using Azure.Storage.Files.DataLake; | |
| using Azure.Storage.Files.DataLake.Models; | |
| using Azure.Storage; | |
| using System.IO; | |
| using Azure.Identity; | |
| using System.IO.Enumeration; | |
| using System.Net.Http.Headers; | |
| using Azure.Identity; | |
| using Azure.Storage.Files.DataLake; |
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 Newtonsoft.Json.Linq; | |
| namespace CognitiveSearchIndexDemo | |
| { | |
| internal class Program | |
| { | |
| const string searchServiceName = "YouCognitiveServiceName"; | |
| const string apiKey = "YouCognitiveServicePIKey"; | |
| const string indexName = "YouCognitiveServiceIndexName"; | |
| const string apiVersion = "2023-07-01-Preview"; |
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
| #Documentation: | |
| #https://learn.microsoft.com/en-us/azure/ai-services/openai/chatgpt-quickstart?tabs=command-line%2Cpython-new&pivots=programming-language-python | |
| #https://medium.com/@alexandre.tkint/dall-e-3-api-getting-started-guide-d945a2249823 | |
| #https://platform.openai.com/docs/guides/vision?lang=python | |
| import os | |
| from openai import AzureOpenAI | |
| import webbrowser | |
| #STEP1A: Have GPT4 generate a description of the ring |
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
| # Pre-requisites: | |
| # 1. Create a service princple in Azure AD | |
| # 2. Create a new client secret for it (note down the client-id, tenant-id, and secret-value) | |
| # 3. Go to the Azure portal and find the Translator service among the Azure AI Services. | |
| # 4. In the Access Control (IAM) tab, assign the service principle the "Cognitive Services User" role | |
| # 5. In the Resource management tab, enable a System assigned Identity. | |
| # 6. under Azure Role Assignment, choose scope: Storage, Resource: your blob storage (where your documents reside), Role: "Storage Blob Data Contributor" | |
| # 7- Run the code below to get the service to translate all documents in one container to another container | |
| from azure.core.credentials import AccessToken, AzureKeyCredential, TokenCredential |
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 os | |
| import requests | |
| import json | |
| ################################## Facts ###################################################### | |
| #GPT costs for GPT-4o and GPT-4o-Mini for Sweden Central per 1000 tokens | |
| #https://azure.microsoft.com/en-us/pricing/calculator | |
| GPT4O_GLOBAL_DEPLOYMENT_INPUT = 0.0025 | |
| GPT4O_GLOBAL_DEPLOYMENT_OUTPUT = 0.0100 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer