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
| " Reference: http://stackoverflow.com/questions/7159607 " | |
| import os | |
| import sys | |
| def listdir(path): | |
| """ | |
| recursively walk directory to specified depth | |
| :param path: (str) path to list files from |
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 module provides utilities to run shell commands with enhanced features such as: | |
| - Automatic detection of the operating system prompt symbol. | |
| - Colored command prompt and output using colorama (with fallback if colorama is | |
| not installed). | |
| - Flattening of command arguments that can be strings or sequences of strings. | |
| - Automatic prepending of 'uv run' to Python commands if the 'uv' tool is installed. | |
| - Optional working directory and environment variable support. | |
| - Capturing and displaying command output with customizable colors. |
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
| { | |
| "Timestamp": "2025-07-15T15:03:45.123Z", | |
| "Level": "Information", | |
| "Message": "User login successful", | |
| "CorrelationId": "123e4567-e89b-12d3-a456-426614174000", | |
| "Service": "AuthService", | |
| "Environment": "Production", | |
| "UserId": "user123", | |
| "SourceContext": "AuthController", | |
| "Exception": null |
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 fasthtml.common import * | |
| from fastlite import Database, Table | |
| from typing import List, Dict, Any | |
| # Initialize FastLite database | |
| db = Database("users.db") | |
| Users = db.t.users | |
| if not Users.exists(): | |
| Users.create(id=int, name=str, email=str, pk="id") |
NewerOlder