Skip to content

Instantly share code, notes, and snippets.

View carry0987's full-sized avatar
:electron:

carry0987 carry0987

:electron:
View GitHub Profile
@carry0987
carry0987 / data.py
Created July 5, 2023 07:45 — forked from primaryobjects/data.py
LLM ChatGPT prompt engineering accuracy statistics. Using F-score and accuracy to measure effectiveness of prompts for classification. https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/1/introduction
messages = [
{'content': 'I hate this food.', 'truth': 1},
{'content': 'This movie is terrible.', 'truth': 1},
{'content': 'I really like this play.', 'truth': 0},
{'content': 'I am just not sure.', 'truth': 0},
{'content': 'I can\'t believe you would do something like that!', 'truth': 1},
{'content': 'This is absolutely unacceptable!', 'truth': 1},
{'content': 'I am so angry right now, I can\'t even think straight.', 'truth': 1},
{'content': 'How could you be so thoughtless?', 'truth': 1},
{'content': 'You have no idea how much you\'ve hurt me.', 'truth': 1},
@carry0987
carry0987 / 1-setup.md
Created April 17, 2023 11:49 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

@carry0987
carry0987 / signing-git-commits.md
Created April 17, 2023 11:49 — forked from phortuin/signing-git-commits.md
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
sleep-with-countdown() {
secs=$1
while [ $secs -gt 0 ]; do
printf "\rsleep: $secs\033[0K"
sleep 1
: $((secs--))
done
printf "\n"
}