Hugo menu generator
How to use the script layouts/partials/menu.html Reference the partial: Include the partial in your theme’s header or layout file: layouts/partials/header.html Run the script: From your terminal, run the Python script.
How to use the script layouts/partials/menu.html Reference the partial: Include the partial in your theme’s header or layout file: layouts/partials/header.html Run the script: From your terminal, run the Python script.
The context field in an Ollama API response (specifically from the /api/chat endpoint) is an array of numbers that represents an encoding of the conversation history. This array is crucial…
There are several methods to determine if a Python venv (virtual environment) is active: 1. Shell Prompt Indication: When a virtual environment is activated, its name typically appears in parentheses…
To run a chat example with Ollama and Python, you must first have the Ollama application installed and running locally, and have a model downloaded. You will then use the…
Some examples of reading a file with Python:
Getting an error trying to install python package: There are several ways to determine if a Python venv (virtual environment) is active: Terminal Prompt Indication. When a virtual environment is…
From Hard-Coded Values to OpenAPI Generated Clients Building command-line interface (CLI) tools in Python is a fundamental skill for automation and system interaction. The journey of developing a robust CLI…
Download / Install / Extract ‘openai’ python functions
Looking for an automated way to backup Kubernete resources Generating .yaml export for each resource. This is still a work in progress…I need to:— evaluate and validate the exported yaml…
import argparse import os import sys def getFiles(_path,_ext,_debug): rtn_list = [] if (_debug > 0): print(f" getFiles({_path},{_ext},{_debug})") list_dir = os.listdir(_path) if not list_dir: print(" **getFiles returned nothing **") else: for…