AI Generated Blogs

Found myself with a bit of extra time on my hands lately, so I decided to take the opportunity to explore some AI generated content in the form of micro blogs. My goal was to write some python that interfaces with OpenAI’s api (gpt3.5 turbo model), writes focused content on randomized topics, and then warps that up in a Hugo static site, aka micro blog. I started with an expandable YaML configuration.

Can Nostr Events be Manipulated?

If you haven’t been following along, I have a couple of nostr posts at this point. https://nessy.info/tags/nostr/ I’ve been trying to further understand nostr by deep diving the protocol. At this point my thought is how mutable are nostr messages (events), I understand that during broadcast the relay verifies the signature, but then they need to store these events in some centralized database, right? Could a rogue relay for example accept your event, then alter it at a later time?

Simple Tools for Interacting with the Nostr Protocol

If you haven’t had a chance to ready my previous post about nostr, it is probably worth checking out as it give a detailed, step by step explanation. https://nessy.info/post/2023-02-16-deciphering-nostr-and-its-private-keys/ With knowledge gained from the previous post I decided to put together a couple of rough python scripts, this is to handle a few of our previously manual steps. Head on over to my Github and check out my nostr_stuff repository:

Simple CLI for Categorizing and Sentiment of Text

Now that I’ve spent some time with huggingface.co, specifically their NPL Course (natural language processing) I wanted to combine a couple of the learnings into a simple python script. What I ended up with was a script that could both categorize using a zero-shot-classification model, as well as get sentiment using a sentiment-analysis model. You can interact with this script in one of two ways, first by sending a string as input during execution:

Early Exploration of Large Language Models on Python

With the current hype on artificial intelligence and platforms like OpenAI’s ChatGPT, I decided it’s about time I explore. I’m not going to lie, I’m not exactly excited about a company named OpenAI being a closed source, for profit platform; however, this has been one of the reason I decided to explore offline, open, and self hosted solutions (in the hopes of creating my own models). If you recall I’ve experimented with python and machine learning in the past, look no further than my 2016 Test your machine learning blog post.

Kubernetes Raspberry Pi Lab Environment Setup Using Ansible

After manually setting up a Lightweight Kubernetes cluster on a few of my Raspberry Pi’s I decided to tear it all down, and rebuild it from scratch using Ansible, and an infrastructure as code strategy. This gives me a chance to catchup a bit on ansible, and keep my documentation and notes for this project in a replay-able Github repository. The project at the moment is rough, and contains sensitive details; however, this is a local lab environment that will most likely be trashed later on, so I’m not worried.

Raspberry Pi Kubernetes Cluster

I figured now the perfect time for me to explore the lightweight Kubernetes project k3s. The documentation was really solid, plus I found Alex Ortner’s Medium blog post very helpful. I dusted of a Raspberry Pi 4, and three Raspberry Pi 3’s for this setup. I’m still in the mists of my kubernetes journey, but I wanted to share some of the early primitives, and some of the notes I’ve written for myself.

Deciphering Nostr and it's private keys

I’ve heard of https://nostr.com for about a year, but not until recently have I experimenting with it. This post consists of my rough notes as I progressed to sending a nostr message. If you are interested in a bare minimum way to post events to nostr, read on. Generate a new private key $ openssl ecparam -name secp256k1 -genkey -out ec-priv.pem The output here as the file extension notes is PEM:

Raspberry Pi Pico Wireless & CircuitPython

Was lucky enough to get my hands on a couple Raspberry Pi Pico W recently, and just finished up initial exploration. I started with a by flashing the CircuitPython .UT2 to the pico, like always Adafruit has a phenomenal write up on just that. Next I added copied in modules from the 8.x bundle, simply toss the following into your pico’s /lib/ directory: $ ls -1 /Volumes/CIRCUITPY boot_out.txt code.py lib $ ls -1 /Volumes/CIRCUITPY/lib/ adafruit_httpserver.

Raspberry Pi Pico and 433MHz Data Radio

Well its been a minute since I’ve toyed around with electronics, but a $4 Raspberry Pi Pico board arriving in the mail changed that. This board packs a boat load of utility for $4, just check out the data sheet and check out all them I2C and SPI pins! I dusted off the last components I tinkered with, along with a handful of wires. After a couple days of tinkering, I ended up with a 433MHz radio packet receiver.