The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.
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 ollama | |
| from pydantic import BaseModel, Field | |
| from typing import Literal, List | |
| # Define a more descriptive JSON structure using Pydantic. | |
| class UserInfo(BaseModel): | |
| name: str = Field(description="The full name of the user who wrote the text.") | |
| sentiment: Literal["positive", "neutral", "negative"] = Field( | |
| description="The overall sentiment of the text." | |
| ) |
A deep dive into the skills system in Kilo Code, explaining discovery, loading, activation, and best practices for writing skills that trigger reliably.
Unofficial AKS Cheat Sheet
Official AKS FAQ is here
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
| //AZ CLI query resources | |
| https://techcommunity.microsoft.com/t5/itops-talk-blog/how-to-query-azure-resources-using-the-azure-cli/ba-p/360147 | |
| Azure CLI/PowerShell commands | |
| //LOGIN & SUBSCRIPTION | |
| //to login using service principal | |
| az login --service-principal -u {appid} -p {password} --tenant {tenant} |
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":"https://schema.management.azure.com/schemas/2018-05-01/policyDefinition.json#", | |
| "$schema":"http://json-schema.org/draft-04/schema#", | |
| "title":"Policy Definition", | |
| "description":"This schema defines Azure resource policy definition, please see https://azure.microsoft.com/en-us/documentation/articles/resource-manager-policy/ for more details.", | |
| "type":"object", | |
| "properties":{ | |
| "if":{ | |
| "oneOf":[ | |
| { |
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
| ############################################################################################ | |
| # REACTIVE TABLE DEMO WITH FASTHTML AND DATASTAR | |
| # | |
| # This example demonstrates: | |
| # 1. Building a reactive data table with real-time filtering and pagination | |
| # 2. Using Datastar for reactive UI updates without page refreshes | |
| # 3. Implementing DaisyUI and TailwindCSS for modern styling | |
| # 4. Handling user interactions with side effects (selection, filtering, pagination) | |
| ############################################################################################ |
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 bs4 import BeautifulSoup | |
| def get_table_from_slickcharts(url: str) -> List[Dict[str, Union[str, float]]]: | |
| # parse table for symbols from slickcharts | |
| headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} | |
| response = requests.get(url, headers=headers) | |
| data = [] |
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 json | |
| print('Loading function') | |
| def lambda_handler(event, context): | |
| print('------------------------') | |
| print(event) | |
| #1. Iterate over each record | |
| try: | |
| for record in event['Records']: |
NewerOlder