How to use Pelican on GitHub Pages 
Author: Josef Jezek
sudo apt-get install python-setuptools
| """ | |
| title: FastAPI Razor Pipe | |
| author: Jim Pringle | |
| version: 0.0.3 | |
| This function connects to a local FastAPI server running an Ollama model. | |
| """ | |
| from typing import Optional, Callable, Awaitable | |
| from pydantic import BaseModel, Field |

Author: Josef Jezek
sudo apt-get install python-setuptools
| # | |
| # I have successfully run this with Anaconda on Windows directly & on WSL2/Ubuntu 22.04 with MiniConda | |
| # | |
| # Make sure you have Anaconda installed | |
| # This tutorial assumes you have an Nvidia GPU, but you can find the non-GPU version on the Textgen WebUI github | |
| # More information found here: https://github.com/oobabooga/text-generation-webui | |
| # Make sure you have the CUDA 11.8 & cuDNN 11.x installed | |
| # CUDA Toolkit 11.8: https://developer.nvidia.com/cuda-18-7-0-download-archive |
| defmodule Ellow.Zones.BFS do | |
| def zone_map(name, parent \\ nil) do | |
| %{ | |
| name: name, | |
| distance: 0, | |
| parent: nil | |
| } | |
| end |
| function git_branch() { | |
| git_branch=$(git branch --no-color 2>/dev/null | grep \* | sed 's/* //') | |
| if [ $git_branch ] | |
| then | |
| white="\001\033[0;37m\002" | |
| yellow="\001\033[0;33m\002" | |
| blue="\001\033[0;34m\002" | |
| red="\001\033[0;31m\002" | |
| green="\001\033[0;32m\002" |
| SELECT nspname || '.' || relname AS "relation", | |
| pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" | |
| FROM pg_class C | |
| LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
| WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
| AND C.relkind <> 'i' | |
| AND nspname !~ '^pg_toast' | |
| ORDER BY pg_total_relation_size(C.oid) DESC | |
| LIMIT 20; |
| ALTER SEQUENCE <tableName>_<id>_seq RESTART WITH 1 |
| var ip = (function() { | |
| var _privateIps = [ | |
| '10.0.0.0', | |
| '10.255.255.255', | |
| '172.16.0.0', | |
| '172.31.255.255', | |
| '192.168.0.0', | |
| '192.168.255.255' | |
| ]; |
| #!/bin/bash | |
| # history_of_file | |
| # | |
| # Outputs the full history of a given file as a sequence of | |
| # logentry/diff pairs. The first revision of the file is emitted as | |
| # full text since there's not previous version to compare it to. | |
| function history_of_file() { | |
| url=$1 # current url of file |
| on open (theList) | |
| -- I found these extensions for video files here | |
| -- we can check the file extensions of a file against this list to evaluate if it's a video file | |
| set video_ext_list to {"3g2", "3gp", "3gp2", "3gpp", "3mm", "60d", "aep", "ajp", "amv", "asf", "asx", "avb", "avi", "avs", "bik", "bix", "box", "byu", "cvc", "dce", "dif", "dir", "divx", "dv", "dvr-ms", "dxr", "eye", "fcp", "flc", "fli", "flv", "flx", "gl", "grasp", "gvi", "gvp", "ifo", "imovieproject", "ivf", "ivs", "izz", "izzy", "lsf", "lsx", "m1v", "m2v", "m4e", "m4u", "m4v", "mjp", "mkv", "moov", "mov", "movie", "mp4", "mpe", "mpeg", "mpg", "mpv2", "msh", "mswmm", "mvb", "mvc", "nvc", "ogm", "omf", "prproj", "prx", "qt", "qtch", "rm", "rmvb", "rp", "rts", "sbk", "scm", "smil", "smv", "spl", "srt", "ssm", "svi", "swf", "swi", "tivo", "ts", "vdo", "vf", "vfw", "vid", "viewlet", "viv", "vivo", "vob", "vro", "wm", "wmd", "wmv", "wmx", "wvx", "yuv"} | |
| -- notice the use of "entire contents" to also go through subfolders of f | |
| -- use a "whose" f |