Skip to content

Instantly share code, notes, and snippets.

View ianmiell's full-sized avatar

Ian Miell ianmiell

View GitHub Profile
#!/bin/zsh
set -o errexit
cd /media/storage_1/photos_and_vids
for f in $(find . -type f | grep -Ei '(.jpg$|.jpeg$|.gif$|.png$|.bmp$)')
do
new_name="$(llava-v1.5-7b-q4.llamafile --cli --image $f --temp 0 --grammar 'root ::= [a-z]+ (" " [a-z]+)+' -n 30 -e -p '### User: The image looks like it has within it (described very concisely)...\n### Assistant:' --silent-prompt 2>/dev/null | sed -e's/ /_/g')"
suffix="${f##*.}"
filename="$(basename $f)"
dirname="$(dirname $f)"
old_filename="${filename%.*}"
@ianmiell
ianmiell / ANSI.md
Created February 12, 2023 13:25 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
{
"name": "flare",
"children": [
{
"name": "the analytics of something is a very long sentence\ndoes this work to make things a bit more readable",
"children": [
{
"name": "How would this work with an AgglomerativeCluster node being there",
"children": [
{"name": "How would this work with an AgglomerativeCluster node being there", "size": 39380},
height: 800
@ianmiell
ianmiell / git-remote-url
Created April 1, 2021 08:05
Script to get git repo link
#!/bin/bash
# based on: https://stackoverflow.com/questions/47524709/how-to-get-the-full-path-of-a-file-in-a-git-remote-repo
#set -o xtrace
set -o errexit
set -o nounset
set -o pipefail
function usage {
echo "$0 [ -h/--help ] [ FILENAME ]"
@ianmiell
ianmiell / .block
Last active February 5, 2021 12:47 — forked from magjac/.block
Growing Graphviz Edges
height: 800
#!/bin/bash
# 0 * * * * /Users/imiell/git/work/bin/home/slack_start_stop.sh start
# 3-59 * * * * /Users/imiell/git/work/bin/home/slack_start_stop.sh stop
DO_START=0
DO_STOP=0
while [ "$1" != "" ]; do
case $1 in
@ianmiell
ianmiell / 3
Created September 16, 2019 06:40
3
@ianmiell
ianmiell / 2
Created September 16, 2019 06:40
2
@ianmiell
ianmiell / 1
Created September 16, 2019 06:35
1