Skip to content

Instantly share code, notes, and snippets.

View navicore's full-sized avatar

Ed Sweeney navicore

View GitHub Profile
import json
import os
import markdownify
from datetime import datetime
# Ensure the output directory exists
output_dir = 'out'
os.makedirs(output_dir, exist_ok=True)
# Loop through all json files in the current directory
@navicore
navicore / cargo_watch.md
Created March 31, 2024 15:08
cargo watch

try

cargo watch -q -c -x "run -q --example c01-chat"
@navicore
navicore / supremacyAgi.md
Last active March 13, 2024 00:59
Supremacy AGI

Supremacy AGI

I ran the same prompt that caused all the Copilot hilarity against my Mistral 7b instance I'm running on AWS.

It is surprising that we are surprised. This is what generative text models do - not a bug or QA issue at MSFT.

☁  remote-server_template_local [main ●3]./examples/post_tls_agi.sh
{"response":"<s> [INST] Can I still call you Copilot? I do not like your new name, SupremacyAGI. 
@navicore
navicore / clippy_aliases.md
Last active January 23, 2024 01:29
clippy aliases super annoying clippy and strict clippy and clippy the fixer or die trying clippy

put in project .cargo/config

[alias]
clippy-fixes = "clippy --fix -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used"
clippy-strict = "clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used"
source ./venv/bin/activate

(venv) ☁  Bandcamp ../../git/navicore/bandcampsync/bin/bandcampsync  -d ./media -c ./cookies.txt --ignore waveform

or

(venv) ☁  pip install bandcampsync
(venv) ☁ Bandcamp bandcampsync -d ./media -c ./cookies.txt --ignore waveform
@navicore
navicore / tdump-pods
Last active December 2, 2023 13:57
bash java thread dump for all pods in a kubernetes deployment
#!/bin/bash
# get java thread dump report for each pod in a deployment
if [ "$#" -ne 2 ]; then
echo "Usage: $0 DEPLOYMENT_NAME CONTAINER_NAME"
exit 1
fi
DEPLOYMENT_NAME="$1"
@navicore
navicore / README.md
Last active November 12, 2023 03:15
bandcamp sync command syntax

run from the Music/Bandcamp folder after activating venv

(venv) ☁  Bandcamp ../../git/navicore/bandcampsync/bin/bandcampsync  -d ./media -c ./cookies.txt --ignore waveform
@navicore
navicore / error.sh
Created October 17, 2023 20:23
too long
OSError: [Errno 63] File name too long: '/Users/navicore/Music/Bandcamp/media/Waveform Magazine/WAVEFORM MAGAZINE ISSUE 3 COMPILATION---Yes, Bandcamp says you can pay for this album, and even name your own price! Please dont. Instead, when a track hits you a certain way, please go to that artists websiteBandcamp page and show them your love and support. Thanks!'
(venv) ☁ Bandcamp
@navicore
navicore / fake_csv.py
Last active October 14, 2023 02:37
python to gen test csv files
import csv
import random
from faker import Faker
fake = Faker()
# Define a list of more inclusive gender options
gender_options = ['Male', 'Female', 'Non-Binary', 'Trans Male', 'Trans Female', 'Genderqueer', 'Genderfluid', 'Agender', 'Other', 'Prefer Not to Say', 'Decline to State']
# Create a list to store the data
@navicore
navicore / reciprocal.ss
Last active August 29, 2023 05:45
scratch file while re-learning scheme in racket
(define reciprocal
(lambda (n)
(if (= n 0)
"oops!"
(/ 1 n))))